From: Brion Vibber Date: Sat, 29 Jan 2005 07:40:23 +0000 (+0000) Subject: A couple quick cur->page fixes. moveCustomMessages needs major overhaul X-Git-Tag: 1.5.0alpha1~823 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/?a=commitdiff_plain;h=eba31d01aec944fd95679773eb6b67f16cba523b;p=lhc%2Fweb%2Fwiklou.git A couple quick cur->page fixes. moveCustomMessages needs major overhaul --- diff --git a/maintenance/archives/moveCustomMessages.inc b/maintenance/archives/moveCustomMessages.inc index 5fb0d7ccbd..83664dca07 100644 --- a/maintenance/archives/moveCustomMessages.inc +++ b/maintenance/archives/moveCustomMessages.inc @@ -1,4 +1,5 @@ selectField( 'cur', 'count(*)', array( 'cur_namespace' => NS_MEDIAWIKI ) ); + $n = $dbw->selectField( 'page', 'count(*)', array( 'page_namespace' => NS_MEDIAWIKI ) ); return $n > count( $wgAllMessagesEn ) ? false : true; } @@ -36,7 +37,7 @@ function moveCustomMessages( $phase ) { $dbkeys[$title->getDBkey()] = 1; } - $res = $dbw->select( 'cur', array( 'cur_id', 'cur_title' ), array( 'cur_namespace' => NS_MEDIAWIKI ) ); + $res = $dbw->select( 'page', array( 'page_id', 'page_title' ), array( 'page_namespace' => NS_MEDIAWIKI ) ); # Compile target array $targets = array(); diff --git a/maintenance/rebuildMessages.php b/maintenance/rebuildMessages.php index c2bbb1bed8..40c8f602c0 100755 --- a/maintenance/rebuildMessages.php +++ b/maintenance/rebuildMessages.php @@ -33,7 +33,7 @@ if( isset( $options['rebuild'] ) ) $response = 2; if ( $response == 0 ) { $dbr =& wfGetDB( DB_SLAVE ); - $row = $dbr->selectRow( "cur", array("count(*) as c"), array("cur_namespace" => NS_MEDIAWIKI) ); + $row = $dbr->selectRow( "page", array("count(*) as c"), array("page_namespace" => NS_MEDIAWIKI) ); print "Current namespace size: {$row->c}\n"; print <<