Commit 2cb261e5a9246572d02ac74d33580dc45b3fa18c

Authored by rob
1 parent 4467b0c0

Removed debug output


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2244 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/search/standardSearchBL.php
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 * Business logic used to perform document searches 3 * Business logic used to perform document searches
4 * 4 *
5 * Expected form variables 5 * Expected form variables
6 -* o fStandardSearchString - text to search on 6 +* o fSearchText - text to search on
7 * o fBrowseType - current browse type 7 * o fBrowseType - current browse type
8 * o fFolderID - folder currently being browsed (if a folder is being browsed) 8 * o fFolderID - folder currently being browsed (if a folder is being browsed)
9 * o fDocumentID - document currently being browsed (if a document is being browsed) 9 * o fDocumentID - document currently being browsed (if a document is being browsed)
@@ -33,7 +33,8 @@ if (checkSession()) { @@ -33,7 +33,8 @@ if (checkSession()) {
33 if (strlen($fBrowseType) > 0) { 33 if (strlen($fBrowseType) > 0) {
34 //the user was browsing by a specific type 34 //the user was browsing by a specific type
35 switch ($fBrowseType) { 35 switch ($fBrowseType) {
36 - case "folder" : 36 + case "folder" :
  37 + //echo "searching by folder browsetype";
37 //user was browsing a specific folder - search that folder 38 //user was browsing a specific folder - search that folder
38 if (!$fFolderID) { 39 if (!$fFolderID) {
39 //start at the root folder 40 //start at the root folder
@@ -46,6 +47,7 @@ if (checkSession()) { @@ -46,6 +47,7 @@ if (checkSession()) {
46 $main->render(); 47 $main->render();
47 break; 48 break;
48 case "category" : 49 case "category" :
  50 + //echo "searching by category browse type";
49 //user was browsing by category - search all documents in that category 51 //user was browsing by category - search all documents in that category
50 if (!$fCategoryName) { 52 if (!$fCategoryName) {
51 //no category name specified, so just start at the root folder 53 //no category name specified, so just start at the root folder
@@ -58,6 +60,7 @@ if (checkSession()) { @@ -58,6 +60,7 @@ if (checkSession()) {
58 $main->render(); 60 $main->render();
59 break; 61 break;
60 case "documentType" : 62 case "documentType" :
  63 + //echo "searching by documentType browseType";
61 //user was browsing by document type - search all documents in that doc type 64 //user was browsing by document type - search all documents in that doc type
62 if (!$fDocTypeID) { 65 if (!$fDocTypeID) {
63 //no document type specified, so just start at the root folder 66 //no document type specified, so just start at the root folder
@@ -71,11 +74,12 @@ if (checkSession()) { @@ -71,11 +74,12 @@ if (checkSession()) {
71 break; 74 break;
72 default: 75 default:
73 //search from the root folder down i.e. all documents 76 //search from the root folder down i.e. all documents
74 - echo "unknown search type"; 77 + //echo "unknown search type";
75 break; 78 break;
76 } 79 }
77 } else if (strlen($fFolderID) > 0) { 80 } else if (strlen($fFolderID) > 0) {
78 - //the user was browsing a folder, search that folder 81 + //the user was browsing a folder, search that folder
  82 + //echo "searching by folder id";
79 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); 83 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
80 $oPatternCustom = & new PatternCustom(); 84 $oPatternCustom = & new PatternCustom();
81 $oPatternCustom->setHtml(getSeachResultsByFolder($fFolderID, $fStartIndex, $fSearchText)); 85 $oPatternCustom->setHtml(getSeachResultsByFolder($fFolderID, $fStartIndex, $fSearchText));
@@ -83,6 +87,7 @@ if (checkSession()) { @@ -83,6 +87,7 @@ if (checkSession()) {
83 $main->render(); 87 $main->render();
84 88
85 } else if (strlen($fDocumentID) > 0) { 89 } else if (strlen($fDocumentID) > 0) {
  90 + //echo "searching by document id";
86 //the user was viewing a document, search in that document's folder 91 //the user was viewing a document, search in that document's folder
87 $oDocument = Document::get($fDocumentID); 92 $oDocument = Document::get($fDocumentID);
88 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); 93 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
@@ -91,7 +96,7 @@ if (checkSession()) { @@ -91,7 +96,7 @@ if (checkSession()) {
91 $main->setCentralPayload($oPatternCustom); 96 $main->setCentralPayload($oPatternCustom);
92 $main->render(); 97 $main->render();
93 } else { 98 } else {
94 - echo "still searching by folder"; 99 + //echo "searching by folder";
95 //search from the root folder down i.e. all documents 100 //search from the root folder down i.e. all documents
96 $fFolderID = 1; 101 $fFolderID = 1;
97 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); 102 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
@@ -99,7 +104,8 @@ if (checkSession()) { @@ -99,7 +104,8 @@ if (checkSession()) {
99 $oPatternCustom->setHtml(getSeachResultsByFolder($fFolderID, $fStartIndex, $fSearchText)); 104 $oPatternCustom->setHtml(getSeachResultsByFolder($fFolderID, $fStartIndex, $fSearchText));
100 $main->setCentralPayload($oPatternCustom); 105 $main->setCentralPayload($oPatternCustom);
101 $main->render(); 106 $main->render();
102 - } 107 + }
103 } 108 }
  109 +//echo "not searching"
104 ?> 110 ?>
105 111