aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-23 01:54:51 -0700
committerFriendika <info@friendika.com>2011-10-23 01:54:51 -0700
commit0b2c5bf8f54326626c28906c7181e546b56e6c44 (patch)
treea2f4023f8647b163d16fc3ab5e825dcfa31dc8d9 /include
parentb6f80e8ee77db87cddcfbb642db057baad9dc874 (diff)
downloadvolse-hubzilla-0b2c5bf8f54326626c28906c7181e546b56e6c44.tar.gz
volse-hubzilla-0b2c5bf8f54326626c28906c7181e546b56e6c44.tar.bz2
volse-hubzilla-0b2c5bf8f54326626c28906c7181e546b56e6c44.zip
fix queue_fns
Diffstat (limited to 'include')
-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)
);
+
}