diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-08-30 22:46:00 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-08-30 22:46:00 -0700 |
commit | c865f17dc0b56be926ae43cd3e4318498e03ad97 (patch) | |
tree | 0ee9a5e706ad2d5b37af31b69ea39787f59ec932 /include | |
parent | e23f86faa91f6b12ad499d27d3a06a6873230714 (diff) | |
download | volse-hubzilla-c865f17dc0b56be926ae43cd3e4318498e03ad97.tar.gz volse-hubzilla-c865f17dc0b56be926ae43cd3e4318498e03ad97.tar.bz2 volse-hubzilla-c865f17dc0b56be926ae43cd3e4318498e03ad97.zip |
schedule a doco update once weekly
Diffstat (limited to 'include')
-rwxr-xr-x | include/importdoc.php | 31 | ||||
-rw-r--r-- | include/poller.php | 3 |
2 files changed, 34 insertions, 0 deletions
diff --git a/include/importdoc.php b/include/importdoc.php new file mode 100755 index 000000000..9cce35c50 --- /dev/null +++ b/include/importdoc.php @@ -0,0 +1,31 @@ +<?php + +require_once('include/cli_startup.php'); + +cli_startup(); + +require_once('mod/help.php'); + +function update_docs_dir($s) { + $f = basename($s); + $d = dirname($s); + if($s === 'doc/html') + return; + + $files = glob("$d/$f"); + if($files) { + foreach($files as $fi) { + if($fi === 'doc/html') + continue; + if(is_dir($fi)) + update_docs_dir("$fi/*"); + else + store_doc_file($fi); + } + } +} + +update_docs_dir('doc/*'); + + + diff --git a/include/poller.php b/include/poller.php index f44298a9f..030394486 100644 --- a/include/poller.php +++ b/include/poller.php @@ -175,6 +175,9 @@ function poller_run($argv, $argc){ logger('regdir: ' . print_r(z_fetch_url(get_directory_primary() . '/regdir?f=&url=' . urlencode(z_root()) . '&realm=' . urlencode(get_directory_realm())),true)); } + + proc_run('php', 'include/importdoc.php'); + /** * End Cron Weekly */ |