mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
- adding methods getNotificationsByGroup() and getNotificationsByUser()
This commit is contained in:
parent
64521a544f
commit
613b0ecb8d
|
@ -748,5 +748,31 @@ class LetoDMS_DMS {
|
||||||
return $this->getKeywordCategory($this->db->getInsertID());
|
return $this->getKeywordCategory($this->db->getInsertID());
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all notifications for a group
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return array array notifications
|
||||||
|
*/
|
||||||
|
function getNotificationsByGroup($group, $type=0) { /* {{{ */
|
||||||
|
$queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ".
|
||||||
|
"WHERE `tblNotify`.`groupID` = ". $group->getID();
|
||||||
|
if($type) {
|
||||||
|
$queryStr .= " AND `tblNotify`.`targetType` = ".$type;
|
||||||
|
}
|
||||||
|
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all notifications for a user
|
||||||
|
*
|
||||||
|
* @return array array notifications
|
||||||
|
*/
|
||||||
|
function getNotificationsByUser($user, $type) { /* {{{ */
|
||||||
|
$queryStr = "SELECT `tblNotify`.* FROM `tblNotify` ".
|
||||||
|
"WHERE `tblNotify`.`userID` = ". $user->getID();
|
||||||
|
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user