Commit 700352a5f42f292e6f74b0ca11b1dcd71cc416d8
1 parent
33627ae3
minor fixes
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2047 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
6 additions
and
24 deletions
presentation/lookAndFeel/knowledgeTree/search/advancedSearchBL.php
| @@ -27,6 +27,8 @@ if (checkSession()) { | @@ -27,6 +27,8 @@ if (checkSession()) { | ||
| 27 | 27 | ||
| 28 | if (strlen($fForSearch)) { | 28 | if (strlen($fForSearch)) { |
| 29 | if (strlen($fSearchString) > 0) { | 29 | if (strlen($fSearchString) > 0) { |
| 30 | + $oPatternCustom = & new PatternCustom(); | ||
| 31 | + | ||
| 30 | //display search results | 32 | //display search results |
| 31 | $sMetaTagIDs = getChosenMetaDataTags(); | 33 | $sMetaTagIDs = getChosenMetaDataTags(); |
| 32 | 34 | ||
| @@ -34,33 +36,13 @@ if (checkSession()) { | @@ -34,33 +36,13 @@ if (checkSession()) { | ||
| 34 | $sSQLSearchString = getSQLSearchString($fSearchString); | 36 | $sSQLSearchString = getSQLSearchString($fSearchString); |
| 35 | 37 | ||
| 36 | if (!isset($fStartIndex)) { | 38 | if (!isset($fStartIndex)) { |
| 37 | - $fStartIndex = 0; | ||
| 38 | - } | ||
| 39 | - | 39 | + $fStartIndex = 0; |
| 40 | + } | ||
| 40 | $oPatternCustom->setHtml(getSearchResults($sMetaTagIDs,$sSQLSearchString, $fStartIndex)); | 41 | $oPatternCustom->setHtml(getSearchResults($sMetaTagIDs,$sSQLSearchString, $fStartIndex)); |
| 41 | $main->setCentralPayload($oPatternCustom); | 42 | $main->setCentralPayload($oPatternCustom); |
| 42 | $main->render(); | 43 | $main->render(); |
| 43 | - //$sDocument = getApprovedDocumentString($sMetaTagIDs, $sSQLSearchString, (isset($fSearchArchive) ? "Archived" : "Live")); | ||
| 44 | - /*if (strlen($sDocument) > 0) { | ||
| 45 | - //if there are documents to view | ||
| 46 | - $oPatternCustom = & new PatternCustom(); | ||
| 47 | - if (!isset($fStartIndex)) { | ||
| 48 | - $fStartIndex = 0; | ||
| 49 | - } | ||
| 50 | - $oPatternCustom->setHtml(getSearchResults($sMetaTagIDs,$sSQLSearchString, $fStartIndex)); | ||
| 51 | - $main->setCentralPayload($oPatternCustom); | ||
| 52 | - $main->render(); | ||
| 53 | - } else { | ||
| 54 | - $oPatternCustom = & new PatternCustom(); | ||
| 55 | - $oPatternCustom->setHtml(getSearchPage($fSearchString, explode(",",$sMetaTagIDs))); | ||
| 56 | - $main->setCentralPayload($oPatternCustom); | ||
| 57 | - $main->setErrorMessage("No documents matched your search criteria"); | ||
| 58 | - $main->setFormAction("advancedSearchBL.php?fForSearch=1"); | ||
| 59 | - $main->render(); | ||
| 60 | - }*/ | ||
| 61 | - | ||
| 62 | } else { | 44 | } else { |
| 63 | - $oPatternCustom = & new PatternCustom(); | 45 | + |
| 64 | $oPatternCustom->setHtml(getSearchPage($fSearchString)); | 46 | $oPatternCustom->setHtml(getSearchPage($fSearchString)); |
| 65 | $main->setCentralPayload($oPatternCustom); | 47 | $main->setCentralPayload($oPatternCustom); |
| 66 | $main->setErrorMessage("Please select at least one criteria to search by"); | 48 | $main->setErrorMessage("Please select at least one criteria to search by"); |
presentation/lookAndFeel/knowledgeTree/search/advancedSearchUI.inc
| @@ -74,7 +74,7 @@ function getSearchResults($sMetaTagIDs, $sSQLSearchString, $iStartIndex) { | @@ -74,7 +74,7 @@ function getSearchResults($sMetaTagIDs, $sSQLSearchString, $iStartIndex) { | ||
| 74 | "ORDER BY doc_count DESC "; | 74 | "ORDER BY doc_count DESC "; |
| 75 | 75 | ||
| 76 | $aColumns = array("folder_image_url", "document_name", "doc_count"); | 76 | $aColumns = array("folder_image_url", "document_name", "doc_count"); |
| 77 | - $aColumnTypes = array(4,3,3); | 77 | + $aColumnTypes = array(4,3,1); |
| 78 | $aColumnHeaders = array("<font color=\"ffffff\">Folder</font>","<font color=\"ffffff\">Document</font>", "<font color=\"ffffff\">Matches</font>"); | 78 | $aColumnHeaders = array("<font color=\"ffffff\">Folder</font>","<font color=\"ffffff\">Document</font>", "<font color=\"ffffff\">Matches</font>"); |
| 79 | $aLinkURLs = array("$default->rootUrl/control.php?action=browse","$default->rootUrl/control.php?action=viewDocument"); | 79 | $aLinkURLs = array("$default->rootUrl/control.php?action=browse","$default->rootUrl/control.php?action=viewDocument"); |
| 80 | $aDBQueryStringColumns = array("document_id","folder_id"); | 80 | $aDBQueryStringColumns = array("document_id","folder_id"); |