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
thrownewSoapFault('permission_denied', 'You do not have the permissions to access this function.');
42
-
returnfalse;
43
42
}
44
43
45
44
$server_id = intval($server_id);
@@ -48,15 +47,15 @@ public function monitor_jobqueue_count($session_id, $server_id = 0)
48
47
$servers = $app->db->queryAllRecords("SELECT server_id, updated FROM server");
49
48
$sql = 'SELECT count(datalog_id) as jobqueue_count FROM sys_datalog WHERE ';
50
49
foreach($serversas$sv) {
51
-
$sql .= " (datalog_id > ".$sv['updated']." AND server_id = ".$sv['server_id'].") OR ";
50
+
$sql .= " (datalog_id > ".$sv['updated']." AND server_id IN (0,".$sv['server_id'].")) OR ";
52
51
}
53
52
$sql = substr($sql, 0, -4);
54
53
$tmp = $app->db->queryOneRecord($sql);
55
54
return$tmp['jobqueue_count'];
56
55
57
56
} else {
58
57
$server = $app->db->queryOneRecord("SELECT updated FROM server WHERE server_id = ?",$server_id);
59
-
$tmp = $app->db->queryOneRecord('SELECT count(datalog_id) as jobqueue_count FROM sys_datalog WHERE datalog_id > ?',$server['updated']);
58
+
$tmp = $app->db->queryOneRecord('SELECT count(datalog_id) as jobqueue_count FROM sys_datalog WHERE datalog_id > ? AND server_id IN ?',$server['updated'], array(0, $server_id));
0 commit comments