http://www.mediawiki.org/wiki/Special:Code/MediaWiki/74007
Revision: 74007
Author: kaldari
Date: 2010-09-30 00:16:34 +0000 (Thu, 30 Sep 2010)
Log Message:
-----------
just in case
Modified Paths:
--------------
trunk/extensions/CentralNotice/CentralNotice.php
Modified: trunk/extensions/CentralNotice/CentralNotice.php
===================================================================
--- trunk/extensions/CentralNotice/CentralNotice.php 2010-09-29 23:57:53 UTC
(rev 74006)
+++ trunk/extensions/CentralNotice/CentralNotice.php 2010-09-30 00:16:34 UTC
(rev 74007)
@@ -145,11 +145,13 @@
$centralLoader = SpecialPage::getTitleFor( 'BannerController'
)->getLocalUrl();
- $dbr = wfGetDB( DB_SLAVE, array(), $wgCentralDBname );
- $row = $dbr->selectRow( 'cn_notices', 'not_name', array( 'not_enabled =
1', 'not_geo = 1' ) );
- if ( $row ) {
- // Insert the geo IP lookup into the <head>
- $wgOut->addScriptFile( 'http://geoiplookup.wikimedia.org/' );
+ if ( $wgCentralDBname ) {
+ $dbr = wfGetDB( DB_SLAVE, array(), $wgCentralDBname );
+ $row = $dbr->selectRow( 'cn_notices', 'not_name', array(
'not_enabled = 1', 'not_geo = 1' ) );
+ if ( $row ) {
+ // Insert the geo IP lookup into the <head>
+ $wgOut->addScriptFile(
'http://geoiplookup.wikimedia.org/' );
+ }
}
// Insert the banner controller Javascript into the <head>
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs