mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 22:47:19 +00:00
pass $dms to getSearchFields() and cast id to text
This commit is contained in:
parent
3da6d66ee1
commit
0053213856
|
@ -699,7 +699,7 @@ class SeedDMS_Core_DMS {
|
|||
$searchKey = "";
|
||||
|
||||
$classname = $this->classnames['folder'];
|
||||
$searchFields = $classname::getSearchFields($searchin);
|
||||
$searchFields = $classname::getSearchFields($this, $searchin);
|
||||
|
||||
if (count($searchFields)>0) {
|
||||
foreach ($tkeys as $key) {
|
||||
|
@ -840,7 +840,7 @@ class SeedDMS_Core_DMS {
|
|||
$searchKey = "";
|
||||
|
||||
$classname = $this->classnames['document'];
|
||||
$searchFields = $classname::getSearchFields($searchin);
|
||||
$searchFields = $classname::getSearchFields($this, $searchin);
|
||||
|
||||
if (count($searchFields)>0) {
|
||||
foreach ($tkeys as $key) {
|
||||
|
|
|
@ -175,7 +175,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
* 4=attributes)
|
||||
* @return array list of database fields
|
||||
*/
|
||||
public static function getSearchFields($searchin) { /* {{{ */
|
||||
public static function getSearchFields($dms, $searchin) { /* {{{ */
|
||||
$db = $dms->getDB();
|
||||
|
||||
$searchFields = array();
|
||||
if (in_array(1, $searchin)) {
|
||||
$searchFields[] = "`tblDocuments`.`keywords`";
|
||||
|
@ -192,7 +194,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
$searchFields[] = "`tblDocumentContentAttributes`.`value`";
|
||||
}
|
||||
if (in_array(5, $searchin)) {
|
||||
$searchFields[] = "`tblDocuments`.`id`";
|
||||
$searchFields[] = $db->castToText("`tblDocuments`.`id`");
|
||||
}
|
||||
|
||||
return $searchFields;
|
||||
|
|
|
@ -95,7 +95,9 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
* 4=attributes)
|
||||
* @return array list of database fields
|
||||
*/
|
||||
public static function getSearchFields($searchin) { /* {{{ */
|
||||
public static function getSearchFields($dms, $searchin) { /* {{{ */
|
||||
$db = $dms->getDB();
|
||||
|
||||
$searchFields = array();
|
||||
if (in_array(2, $searchin)) {
|
||||
$searchFields[] = "`tblFolders`.`name`";
|
||||
|
@ -107,7 +109,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
$searchFields[] = "`tblFolderAttributes`.`value`";
|
||||
}
|
||||
if (in_array(5, $searchin)) {
|
||||
$searchFields[] = "`tblFolders`.`id`";
|
||||
$searchFields[] = $db->castToText("`tblFolders`.`id`");
|
||||
}
|
||||
return $searchFields;
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user