r35981 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35980‎ | r35981 | r35982 >
Date:21:14, 6 June 2008
Author:brion
Status:old
Tags:
Comment:
Disable "simulator" -- give default browsers the same nice clean HTML we give to HTML-friendly mobile devices like the iPhone.
The "simulator" skin makes it harder to guage actual behavior, and tends to screw up unrecognized handheld devices by sending them a tiny image of a cell phone. :)
Also an escaping fix for images; indicates a serious problem upstream in the code, as the URL is not properly escaped at output level.
Modified paths:
  • /trunk/wap/hawhaw/hawhaw.inc (modified) (history)
  • /trunk/wap/hawiki/hawiki.inc (modified) (history)
  • /trunk/wap/hawiki/hawiki_parser_hawpedia.inc (modified) (history)
  • /trunk/wap/hawpedia.php (modified) (history)

Diff [purge]

Index: trunk/wap/hawhaw/hawhaw.inc
@@ -564,7 +564,7 @@
565565 var $hdmlcardset;
566566
567567 // browser dependent properties
568 - var $pureHTML = true; // Big-screen-HTML-code (default)
 568+ var $pureHTML = false; // Big-screen-HTML-code ("simulator", causes trouble with unrecognized devices)
569569 var $PDAstyle = false; // PDA browsers needs special HTML code
570570 var $iModestyle = false; // cHTML too
571571 var $upbrowser = false; // UP browser
Index: trunk/wap/hawpedia.php
@@ -31,7 +31,7 @@
3232 $deck->set_width(HAWIKI_DISP_WIDTH);
3333 $deck->set_height(HAWIKI_DISP_HEIGHT);
3434 $deck->set_disp_bgcolor(HAWIKI_DISP_BGCOLOR);
35 - $deck->use_simulator(HAWIKI_SKIN);
 35+// $deck->use_simulator(HAWIKI_SKIN);
3636 }
3737
3838 function hawpedia_error($error_msg)
Index: trunk/wap/hawiki/hawiki_parser_hawpedia.inc
@@ -197,7 +197,9 @@
198198 "name" => $imagename,
199199 "language" => $_SESSION["language"],
200200 "width" => $width );
201 - $po["src"] = "image.php?" . http_build_query($imageInfo, "", "&");
 201+ // Warning: need to use & here proves existence of horrible
 202+ // bad awful code upstream which doesn't produce output correctly.
 203+ $po["src"] = "image.php?" . http_build_query($imageInfo, "", "&");
202204
203205 $po["token"] = HAWIKI_TOKEN_IMAGE;
204206 return($po);
Index: trunk/wap/hawiki/hawiki.inc
@@ -140,8 +140,8 @@
141141 $this->deck->set_height(HAWIKI_DISP_HEIGHT);
142142 $this->deck->set_disp_bgcolor(HAWIKI_DISP_BGCOLOR);
143143
144 - if (defined('HAWIKI_SKIN'))
145 - $this->deck->use_simulator(HAWIKI_SKIN);
 144+ //if (defined('HAWIKI_SKIN'))
 145+ // $this->deck->use_simulator(HAWIKI_SKIN);
146146
147147 if (isset($lang) && (strlen($lang) == 2))
148148 {

Status & tagging log