r104755 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104754‎ | r104755 | r104756 >
Date:21:29, 30 November 2011
Author:preilly
Status:ok
Tags:
Comment:
add profiling calls
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -87,7 +87,7 @@
8888 }
8989
9090 class ExtMobileFrontend {
91 - const VERSION = '0.5.84';
 91+ const VERSION = '0.5.85';
9292
9393 /**
9494 * @var DOMDocument
@@ -299,8 +299,10 @@
300300 * @return string
301301 */
302302 private function removeQueryStringParameter( $url, $field ) {
 303+ wfProfileIn( __METHOD__ );
303304 $url = preg_replace( '/(.*)(\?|&)' . $field . '=[^&]+?(&)(.*)/i', '$1$2$4', $url . '&' );
304305 $url = substr( $url, 0, -1 );
 306+ wfProfileOut( __METHOD__ );
305307 return $url;
306308 }
307309
@@ -394,6 +396,7 @@
395397 self::$mainPageUrl = Title::newMainPage()->getLocalUrl();
396398 self::$randomPageUrl = $this->getRelativeURL( SpecialPage::getTitleFor( 'Randompage' )->getLocalUrl() );
397399 wfProfileOut( __METHOD__ );
 400+ return true;
398401 }
399402
400403 /**
@@ -613,6 +616,7 @@
614617 self::$isBetaGroupMember = true;
615618 }
616619 wfProfileOut( __METHOD__ );
 620+ return true;
617621 }
618622
619623 /**
@@ -629,6 +633,7 @@
630634 $wgCookieDomain = $tempWgCookieDomain;
631635 $wgCookiePrefix = $tempWgCookiePrefix;
632636 wfProfileOut( __METHOD__ );
 637+ return true;
633638 }
634639
635640 private function getOptInOutCookie() {
@@ -684,6 +689,7 @@
685690 $wgRequest->response()->header( 'Pragma: no-cache' );
686691 }
687692 wfProfileOut( __METHOD__ );
 693+ return true;
688694 }
689695
690696 private function sendXDeviceVaryHeader() {
@@ -695,6 +701,7 @@
696702 }
697703 $wgOut->addVaryHeader( 'Cookie' );
698704 wfProfileOut( __METHOD__ );
 705+ return true;
699706 }
700707
701708 private function sendApplicationVersionVaryHeader() {
@@ -713,6 +720,7 @@
714721 }
715722 }
716723 wfProfileOut( __METHOD__ );
 724+ return true;
717725 }
718726
719727 /**
@@ -1360,6 +1368,7 @@
13611369
13621370 public static function buildLanguageSelection() {
13631371 global $wgLanguageCode;
 1372+ wfProfileIn( __METHOD__ );
13641373 $output = Html::openElement( 'select',
13651374 array( 'id' => 'languageselection',
13661375 'onchange' => 'javascript:navigateToLanguageSelection();' ) );
@@ -1375,6 +1384,7 @@
13761385 }
13771386 }
13781387 $output .= Html::closeElement( 'select', array() );
 1388+ wfProfileOut( __METHOD__ );
13791389 return $output;
13801390 }
13811391

Status & tagging log