mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +00:00
add missing backticks around identifiers in sql statements
This commit is contained in:
parent
6a3bf35739
commit
a65f4d56b5
|
@ -2183,14 +2183,14 @@ class SeedDMS_Core_DMS {
|
||||||
|
|
||||||
return $resArr;
|
return $resArr;
|
||||||
case 'docspermonth':
|
case 'docspermonth':
|
||||||
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date", '%Y-%m')." as `key` from tblDocuments) a group by `key` order by `key`";
|
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date", '%Y-%m')." as `key` from `tblDocuments`) a group by `key` order by `key`";
|
||||||
$resArr = $this->db->getResultArray($queryStr);
|
$resArr = $this->db->getResultArray($queryStr);
|
||||||
if (!$resArr)
|
if (!$resArr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return $resArr;
|
return $resArr;
|
||||||
case 'docsaccumulated':
|
case 'docsaccumulated':
|
||||||
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date")." as `key` from tblDocuments) a group by `key` order by `key`";
|
$queryStr = "select *, count(`key`) as total from (select ".$this->db->getDateExtract("date")." as `key` from `tblDocuments`) a group by `key` order by `key`";
|
||||||
$resArr = $this->db->getResultArray($queryStr);
|
$resArr = $this->db->getResultArray($queryStr);
|
||||||
if (!$resArr)
|
if (!$resArr)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -2137,7 +2137,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
|
|
||||||
/* No need to add entries for new version because the status log
|
/* No need to add entries for new version because the status log
|
||||||
* will generate an entry as well.
|
* will generate an entry as well.
|
||||||
$queryStr = "SELECT * FROM tblDocumentContent WHERE document = " . $this->_id;
|
$queryStr = "SELECT * FROM `tblDocumentContent` WHERE `document` = " . $this->_id;
|
||||||
$resArr = $db->getResultArray($queryStr);
|
$resArr = $db->getResultArray($queryStr);
|
||||||
if (is_bool($resArr) && $resArr == false)
|
if (is_bool($resArr) && $resArr == false)
|
||||||
return false;
|
return false;
|
||||||
|
@ -2673,7 +2673,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
if (1 || !isset($this->_reviewStatus)) {
|
if (1 || !isset($this->_reviewStatus)) {
|
||||||
/* First get a list of all reviews for this document content */
|
/* First get a list of all reviews for this document content */
|
||||||
$queryStr=
|
$queryStr=
|
||||||
"SELECT reviewID FROM tblDocumentReviewers WHERE `version`='".$this->_version
|
"SELECT reviewID FROM `tblDocumentReviewers` WHERE `version`='".$this->_version
|
||||||
."' AND `documentID` = '". $this->_document->getID() ."' ";
|
."' AND `documentID` = '". $this->_document->getID() ."' ";
|
||||||
$recs = $db->getResultArray($queryStr);
|
$recs = $db->getResultArray($queryStr);
|
||||||
if (is_bool($recs) && !$recs)
|
if (is_bool($recs) && !$recs)
|
||||||
|
|
|
@ -172,7 +172,7 @@ class SeedDMS_Core_Group { /* {{{ */
|
||||||
|
|
||||||
$queryStr = "SELECT `tblUsers`.* FROM `tblUsers` ".
|
$queryStr = "SELECT `tblUsers`.* FROM `tblUsers` ".
|
||||||
"LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`userID`=`tblUsers`.`id` ".
|
"LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`userID`=`tblUsers`.`id` ".
|
||||||
"WHERE `tblGroupMembers`.`groupID` = '". $this->_id ."' AND tblGroupMembers.manager = 1";
|
"WHERE `tblGroupMembers`.`groupID` = '". $this->_id ."' AND `tblGroupMembers`.`manager` = 1";
|
||||||
$resArr = $db->getResultArray($queryStr);
|
$resArr = $db->getResultArray($queryStr);
|
||||||
if (is_bool($resArr) && $resArr == false)
|
if (is_bool($resArr) && $resArr == false)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -658,8 +658,8 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO : update document status if reviewer/approver has been deleted
|
// TODO : update document status if reviewer/approver has been deleted
|
||||||
// "DELETE FROM tblDocumentApproveLog WHERE userID = " . $this->_id;
|
// "DELETE FROM `tblDocumentApproveLog` WHERE `userID` = " . $this->_id;
|
||||||
// "DELETE FROM tblDocumentReviewLog WHERE userID = " . $this->_id;
|
// "DELETE FROM `tblDocumentReviewLog` WHERE `userID` = " . $this->_id;
|
||||||
|
|
||||||
|
|
||||||
$reviewStatus = $this->getReviewStatus();
|
$reviewStatus = $this->getReviewStatus();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user