You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(!$rec["PLUGINS_ID"]) returnjson_encode(array('status' => false, 'error' => 'Only extension plugins allowed! Not system plugins!'));
849
846
850
-
if(SQLSelectOne("SELECT COUNT(*) AS TOTAL_UNREAD FROM `plugins_noty` WHERE `PLUGINS_ID` = '".$rec["PLUGINS_ID"]."' AND `READ` = '0'")['TOTAL_UNREAD'] > 10) {
847
+
if(SQLSelectOne("SELECT COUNT(*) AS TOTAL_UNREAD FROM `module_notifications` WHERE `MODULE_NAME` = '".$rec["MODULE_NAME"]."' AND `IS_READ` = '0'")['TOTAL_UNREAD'] > 10) {
851
848
returnjson_encode(array('status' => false, 'error' => 'More than 10 notifications in the unread status.'));
852
849
}
853
850
854
-
$ifExest = SQLSelectOne("SELECT ID FROM `plugins_noty` WHERE `MESSAGE` = '".$str."' AND `READ` = '0'");
855
-
856
-
if(!empty($ifExest) && is_array($ifExest)) {
857
-
returnjson_encode(array('status' => false, 'error' => 'Such a record already exists. ID - '.$ifExest['ID'], 'id' => $ifExest['ID']));
851
+
$ifExist = SQLSelectOne("SELECT ID FROM `module_notifications` WHERE `MESSAGE` = '".DBSafe($rec['MESSAGE'])."' AND TYPE='".DBSafe($rec['TYPE'])."' AND `IS_READ` = '0'");
0 commit comments