r90022 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90021‎ | r90022 | r90023 >
Date:00:06, 14 June 2011
Author:preilly
Status:ok (Comments)
Tags:
Comment:
"home" link on the RTL wiki leads to the English mobile main page
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)
  • /trunk/extensions/MobileFrontend/images/w.gif (added) (history)
  • /trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/images/w.gif
Cannot display: file marked as a binary type.
svn:mime-type = image/gif
Property changes on: trunk/extensions/MobileFrontend/images/w.gif
___________________________________________________________________
Added: svn:mime-type
11 + image/gif
Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -48,7 +48,7 @@
4949 'onOutputPageBeforeHTML' );
5050
5151 class ExtMobileFrontend {
52 - const VERSION = '0.4.7';
 52+ const VERSION = '0.4.8';
5353
5454 private $doc;
5555
@@ -60,6 +60,8 @@
6161 public static $code;
6262 public static $device;
6363 public static $headings;
 64+ public static $mainPageUrl;
 65+ public static $randomPageUrl;
6466
6567 public $itemsToRemove = array(
6668 '#contentSub', # redirection notice
@@ -116,6 +118,9 @@
117119 self::$dir = $wgContLang->getDir();
118120 self::$code = $wgContLang->getCode();
119121
 122+ self::$mainPageUrl = Title::newMainPage()->getFullUrl();
 123+ self::$randomPageUrl = SpecialPage::getTitleFor( 'Random' )->getFullUrl();
 124+
120125 try {
121126 $wurflConfigFile = RESOURCES_DIR . 'wurfl-config.xml';
122127 $wurflConfig = new WURFL_Configuration_XmlConfig( $wurflConfigFile );
Index: trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php
@@ -1,10 +1,13 @@
22 <?php
33 $searchField = (!empty($_GET['search'])) ? $_GET['search'] : '';
44
 5+$mainPageUrl = self::$mainPageUrl;
 6+$randomPageUrl = self::$randomPageUrl;
 7+
58 $searchWebkitHtml = <<<EOD
69 <div id='header'>
710 <div id='searchbox'>
8 - <img alt='W logo' id='logo' src='http://en.m.wikipedia.org/images/w.gif' />
 11+ <img alt='W logo' id='logo' src='/extensions/MobileFrontend/images/w.gif' />
912 <form action='/index.php' class='search_bar' method='get'>
1013 <input type="hidden" value="Special:Search" name="title" />
1114 <input type="hidden" value="Search" name="fulltext" />
@@ -14,8 +17,8 @@
1518 </form>
1619 </div>
1720 <div class='nav' id='nav'>
18 - <form method="get" action="/"><button type="submit" id="homeButton">{$homeButton}</button></form>
19 - <form method="get" action="/index.php/Special:Random"><button type="submit" id="randomButton">{$randomButton}</button></form>
 21+ <form method="get" action="{$mainPageUrl}"><button type="submit" id="homeButton">{$homeButton}</button></form>
 22+ <form method="get" action="{$randomPageUrl}"><button type="submit" id="randomButton">{$randomButton}</button></form>
2023 </div>
2124 </div>
2225 EOD;

Sign-offs

UserFlagDate
Nikerabbitinspected12:25, 14 June 2011

Comments

#Comment by Nikerabbit (talk | contribs)   12:25, 14 June 2011

Addition w.gif was unmentioned in commit message.

Status & tagging log