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