mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 06:27:15 +00:00
- some minor variable name changes to be more consistent
This commit is contained in:
parent
043fcfdd1e
commit
000ceaf1ac
|
@ -1023,8 +1023,8 @@ class LetoDMS_Core_DMS {
|
||||||
return $cat;
|
return $cat;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function getKeywordCategoryByName($name, $owner) { /* {{{ */
|
function getKeywordCategoryByName($name, $userID) { /* {{{ */
|
||||||
$queryStr = "SELECT * FROM tblKeywordCategories WHERE name = " . $this->db->qstr($name) . " AND owner = " . (int) $owner;
|
$queryStr = "SELECT * FROM tblKeywordCategories WHERE name = " . $this->db->qstr($name) . " AND owner = " . (int) $userID;
|
||||||
$resArr = $this->db->getResultArray($queryStr);
|
$resArr = $this->db->getResultArray($queryStr);
|
||||||
if ((is_bool($resArr) && !$resArr) || (count($resArr) != 1))
|
if ((is_bool($resArr) && !$resArr) || (count($resArr) != 1))
|
||||||
return false;
|
return false;
|
||||||
|
@ -1054,6 +1054,9 @@ class LetoDMS_Core_DMS {
|
||||||
return $categories;
|
return $categories;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function should be replaced by getAllKeywordCategories()
|
||||||
|
*/
|
||||||
function getAllUserKeywordCategories($userID) { /* {{{ */
|
function getAllUserKeywordCategories($userID) { /* {{{ */
|
||||||
$queryStr = "SELECT * FROM tblKeywordCategories";
|
$queryStr = "SELECT * FROM tblKeywordCategories";
|
||||||
if ($userID != -1)
|
if ($userID != -1)
|
||||||
|
@ -1073,11 +1076,11 @@ class LetoDMS_Core_DMS {
|
||||||
return $categories;
|
return $categories;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function addKeywordCategory($owner, $name) { /* {{{ */
|
function addKeywordCategory($userID, $name) { /* {{{ */
|
||||||
if (is_object($this->getKeywordCategoryByName($name, $owner))) {
|
if (is_object($this->getKeywordCategoryByName($name, $userID))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$queryStr = "INSERT INTO tblKeywordCategories (owner, name) VALUES ($owner, '$name')";
|
$queryStr = "INSERT INTO tblKeywordCategories (owner, name) VALUES (".(int) $userID.", '$name')";
|
||||||
if (!$this->db->getResult($queryStr))
|
if (!$this->db->getResult($queryStr))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -1184,7 +1187,7 @@ class LetoDMS_Core_DMS {
|
||||||
* @param integer $type type of item (T_DOCUMENT or T_FOLDER)
|
* @param integer $type type of item (T_DOCUMENT or T_FOLDER)
|
||||||
* @return array array of notifications
|
* @return array array of notifications
|
||||||
*/
|
*/
|
||||||
function getNotificationsByUser($user, $type) { /* {{{ */
|
function getNotificationsByUser($user, $type=0) { /* {{{ */
|
||||||
$queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ".
|
$queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ".
|
||||||
"WHERE `tblNotify`.`userID` = ". $user->getID();
|
"WHERE `tblNotify`.`userID` = ". $user->getID();
|
||||||
if($type) {
|
if($type) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user