aboutsummaryrefslogtreecommitdiffstats
path: root/include/directory.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2013-11-12 02:09:32 -0800
committerPaolo T <tuscanhobbit@users.noreply.github.com>2013-11-12 02:09:32 -0800
commit67a101452b82782114143dc0b5bdba15adc0ba99 (patch)
tree9daee3807b370d02ee4c28e6df7db08731fbb9f1 /include/directory.php
parentb23f3fc03b6bc751aab67fe2258a21f7c65bab8e (diff)
parent7cb4c2f8ad813336aafdec05e40f3a8eb1808d00 (diff)
downloadvolse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.gz
volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.bz2
volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.zip
Merge pull request #4 from friendica/master
Fork aligned to red master
Diffstat (limited to 'include/directory.php')
-rw-r--r--include/directory.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/directory.php b/include/directory.php
index 16f819805..491240a9d 100644
--- a/include/directory.php
+++ b/include/directory.php
@@ -31,6 +31,12 @@ function directory_run($argv, $argc){
if(($dirmode == DIRECTORY_MODE_PRIMARY) || ($dirmode == DIRECTORY_MODE_STANDALONE)) {
syncdirs($argv[1]);
+ q("update channel set channel_dirdate = '%s' where channel_id = %d limit 1",
+ dbesc(datetime_convert()),
+ intval($channel['channel_id'])
+ );
+
+
// Now update all the connections
proc_run('php','include/notifier.php','refresh_all',$channel['channel_id']);
return;
@@ -53,6 +59,10 @@ function directory_run($argv, $argc){
// re-queue if unsuccessful
if(! $z['success']) {
+
+ // FIXME - we aren't updating channel_dirdate if we have to queue
+ // the directory packet. That means we'll try again on the next poll run.
+
$hash = random_string();
q("insert into outq ( outq_hash, outq_account, outq_channel, outq_posturl, outq_async, outq_created, outq_updated, outq_notify, outq_msg )
values ( '%s', %d, %d, '%s', %d, '%s', '%s', '%s', '%s' )",
@@ -67,6 +77,12 @@ function directory_run($argv, $argc){
dbesc('')
);
}
+ else {
+ q("update channel set channel_dirdate = '%s' where channel_id = %d limit 1",
+ dbesc(datetime_convert()),
+ intval($channel['channel_id'])
+ );
+ }
// Now update all the connections