aboutsummaryrefslogtreecommitdiffstats
path: root/include/directory.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/directory.php')
-rw-r--r--include/directory.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/directory.php b/include/directory.php
index 233899e88..794420b6f 100644
--- a/include/directory.php
+++ b/include/directory.php
@@ -13,6 +13,10 @@ function directory_run($argv, $argc){
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