From 840583dccde3ec4ca0a5a947d29b63a19fc3fbad Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 22 Oct 2005 13:25:10 +0200 Subject: fixes for wantedpages.php #558 darcs-hash:20051022112510-7ad00-1c24508af8f2b8a1a075aa0f6e8691b8107e81a0.gz --- bin/wantedpages.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/wantedpages.php b/bin/wantedpages.php index caa88dc78..b75b2baa3 100755 --- a/bin/wantedpages.php +++ b/bin/wantedpages.php @@ -1,6 +1,7 @@ #!/usr/bin/php -d short_open_tag=on : get help + -h, --help get help "; } @@ -67,8 +68,8 @@ function dw_get_pages($dir) { $pages = array_merge($pages, dw_get_pages($dir . '/' . $entry)); } else { $page = array( - 'id'=>substr(pathID($dir . '/' . $entry),$trunclen), - 'file'=>$dir . '/' . $entry, + 'id' => pathID(substr($dir.'/'.$entry,$trunclen)), + 'file'=> $dir.'/'.$entry, ); $pages[] = $page; } @@ -89,6 +90,7 @@ function dw_internal_links($page) { $mid = $ins[1][0]; resolve_pageid($cns,$mid,$exists); if ( !$exists ) { + list($mid) = explode('#',$mid); //record pages without hashs $links[] = $mid; } } @@ -117,6 +119,7 @@ if ( $OPTS->numArgs() == 1 ) { #------------------------------------------------------------------------------ $WANTED_PAGES = array(); + foreach ( dw_get_pages($START_DIR) as $WIKI_PAGE ) { $WANTED_PAGES = array_merge($WANTED_PAGES,dw_internal_links($WIKI_PAGE)); } -- cgit v1.2.3