mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
"dont switch the global db object away from phpgwapi!"
This commit is contained in:
parent
eb2303adc8
commit
443d4fd16a
@ -45,7 +45,7 @@ class ajaxnotifications {
|
|||||||
private $preferences;
|
private $preferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* holds db object of SQL database
|
* reference to global db object
|
||||||
*
|
*
|
||||||
* @var egw_db
|
* @var egw_db
|
||||||
*/
|
*/
|
||||||
@ -66,8 +66,7 @@ class ajaxnotifications {
|
|||||||
$preferences = $prefs->read();
|
$preferences = $prefs->read();
|
||||||
$this->preferences = (object)$preferences[self::_appname];
|
$this->preferences = (object)$preferences[self::_appname];
|
||||||
|
|
||||||
$this->db = &$GLOBALS['egw']->db;
|
$this->db = $GLOBALS['egw']->db;
|
||||||
$this->db->set_app(self::_appname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -80,20 +79,20 @@ class ajaxnotifications {
|
|||||||
$response =& new xajaxResponse();
|
$response =& new xajaxResponse();
|
||||||
$session_id = $GLOBALS['egw_info']['user']['sessionid'];
|
$session_id = $GLOBALS['egw_info']['user']['sessionid'];
|
||||||
$message = '';
|
$message = '';
|
||||||
$this->db->select(self::_notification_table,
|
$rs = $this->db->select(self::_notification_table,
|
||||||
'*', array(
|
'*', array(
|
||||||
'account_id' => $this->recipient->account_id,
|
'account_id' => $this->recipient->account_id,
|
||||||
'session_id' => $session_id,
|
'session_id' => $session_id,
|
||||||
),
|
),
|
||||||
__LINE__,__FILE__);
|
__LINE__,__FILE__,false,'',self::_appname);
|
||||||
if ($this->db->num_rows() != 0) {
|
if ($rs->NumRows() > 0) {
|
||||||
while ($notification = $this->db->row(true)) {
|
foreach ($rs as $notification) {
|
||||||
$response->addScriptCall('append_notification_message',$notification['message']);
|
$response->addScriptCall('append_notification_message',$notification['message']);
|
||||||
}
|
}
|
||||||
$myval=$this->db->delete(self::_notification_table,array(
|
$myval=$this->db->delete(self::_notification_table,array(
|
||||||
'account_id' => $this->recipient->account_id,
|
'account_id' => $this->recipient->account_id,
|
||||||
'session_id' => $session_id,
|
'session_id' => $session_id,
|
||||||
),__LINE__,__FILE__);
|
),__LINE__,__FILE__,self::_appname);
|
||||||
|
|
||||||
switch($this->preferences->egwpopup_verbosity) {
|
switch($this->preferences->egwpopup_verbosity) {
|
||||||
case 'low':
|
case 'low':
|
||||||
|
Loading…
Reference in New Issue
Block a user