From: Tim Starling Date: Sat, 13 Nov 2004 03:53:02 +0000 (+0000) Subject: Using a test for template namespace initialisation that's more likely to return true X-Git-Tag: 1.5.0alpha1~1362 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=127d4b2db82acb3eb07bc7382624bd7c72438059;p=lhc%2Fweb%2Fwiklou.git Using a test for template namespace initialisation that's more likely to return true --- diff --git a/maintenance/archives/moveCustomMessages.inc b/maintenance/archives/moveCustomMessages.inc index 2b28de1db8..2aa6dd2f84 100644 --- a/maintenance/archives/moveCustomMessages.inc +++ b/maintenance/archives/moveCustomMessages.inc @@ -7,11 +7,12 @@ /** */ function isTemplateInitialised() { + global $wgAllMessagesEn; $fname = 'isTemplateInitialised'; $dbw =& wfGetDB( DB_MASTER ); - $res = $dbw->select( 'cur', 1, array( 'cur_namespace' => NS_TEMPLATE ), $fname, array( 'LIMIT' => 1 ) ); - return $dbw->numRows( $res ) ? true : false; + $n = $dbw->selectField( 'cur', 'count(*)', array( 'cur_namespace' => NS_MEDIAWIKI ) ); + return $n > count( $wgAllMessagesEn ) ? false : true; } function moveCustomMessages( $phase ) {