--list : list special pages names
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 23 Oct 2005 11:39:17 +0000 (11:39 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 23 Oct 2005 11:39:17 +0000 (11:39 +0000)
maintenance/updateSpecialPages.php

index 0db2aef..15191b6 100644 (file)
@@ -11,6 +11,7 @@ require_once( 'QueryPage.php' );
 if(@$options['help']) {
        print "usage:updateSpecialPages.php [--help] [--only=page]\n";
        print "  --help      : this help message\n";
+       print "  --list      : list special pages names\n";
        print "  --only=page : only update 'page'. Ex: --only=BrokenRedirects\n";
        die();
 }
@@ -21,6 +22,12 @@ $dbw =& wfGetDB( DB_MASTER );
 foreach ( $wgQueryPages as $page ) {
        @list( $class, $special, $limit ) = $page;
 
+       # --list : just show the name of pages
+       if( @$options['list'] ) {
+               print "$special\n";
+               continue;
+       }
+
        $specialObj = SpecialPage::getPage( $special );
        if ( !$specialObj ) {
                print "No such special page: $special\n";