aboutsummaryrefslogtreecommitdiffstats
path: root/include/queue.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-26 01:32:22 -0700
committerFriendika <info@friendika.com>2011-08-26 01:32:22 -0700
commit1861dc1fae549a0ee2b6287d4f7dc7f8797f5070 (patch)
tree3767bfd2137441070763e2af28fae3ca8e97196d /include/queue.php
parenta4739aef915c0083bc2020c66fe5361018259e00 (diff)
downloadvolse-hubzilla-1861dc1fae549a0ee2b6287d4f7dc7f8797f5070.tar.gz
volse-hubzilla-1861dc1fae549a0ee2b6287d4f7dc7f8797f5070.tar.bz2
volse-hubzilla-1861dc1fae549a0ee2b6287d4f7dc7f8797f5070.zip
don't allow fullscreen for youtube iframe - this makes it hard to visit the network page when they throw an error
Diffstat (limited to 'include/queue.php')
-rw-r--r--include/queue.php28
1 files changed, 23 insertions, 5 deletions
diff --git a/include/queue.php b/include/queue.php
index fe96a75ce..f1bcf2e9f 100644
--- a/include/queue.php
+++ b/include/queue.php
@@ -29,6 +29,11 @@ function queue_run($argv, $argc){
load_hooks();
+ if($argc > 1)
+ $queue_id = intval($argv[1]);
+ else
+ $queue_id = 0;
+
$deadguys = array();
logger('queue: start');
@@ -44,13 +49,19 @@ function queue_run($argv, $argc){
q("DELETE FROM `queue` WHERE `created` < UTC_TIMESTAMP() - INTERVAL 3 DAY");
}
- $r = q("SELECT `id` FROM `queue` WHERE `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ");
+ if($queue_id)
+ $r = q("SELECT `id` FROM `queue` WHERE `id` = %d LIMIT 1",
+ intval($queue_id)
+ );
+ else
+ $r = q("SELECT `id` FROM `queue` WHERE `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ");
if(! count($r)){
return;
}
- call_hooks('queue_predeliver', $a, $r);
+ if(! $queue_id)
+ call_hooks('queue_predeliver', $a, $r);
// delivery loop
@@ -63,9 +74,16 @@ function queue_run($argv, $argc){
// queue_predeliver hooks may have changed the queue db details,
// so check again if this entry still needs processing
- $qi = q("SELECT * FROM `queue` WHERE `id` = %d AND `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ",
- intval($q_item['id'])
- );
+ if($queue_id) {
+ $qi = q("select * from queue where `id` = %d limit 1",
+ intval($queue_id)
+ );
+ }
+ else {
+ $qi = q("SELECT * FROM `queue` WHERE `id` = %d AND `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ",
+ intval($q_item['id'])
+ );
+ }
if(! count($qi))
continue;