http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73973

Revision: 73973
Author:   kaldari
Date:     2010-09-29 19:06:40 +0000 (Wed, 29 Sep 2010)

Log Message:
-----------
disabling geolookup if unneeded

Modified Paths:
--------------
    trunk/extensions/CentralNotice/CentralNotice.php

Modified: trunk/extensions/CentralNotice/CentralNotice.php
===================================================================
--- trunk/extensions/CentralNotice/CentralNotice.php    2010-09-29 19:06:32 UTC 
(rev 73972)
+++ trunk/extensions/CentralNotice/CentralNotice.php    2010-09-29 19:06:40 UTC 
(rev 73973)
@@ -145,8 +145,11 @@
 
        $centralLoader = SpecialPage::getTitleFor( 'BannerController' 
)->getLocalUrl();
 
-       // Insert the geo IP lookup into the <head>
-       $wgOut->addScriptFile( 'http://geoiplookup.wikimedia.org/' );
+       $dbr = wfGetDB( DB_SLAVE );
+       $row = $dbr->selectRow( 'cn_notices', 'not_name', array( 'not_enabled = 
1', 'not_geo = 1' ) );
+       if ( $row ) {
+               $wgOut->addScriptFile( 'http://geoiplookup.wikimedia.org/' );
+       }
        
        // Insert the banner controller Javascript into the <head>
        $wgOut->addScriptFile( $centralLoader );



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to