aboutsummaryrefslogtreecommitdiffstats
path: root/include/importdoc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/importdoc.php')
-rwxr-xr-xinclude/importdoc.php22
1 files changed, 16 insertions, 6 deletions
diff --git a/include/importdoc.php b/include/importdoc.php
index 9cce35c50..10f868697 100755
--- a/include/importdoc.php
+++ b/include/importdoc.php
@@ -1,17 +1,30 @@
<?php
+
+
require_once('include/cli_startup.php');
-cli_startup();
-require_once('mod/help.php');
+function importdoc_run($argv, $argc){
+
+ cli_startup();
+
+ require_once('mod/help.php');
+
+
+ update_docs_dir('doc/*');
+
+}
+if (array_search(__file__,get_included_files())===0){
+ importdoc_run($argv,$argc);
+ killme();
+}
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) {
@@ -25,7 +38,4 @@ function update_docs_dir($s) {
}
}
-update_docs_dir('doc/*');
-
-