aboutsummaryrefslogtreecommitdiffstats
path: root/include/directory.php
diff options
context:
space:
mode:
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