r107650 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107649‎ | r107650 | r107651 >
Date:19:29, 30 December 2011
Author:preilly
Status:deferred
Tags:mobile 
Comment:
add additional functionality
Modified paths:
  • /trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php (modified) (history)
  • /trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.body.php
@@ -411,19 +411,6 @@
412412 }
413413
414414 /**
415 - * Returns the number of seconds an item should stay in cache
416 - *
417 - * @return int: Time in seconds
418 - */
419 - private static function getMaxAge() {
420 - wfProfileIn( __METHOD__ );
421 - // add 10 seconds to cater for the time deviation between servers
422 - $expiry = self::todaysStart() + 24 * 3600 - wfTimestamp() + 10;
423 - wfProfileOut( __METHOD__ );
424 - return min( $expiry, 3600 );
425 - }
426 -
427 - /**
428415 * Returns the Unix timestamp of current day's first second
429416 *
430417 * @return int: Timestamp
@@ -447,6 +434,19 @@
448435 }
449436
450437 /**
 438+ * Returns the number of seconds an item should stay in cache
 439+ *
 440+ * @return int: Time in seconds
 441+ */
 442+ private static function getMaxAge() {
 443+ wfProfileIn( __METHOD__ );
 444+ // add 10 seconds to cater for the time deviation between servers
 445+ $expiry = self::todaysStart() + 24 * 3600 - wfTimestamp() + 10;
 446+ wfProfileOut( __METHOD__ );
 447+ return min( $expiry, 3600 );
 448+ }
 449+
 450+ /**
451451 * Get full country name from code
452452 *
453453 * @param string $code: alpha-2 code ISO 3166 country code
Index: trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.i18n.php
@@ -24,11 +24,13 @@
2525 'zero-rated-mobile-access-banner-text-data-charges-yes' => 'Yes',
2626 'zero-rated-mobile-access-banner-text-data-charges-no' => 'No',
2727 );
 28+
2829 $messages['ja'] = array (
2930 'zero-rated-mobile-access-desc' => 'ゼロ格モバイルアクセス',
3031 'zero-rated-mobile-access-search' => '検索する',
3132 'zero-rated-mobile-access-language-options-wiki-page' => 'Language_options',
3233 );
 34+
3335 $messages['qqq'] = array(
3436 'zero-rated-mobile-access-desc' => '{{desc}}',
3537 'zero-rated-mobile-access-search' => 'Text for search action on the search button',

Status & tagging log