aboutsummaryrefslogtreecommitdiffstats
path: root/include/directory.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-02-25 16:33:40 +0100
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-02-25 16:33:40 +0100
commit0a98f6b878ec89be7282621192d9daf80f125e6c (patch)
tree718a4771ce1fb86931531226898b0b5d00e4a337 /include/directory.php
parent34d30e4d7eb48bd801482531a0d775328bd43ab4 (diff)
parentb1021df485fb6129acda5bba616bac10aea75a45 (diff)
downloadvolse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.gz
volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.bz2
volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.zip
Merge pull request #1 from friendica/master
Update this fork
Diffstat (limited to 'include/directory.php')
-rw-r--r--include/directory.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/directory.php b/include/directory.php
index 491240a9d..794420b6f 100644
--- a/include/directory.php
+++ b/include/directory.php
@@ -10,9 +10,13 @@ function directory_run($argv, $argc){
cli_startup();
- if($argc != 2)
+ if($argc < 2)
return;
+ $force = false;
+ if(($argc > 2) && ($argv[2] === 'force'))
+ $force = true;
+
logger('directory update', LOGGER_DEBUG);
$dirmode = get_config('system','directory_mode');
@@ -29,7 +33,8 @@ function directory_run($argv, $argc){
if(($dirmode == DIRECTORY_MODE_PRIMARY) || ($dirmode == DIRECTORY_MODE_STANDALONE)) {
- syncdirs($argv[1]);
+
+ local_dir_update($argv[1],$force);
q("update channel set channel_dirdate = '%s' where channel_id = %d limit 1",
dbesc(datetime_convert()),
@@ -53,7 +58,7 @@ function directory_run($argv, $argc){
// ensure the upstream directory is updated
- $packet = zot_build_packet($channel,'refresh');
+ $packet = zot_build_packet($channel,(($force) ? 'force_refresh' : 'refresh'));
$z = zot_zot($url,$packet);
// re-queue if unsuccessful