summaryrefslogtreecommitdiff
path: root/bin/wantedpages.php
diff options
context:
space:
mode:
authorGerry Weißbach <gerry.w@gammaproduction.de>2014-12-22 10:31:30 +0100
committerGerry Weißbach <gerry.w@gammaproduction.de>2014-12-22 10:31:30 +0100
commit8da2ebf4f4261eb8f54df5704b5d9af283b5402d (patch)
tree9c63975e3898c949e1784e30e81a5ed3da7fca93 /bin/wantedpages.php
parent5e7f4d50cbbc788c9c0483a0a2ff1b536e4ffe8c (diff)
parent1bf4abb07f65e28578bae98aad457cb768d8b44f (diff)
downloadrpg-8da2ebf4f4261eb8f54df5704b5d9af283b5402d.tar.gz
rpg-8da2ebf4f4261eb8f54df5704b5d9af283b5402d.tar.bz2
Merge remote-tracking branch 'splitbrain/master'
Diffstat (limited to 'bin/wantedpages.php')
-rwxr-xr-xbin/wantedpages.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/wantedpages.php b/bin/wantedpages.php
index 8fc4ba74f..54bfd4755 100755
--- a/bin/wantedpages.php
+++ b/bin/wantedpages.php
@@ -61,6 +61,13 @@ class WantedPagesCLI extends DokuCLI {
}
}
+ /**
+ * Determine directions of the search loop
+ *
+ * @param string $entry
+ * @param string $basepath
+ * @return int
+ */
protected function dir_filter($entry, $basepath) {
if($entry == '.' || $entry == '..') {
return WantedPagesCLI::DIR_CONTINUE;
@@ -77,6 +84,13 @@ class WantedPagesCLI extends DokuCLI {
return WantedPagesCLI::DIR_CONTINUE;
}
+ /**
+ * Collects recursively the pages in a namespace
+ *
+ * @param string $dir
+ * @return array
+ * @throws DokuCLI_Exception
+ */
protected function get_pages($dir) {
static $trunclen = null;
if(!$trunclen) {
@@ -108,6 +122,12 @@ class WantedPagesCLI extends DokuCLI {
return $pages;
}
+ /**
+ * Parse instructions and returns the non-existing links
+ *
+ * @param array $page array with page id and file path
+ * @return array
+ */
function internal_links($page) {
global $conf;
$instructions = p_get_instructions(file_get_contents($page['file']));