r78416 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78415‎ | r78416 | r78417 >
Date:00:24, 15 December 2010
Author:reedy
Status:deferred
Tags:
Comment:
Followup r78408, add missing <?php, fix syntax errors from missing global and in to as
Modified paths:
  • /trunk/extensions/OWALiteTracker/OWALiteTracker.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OWALiteTracker/OWALiteTracker.php
@@ -1,5 +1,5 @@
 2+<?php
23
3 -
44 //Must come after "CentralNotice", which creates the "Geo" object
55
66 $wgHooks['SkinAfterBottomScripts'][] = 'efOWALiteTracker';
@@ -9,9 +9,13 @@
1010 );
1111
1212 function efOWALiteTracker($skin, &$text){
13 - if( count( $wgOWAGeoTrackSites ) <= 0 ){ return; }
 13+ global $wgOWAGeoTrackSites;
 14+
 15+ if( !count( $wgOWAGeoTrackSites ) ) {
 16+ return;
 17+ }
1418 $text .= "<script> var includeOWA = false; if(Geo){";
15 - foreach($condition in $wgOWAGeoTrackSites){
 19+ foreach( $condition as $wgOWAGeoTrackSites ){
1620 $text .= "if (Geo.{$condition[0]} && Geo.{$condition[0]} == \"{$condition[1]}\"){ if(!includeOWA){includeOWA=true; importScriptURI( document.location.protocol +'//owa.wikimedia.org/owa/modules/base/js/owa.tracker-combined-min.js');} importScriptURI( document.location.protocol + '//owa.wikimedia.org/resources/{$condition[2]}');}";
1721 }
1822 $text .= "}</script>";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78408Added OWALiteTracker filenimishg23:09, 14 December 2010

Status & tagging log