mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Tweeks of new Log System
This commit is contained in:
1 parent
d404afe501
commit
b174022f9a
3 files changed
+12
-10
No files matched your search
@@ -5,14 +5,16 @@
|
||||
//TODO: Working timestamp to $title
|
||||
class NotificationManager
|
||||
{
|
||||
public static function addSubscriber($userID = '', $token = ''){
|
||||
$notificationSubscriber = $subDeviceId = Db::loadOne('SELECT id FROM notifications WHERE token = ?;', array($token));
|
||||
if ($notificationSubscriber == ''){
|
||||
$notification = array (
|
||||
'user_id' => $userID,
|
||||
'token' => $token,
|
||||
);
|
||||
Db::add ('notifications', $notification);
|
||||
public static function addSubscriber($userID, $token){
|
||||
if (!empty($userID) && !empty($token)) {
|
||||
$notificationSubscriber = $subDeviceId = Db::loadOne('SELECT id FROM notifications WHERE token = ?;', array($token));
|
||||
if ($notificationSubscriber == ''){
|
||||
$notification = array (
|
||||
'user_id' => $userID,
|
||||
'token' => $token,
|
||||
);
|
||||
Db::add ('notifications', $notification);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user