mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-15 06:01:19 +00:00
do not use fixed class names for folders and documents anymore
use instead the classname stored in $classnames[]
This commit is contained in:
parent
5b8746a8a5
commit
5496aa2bcc
|
@ -532,7 +532,7 @@ class SeedDMS_Core_DMS {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$row = $resArr[0];
|
$row = $resArr[0];
|
||||||
$document = new SeedDMS_Core_Document($row["id"], $row["name"], $row["comment"], $row["date"], $row["expires"], $row["owner"], $row["folder"], $row["inheritAccess"], $row["defaultAccess"], $row["lockUser"], $row["keywords"], $row["sequence"]);
|
$document = new $this->classnames['document']($row["id"], $row["name"], $row["comment"], $row["date"], $row["expires"], $row["owner"], $row["folder"], $row["inheritAccess"], $row["defaultAccess"], $row["lockUser"], $row["keywords"], $row["sequence"]);
|
||||||
$document->setDMS($this);
|
$document->setDMS($this);
|
||||||
return $document;
|
return $document;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
@ -557,7 +557,7 @@ class SeedDMS_Core_DMS {
|
||||||
$row = $resArr[0];
|
$row = $resArr[0];
|
||||||
|
|
||||||
$document = $this->getDocument($row['document']);
|
$document = $this->getDocument($row['document']);
|
||||||
$version = new SeedDMS_Core_DocumentContent($row['id'], $document, $row['version'], $row['comment'], $row['date'], $row['createdBy'], $row['dir'], $row['orgFileName'], $row['fileType'], $row['mimeType'], $row['fileSize'], $row['checksum']);
|
$version = new $this->classnames['documentcontent']($row['id'], $document, $row['version'], $row['comment'], $row['date'], $row['createdBy'], $row['dir'], $row['orgFileName'], $row['fileType'], $row['mimeType'], $row['fileSize'], $row['checksum']);
|
||||||
return $version;
|
return $version;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
@ -644,16 +644,9 @@ class SeedDMS_Core_DMS {
|
||||||
$totalFolders = 0;
|
$totalFolders = 0;
|
||||||
if($mode & 0x2) {
|
if($mode & 0x2) {
|
||||||
$searchKey = "";
|
$searchKey = "";
|
||||||
$searchFields = array();
|
|
||||||
if (in_array(2, $searchin)) {
|
$classname = $this->classnames['folder'];
|
||||||
$searchFields[] = "`tblFolders`.`name`";
|
$searchFields = $classname::getSearchFields($searchin);
|
||||||
}
|
|
||||||
if (in_array(3, $searchin)) {
|
|
||||||
$searchFields[] = "`tblFolders`.`comment`";
|
|
||||||
}
|
|
||||||
if (in_array(4, $searchin)) {
|
|
||||||
$searchFields[] = "`tblFolderAttributes`.`value`";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count($searchFields)>0) {
|
if (count($searchFields)>0) {
|
||||||
foreach ($tkeys as $key) {
|
foreach ($tkeys as $key) {
|
||||||
|
@ -723,7 +716,7 @@ class SeedDMS_Core_DMS {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$searchQuery = "FROM `tblFolders` LEFT JOIN `tblFolderAttributes` on `tblFolders`.`id`=`tblFolderAttributes`.`folder` WHERE 1=1";
|
$searchQuery = "FROM ".$classname::getSearchTables()." WHERE 1=1";
|
||||||
|
|
||||||
if (strlen($searchKey)>0) {
|
if (strlen($searchKey)>0) {
|
||||||
$searchQuery .= " AND (".$searchKey.")";
|
$searchQuery .= " AND (".$searchKey.")";
|
||||||
|
@ -2078,9 +2071,9 @@ class SeedDMS_Core_DMS {
|
||||||
|
|
||||||
$versions = array();
|
$versions = array();
|
||||||
foreach($resArr as $row) {
|
foreach($resArr as $row) {
|
||||||
$document = new SeedDMS_Core_Document($row['document'], '', '', '', '', '', '', '', '', '', '', '');
|
$document = new $this->classnames['document']($row['document'], '', '', '', '', '', '', '', '', '', '', '');
|
||||||
$document->setDMS($this);
|
$document->setDMS($this);
|
||||||
$version = new SeedDMS_Core_DocumentContent($row['id'], $document, $row['version'], $row['comment'], $row['date'], $row['createdBy'], $row['dir'], $row['orgFileName'], $row['fileType'], $row['mimeType'], $row['fileSize'], $row['checksum']);
|
$version = new $this->classnames['documentcontent']($row['id'], $document, $row['version'], $row['comment'], $row['date'], $row['createdBy'], $row['dir'], $row['orgFileName'], $row['fileType'], $row['mimeType'], $row['fileSize'], $row['checksum']);
|
||||||
$versions[] = $version;
|
$versions[] = $version;
|
||||||
}
|
}
|
||||||
return $versions;
|
return $versions;
|
||||||
|
@ -2102,9 +2095,9 @@ class SeedDMS_Core_DMS {
|
||||||
|
|
||||||
$versions = array();
|
$versions = array();
|
||||||
foreach($resArr as $row) {
|
foreach($resArr as $row) {
|
||||||
$document = new SeedDMS_Core_Document($row['document'], '', '', '', '', '', '', '', '', '', '', '');
|
$document = new $this->classnames['document']($row['document'], '', '', '', '', '', '', '', '', '', '', '');
|
||||||
$document->setDMS($this);
|
$document->setDMS($this);
|
||||||
$version = new SeedDMS_Core_DocumentContent($row['id'], $document, $row['version'], $row['comment'], $row['date'], $row['createdBy'], $row['dir'], $row['orgFileName'], $row['fileType'], $row['mimeType'], $row['fileSize'], $row['checksum'], $row['fileSize'], $row['checksum']);
|
$version = new $this->classnames['documentcontent']($row['id'], $document, $row['version'], $row['comment'], $row['date'], $row['createdBy'], $row['dir'], $row['orgFileName'], $row['fileType'], $row['mimeType'], $row['fileSize'], $row['checksum'], $row['fileSize'], $row['checksum']);
|
||||||
$versions[] = $version;
|
$versions[] = $version;
|
||||||
}
|
}
|
||||||
return $versions;
|
return $versions;
|
||||||
|
@ -2126,9 +2119,9 @@ class SeedDMS_Core_DMS {
|
||||||
|
|
||||||
$versions = array();
|
$versions = array();
|
||||||
foreach($resArr as $row) {
|
foreach($resArr as $row) {
|
||||||
$document = new SeedDMS_Core_Document($row['document'], '', '', '', '', '', '', '', '', '', '', '');
|
$document = new $this->classnames['document']($row['document'], '', '', '', '', '', '', '', '', '', '', '');
|
||||||
$document->setDMS($this);
|
$document->setDMS($this);
|
||||||
$version = new SeedDMS_Core_DocumentContent($row['id'], $document, $row['version'], $row['comment'], $row['date'], $row['createdBy'], $row['dir'], $row['orgFileName'], $row['fileType'], $row['mimeType'], $row['fileSize'], $row['checksum']);
|
$version = new $this->classnames['documentcontent']($row['id'], $document, $row['version'], $row['comment'], $row['date'], $row['createdBy'], $row['dir'], $row['orgFileName'], $row['fileType'], $row['mimeType'], $row['fileSize'], $row['checksum']);
|
||||||
$versions[] = $version;
|
$versions[] = $version;
|
||||||
}
|
}
|
||||||
return $versions;
|
return $versions;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user