fix queue_fns
This commit is contained in:
parent
b6f80e8ee7
commit
0b2c5bf8f5
|
@ -26,7 +26,8 @@ function add_to_queue($cid,$network,$msg,$batch = false) {
|
||||||
if($batch_queue < 1)
|
if($batch_queue < 1)
|
||||||
$batch_queue = 1000;
|
$batch_queue = 1000;
|
||||||
|
|
||||||
$r = q("SELECT COUNT(*) AS `total` FROM `queue` left join `contact` WHERE ``queue`.`cid` = %d AND `contact`.`self` = 0 ",
|
$r = q("SELECT COUNT(*) AS `total` FROM `queue` left join `contact` ON `queue`.`cid` = `contact`.`id`
|
||||||
|
WHERE `queue`.`cid` = %d AND `contact`.`self` = 0 ",
|
||||||
intval($cid)
|
intval($cid)
|
||||||
);
|
);
|
||||||
if($r && count($r)) {
|
if($r && count($r)) {
|
||||||
|
@ -43,9 +44,11 @@ function add_to_queue($cid,$network,$msg,$batch = false) {
|
||||||
q("INSERT INTO `queue` ( `cid`, `network`, `created`, `last`, `content`, `batch`)
|
q("INSERT INTO `queue` ( `cid`, `network`, `created`, `last`, `content`, `batch`)
|
||||||
VALUES ( %d, '%s', '%s', '%s', '%s', %d) ",
|
VALUES ( %d, '%s', '%s', '%s', '%s', %d) ",
|
||||||
intval($cid),
|
intval($cid),
|
||||||
|
dbesc($network),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
dbesc($msg),
|
dbesc($msg),
|
||||||
intval(($batch) ? 1: 0)
|
intval(($batch) ? 1: 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue