aboutsummaryrefslogtreecommitdiffstats
path: root/include/queue_fn.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-23 19:06:04 -0700
committerFriendika <info@friendika.com>2011-10-23 19:06:04 -0700
commitfe2c8a18454253df09f20c8821d7d6e14c0ea8e0 (patch)
tree0b92b6911bc718be7f4ac62eb87fadf3c9e0d094 /include/queue_fn.php
parent7cbb69d87f1cadaaf2f252e6cfb0963011d66556 (diff)
parent3512adda33328e8fbc9ccc810d2caf22513589a2 (diff)
downloadvolse-hubzilla-fe2c8a18454253df09f20c8821d7d6e14c0ea8e0.tar.gz
volse-hubzilla-fe2c8a18454253df09f20c8821d7d6e14c0ea8e0.tar.bz2
volse-hubzilla-fe2c8a18454253df09f20c8821d7d6e14c0ea8e0.zip
Merge branch 'master' into tag
Diffstat (limited to 'include/queue_fn.php')
-rw-r--r--include/queue_fn.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/queue_fn.php b/include/queue_fn.php
index 2168d42d7..3c1087f4e 100644
--- a/include/queue_fn.php
+++ b/include/queue_fn.php
@@ -26,7 +26,8 @@ function add_to_queue($cid,$network,$msg,$batch = false) {
if($batch_queue < 1)
$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)
);
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`)
VALUES ( %d, '%s', '%s', '%s', '%s', %d) ",
intval($cid),
+ dbesc($network),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc($msg),
intval(($batch) ? 1: 0)
);
+
}