r70755 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70754‎ | r70755 | r70756 >
Date:08:05, 9 August 2010
Author:tstarling
Status:ok (Comments)
Tags:
Comment:
Revert r70047, causes fatal error. Besides, the idea of it is incorrect: wf and $wg are preferred for extensions, please correct any documentation you see that says otherwise.
Modified paths:
  • /trunk/extensions/WikimediaMobile/WikimediaMobile.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaMobile/WikimediaMobile.php
@@ -19,7 +19,7 @@
2020 /**
2121 * Increment this when the JS file changes
2222 */
23 -$egWikimediaMobileVersion = '2';
 23+$wgWikimediaMobileVersion = '2';
2424
2525 /**
2626 * The base URL of the mobile gateway
@@ -27,19 +27,19 @@
2828 $wgWikimediaMobileUrl = 'http://en.m.wikipedia.org/wiki';
2929
3030
31 -$wgHooks['BeforePageDisplay'][] = 'efWikimediaMobileAddJs';
32 -$wgHooks['MakeGlobalVariablesScript'][] = 'efWikimediaMobileVars';
 31+$wgHooks['BeforePageDisplay'][] = 'wfWikimediaMobileAddJs';
 32+$wgHooks['MakeGlobalVariablesScript'][] = 'wfWikimediaMobileVars';
3333
3434 function wfWikimediaMobileAddJs( &$outputPage, &$skin ) {
35 - global $wgOut, $wgExtensionAssetsPath, $egWikimediaMobileVersion;
 35+ global $wgOut, $wgExtensionAssetsPath, $wgWikimediaMobileVersion;
3636
3737 $wgOut->addScript( Html::linkedScript(
38 - "$egExtensionAssetsPath/WikimediaMobile/MobileRedirect.js?$egWikimediaMobileVersion"
 38+ "$wgExtensionAssetsPath/WikimediaMobile/MobileRedirect.js?$wgWikimediaMobileVersion"
3939 ) );
4040 return true;
4141 }
4242
43 -function efWikimediaMobileVars( &$vars ) {
 43+function wfWikimediaMobileVars( &$vars ) {
4444 global $wgWikimediaMobileUrl;
4545 $vars['wgWikimediaMobileUrl'] = $wgWikimediaMobileUrl;
4646 return true;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70047Prefer ef $eg for extensions.platonides21:34, 27 July 2010

Comments

#Comment by Jack Phoenix (talk | contribs)   10:31, 9 August 2010

It seems that Cneubauer added the part about preferring eg/ef to Manual:Coding conventions in August 2007. I have corrected the documentation.

#Comment by Platonides (talk | contribs)   14:07, 9 August 2010

Silly me for forgetting wfWikimediaMobileAddJs. Thanks Jack.

#Comment by Krinkle (talk | contribs)   23:39, 16 January 2011

See also:

Status & tagging log