aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-05-27 05:27:35 -0700
committerfriendica <info@friendica.com>2013-05-27 05:27:35 -0700
commitdf32c93d562f0dfcc28ebf36723ef07dab630b90 (patch)
tree9ccbff9a691d896409c23024502b3a11e3e1db9c /include/poller.php
parent5c1f959c1828066358ec868ffb953e88f16195c6 (diff)
downloadvolse-hubzilla-df32c93d562f0dfcc28ebf36723ef07dab630b90.tar.gz
volse-hubzilla-df32c93d562f0dfcc28ebf36723ef07dab630b90.tar.bz2
volse-hubzilla-df32c93d562f0dfcc28ebf36723ef07dab630b90.zip
zidify img links, delay notifier until actually published for time travelling posts
Diffstat (limited to 'include/poller.php')
-rw-r--r--include/poller.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/poller.php b/include/poller.php
index 43c7b497b..433bc8caf 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -41,12 +41,20 @@ function poller_run($argv, $argc){
// publish any applicable items that were set to be published in the future
// (time travel posts)
- q("update item set item_restrict = ( item_restrict ^ %d )
- where ( item_restrict & %d ) and created <= UTC_TIMESTAMP() ",
- intval(ITEM_DELAYED_PUBLISH),
+ $r = q("select id from item where ( item_restrict & %d ) and created <= UTC_TIMESTAMP() ",
intval(ITEM_DELAYED_PUBLISH)
);
-
+ if($r) {
+ foreach($r as $rr) {
+ $x = q("update item set item_restrict = ( item_restrict ^ %d ) where id = %d limit 1",
+ intval(ITEM_DELAYED_PUBLISH),
+ intval($rr['id'])
+ );
+ if($x) {
+ proc_run('php','include/notifer.php','wall-new',$rr['id']);
+ }
+ }
+ }
$abandon_days = intval(get_config('system','account_abandon_days'));
if($abandon_days < 1)