Index: trunk/extensions/WikimediaMobile/WikimediaMobile.php |
— | — | @@ -24,8 +24,9 @@ |
25 | 25 | /** |
26 | 26 | * The base URL of the mobile gateway |
27 | 27 | */ |
28 | | -$wgWikimediaMobileUrl = '.m.wikipedia.org'; |
| 28 | +$wgWikimediaMobileUrl = 'http://en.m.wikipedia.org/wiki'; |
29 | 29 | |
| 30 | + |
30 | 31 | $wgHooks['BeforePageDisplay'][] = 'wfWikimediaMobileAddJs'; |
31 | 32 | $wgHooks['MakeGlobalVariablesScript'][] = 'wfWikimediaMobileVars'; |
32 | 33 | |
Index: trunk/extensions/WikimediaMobile/MobileRedirect.js |
— | — | @@ -15,10 +15,13 @@ |
16 | 16 | |
17 | 17 | function getMobileUrl() { |
18 | 18 | var mainPage = wgMainPageTitle.replace(/ /g, '_'); |
19 | | - var url = 'http://' + wgContentLanguage + ".m.wikipedia.org/"; |
20 | | - if (wgPageName != mainPage) { |
21 | | - url += "wiki/" + encodeURI(wgPageName); |
| 19 | + var url = wgWikimediaMobileUrl + '/'; |
| 20 | + if (wgPageName == mainPage) { |
| 21 | + url += '::Home'; // Special case |
| 22 | + } else { |
| 23 | + url += encodeURI(wgPageName); |
22 | 24 | } |
| 25 | + url += '?wasRedirected=true'; |
23 | 26 | return url; |
24 | 27 | } |
25 | 28 | |