Fix Notifications Class
This commit is contained in:
parent
0b2aecbad9
commit
639d4ccb10
2
public/include/classes/notification.class.php
Normal file → Executable file
2
public/include/classes/notification.class.php
Normal file → Executable file
@ -58,7 +58,7 @@ class Notification extends Mail {
|
|||||||
* @param id int Account ID
|
* @param id int Account ID
|
||||||
* @return array Notification data
|
* @return array Notification data
|
||||||
**/
|
**/
|
||||||
public function getNofifications($account_id) {
|
public function getNotifications($account_id) {
|
||||||
$this->debug->append("STA " . __METHOD__, 4);
|
$this->debug->append("STA " . __METHOD__, 4);
|
||||||
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE account_id = ? ORDER BY time DESC");
|
$stmt = $this->mysqli->prepare("SELECT * FROM $this->table WHERE account_id = ? ORDER BY time DESC");
|
||||||
if ($stmt && $stmt->bind_param('i', $account_id) && $stmt->execute() && $result = $stmt->get_result())
|
if ($stmt && $stmt->bind_param('i', $account_id) && $stmt->execute() && $result = $stmt->get_result())
|
||||||
|
|||||||
2
public/include/pages/account/notifications.inc.php
Normal file → Executable file
2
public/include/pages/account/notifications.inc.php
Normal file → Executable file
@ -19,7 +19,7 @@ if ($user->isAuthenticated()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fetch notifications
|
// Fetch notifications
|
||||||
$aNotifications = $notification->getNofifications($_SESSION['USERDATA']['id']);
|
$aNotifications = $notification->getNotifications($_SESSION['USERDATA']['id']);
|
||||||
if (!$aNotifications) $_SESSION['POPUP'][] = array('CONTENT' => 'Could not find any notifications', 'TYPE' => 'errormsg');
|
if (!$aNotifications) $_SESSION['POPUP'][] = array('CONTENT' => 'Could not find any notifications', 'TYPE' => 'errormsg');
|
||||||
|
|
||||||
// Fetch global settings
|
// Fetch global settings
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user