add searching for document id

This commit is contained in:
Uwe Steinmann 2017-01-18 14:45:40 +01:00
parent b8a7917c12
commit 8959a9e167
3 changed files with 10 additions and 2 deletions

View File

@ -633,7 +633,7 @@ class SeedDMS_Core_DMS {
// if none is checkd search all
if (count($searchin)==0)
$searchin=array(1, 2, 3, 4);
$searchin=array(1, 2, 3, 4, 5);
/*--------- Do it all over again for folders -------------*/
$totalFolders = 0;
@ -649,6 +649,9 @@ class SeedDMS_Core_DMS {
if (in_array(4, $searchin)) {
$searchFields[] = "`tblFolderAttributes`.`value`";
}
if (in_array(5, $searchin)) {
$searchFields[] = "`tblFolders`.`id`";
}
if (count($searchFields)>0) {
foreach ($tkeys as $key) {
@ -802,6 +805,9 @@ class SeedDMS_Core_DMS {
$searchFields[] = "`tblDocumentAttributes`.`value`";
$searchFields[] = "`tblDocumentContentAttributes`.`value`";
}
if (in_array(5, $searchin)) {
$searchFields[] = "`tblDocuments`.`id`";
}
if (count($searchFields)>0) {

View File

@ -189,6 +189,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe
case 2: // name
case 3: // comment
case 4: // attributes
case 5: // id
$searchin[$si] = $si;
break;
}
@ -197,7 +198,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe
}
// if none is checkd search all
if (count($searchin)==0) $searchin=array(1, 2, 3, 4);
if (count($searchin)==0) $searchin=array(1, 2, 3, 4, 5);
// Check to see if the search has been restricted to a particular sub-tree in
// the folder hierarchy.

View File

@ -143,6 +143,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
<label class="checkbox" for="searchName"><input type="checkbox" name="searchin[]" id="searchName" value="2" <?php if(in_array('2', $searchin)) echo " checked"; ?>><?php printMLText("name");?></label>
<label class="checkbox" for="comment"><input type="checkbox" name="searchin[]" id="comment" value="3" <?php if(in_array('3', $searchin)) echo " checked"; ?>><?php printMLText("comment");?></label>
<label class="checkbox" for="attributes"><input type="checkbox" name="searchin[]" id="attributes" value="4" <?php if(in_array('4', $searchin)) echo " checked"; ?>><?php printMLText("attributes");?></label>
<label class="checkbox" for="id"><input type="checkbox" name="searchin[]" id="id" value="5" <?php if(in_array('5', $searchin)) echo " checked"; ?>><?php printMLText("id");?></label>
</td>
</tr>
<tr>