MediaWiki
REL1_19
|
00001 <?php 00027 require_once( dirname( __FILE__ ) . '/Maintenance.php' ); 00028 00029 class DumpSisterSites extends Maintenance { 00030 public function __construct() { 00031 parent::__construct(); 00032 $this->mDescription = "Quickie page name dump script for SisterSites usage"; 00033 } 00034 00035 public function execute() { 00036 $dbr = wfGetDB( DB_SLAVE ); 00037 $dbr->bufferResults( false ); 00038 $result = $dbr->select( 'page', 00039 array( 'page_namespace', 'page_title' ), 00040 array( 'page_namespace' => NS_MAIN, 00041 'page_is_redirect' => 0, 00042 ), 00043 __METHOD__ ); 00044 00045 foreach ( $result as $row ) { 00046 $title = Title::makeTitle( $row->page_namespace, $row->page_title ); 00047 $url = $title->getFullUrl(); 00048 $text = $title->getPrefixedText(); 00049 $this->output( "$url $text\n" ); 00050 } 00051 } 00052 } 00053 00054 $maintClass = "DumpSisterSites"; 00055 require_once( RUN_MAINTENANCE_IF_MAIN );