mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-10-10 11:02:41 +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 = "";
|
$searchKey = "";
|
||||||
|
|
||||||
$classname = $this->classnames['folder'];
|
$classname = $this->classnames['folder'];
|
||||||
$searchFields = $classname::getSearchFields($searchin);
|
$searchFields = $classname::getSearchFields($this, $searchin);
|
||||||
|
|
||||||
if (count($searchFields)>0) {
|
if (count($searchFields)>0) {
|
||||||
foreach ($tkeys as $key) {
|
foreach ($tkeys as $key) {
|
||||||
|
@ -840,7 +840,7 @@ class SeedDMS_Core_DMS {
|
||||||
$searchKey = "";
|
$searchKey = "";
|
||||||
|
|
||||||
$classname = $this->classnames['document'];
|
$classname = $this->classnames['document'];
|
||||||
$searchFields = $classname::getSearchFields($searchin);
|
$searchFields = $classname::getSearchFields($this, $searchin);
|
||||||
|
|
||||||
if (count($searchFields)>0) {
|
if (count($searchFields)>0) {
|
||||||
foreach ($tkeys as $key) {
|
foreach ($tkeys as $key) {
|
||||||
|
|
|
@ -175,7 +175,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
* 4=attributes)
|
* 4=attributes)
|
||||||
* @return array list of database fields
|
* @return array list of database fields
|
||||||
*/
|
*/
|
||||||
public static function getSearchFields($searchin) { /* {{{ */
|
public static function getSearchFields($dms, $searchin) { /* {{{ */
|
||||||
|
$db = $dms->getDB();
|
||||||
|
|
||||||
$searchFields = array();
|
$searchFields = array();
|
||||||
if (in_array(1, $searchin)) {
|
if (in_array(1, $searchin)) {
|
||||||
$searchFields[] = "`tblDocuments`.`keywords`";
|
$searchFields[] = "`tblDocuments`.`keywords`";
|
||||||
|
@ -192,7 +194,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
$searchFields[] = "`tblDocumentContentAttributes`.`value`";
|
$searchFields[] = "`tblDocumentContentAttributes`.`value`";
|
||||||
}
|
}
|
||||||
if (in_array(5, $searchin)) {
|
if (in_array(5, $searchin)) {
|
||||||
$searchFields[] = "`tblDocuments`.`id`";
|
$searchFields[] = $db->castToText("`tblDocuments`.`id`");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $searchFields;
|
return $searchFields;
|
||||||
|
|
|
@ -95,7 +95,9 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
||||||
* 4=attributes)
|
* 4=attributes)
|
||||||
* @return array list of database fields
|
* @return array list of database fields
|
||||||
*/
|
*/
|
||||||
public static function getSearchFields($searchin) { /* {{{ */
|
public static function getSearchFields($dms, $searchin) { /* {{{ */
|
||||||
|
$db = $dms->getDB();
|
||||||
|
|
||||||
$searchFields = array();
|
$searchFields = array();
|
||||||
if (in_array(2, $searchin)) {
|
if (in_array(2, $searchin)) {
|
||||||
$searchFields[] = "`tblFolders`.`name`";
|
$searchFields[] = "`tblFolders`.`name`";
|
||||||
|
@ -107,7 +109,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
||||||
$searchFields[] = "`tblFolderAttributes`.`value`";
|
$searchFields[] = "`tblFolderAttributes`.`value`";
|
||||||
}
|
}
|
||||||
if (in_array(5, $searchin)) {
|
if (in_array(5, $searchin)) {
|
||||||
$searchFields[] = "`tblFolders`.`id`";
|
$searchFields[] = $db->castToText("`tblFolders`.`id`");
|
||||||
}
|
}
|
||||||
return $searchFields;
|
return $searchFields;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user