r34929 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34928‎ | r34929 | r34930 >
Date:18:50, 16 May 2008
Author:nhuffschmid
Status:old
Tags:
Comment:
improved hawhaw lib: support of Palm Treo and other devices
Modified paths:
  • /trunk/wap/hawhaw/hawhaw.inc (modified) (history)

Diff [purge]

Index: trunk/wap/hawhaw/hawhaw.inc
@@ -3,7 +3,7 @@
44 // HAWHAW: HTML and WML hybrid adapted webserver
55 // PHP class library
66 // Copyright (C) 2008 Norbert Huffschmid
7 -// Last modified: 6. April 2008
 7+// Last modified: 14. May 2008
88 //
99 // This library is free software; you can redistribute it and/or modify it under the
1010 // terms of the GNU Library General Public License as published by the Free Software
@@ -21,8 +21,13 @@
2222 // For further information about this library and its license terms please visit:
2323 // http://www.hawhaw.de/
2424 //
25 -// changes against V5.17:
26 -// - consider additional XHTML devices: Aspen Simulator and Android
 25+// changes against V5.18:
 26+// improved browser detection for:
 27+// - PalmOS
 28+// - Minimo
 29+// - PIE
 30+// - Blackberry
 31+// - Nintendo DS
2732
2833 ###################################
2934 # BEGIN OF CONFIGURATION PART #
@@ -43,7 +48,7 @@
4449 ###################################
4550
4651 // miscellaneous constants
47 -define("HAW_HAW_VERSION", "HAWHAW V5.18B");
 52+define("HAW_HAW_VERSION", "HAWHAW V5.19B");
4853 define("HAW_COPYRIGHT", "(C) Norbert Huffschmid");
4954 if (defined("HAW_TERA_WURFL_PATH"))
5055 define("HAW_VERSION", HAW_HAW_VERSION . "/Tera-WURFL");
@@ -2353,6 +2358,7 @@
23542359 strstr($ua_low, "lynx") ||
23552360 strstr($ua_low, "avantgo") ||
23562361 strstr($ua_low, "pendragonweb") ||
 2362+ strstr($ua_low, "blackberry") ||
23572363 strstr($ua_low, "j-"))
23582364 $this->ml = HAW_HTML; // HTML-based browser
23592365 else
@@ -2393,8 +2399,15 @@
23942400 strstr($ua_low, "reqwirelessweb") ||
23952401 strstr($ua_low, "pendragonweb") ||
23962402 strstr($ua_low, "palmos") ||
 2403+ strstr($ua_low, "palmsource") ||
 2404+ strstr($ua_low, "/palm") ||
23972405 strstr($ua_low, "windows ce") ||
2398 - strstr(strtolower($HTTP_UA_OS), "windows ce") ||
 2406+ strstr($ua_low, "minimo") ||
 2407+ strstr($ua_low, "wm5 pie") ||
 2408+ strstr($ua_low, "wm6 pie") ||
 2409+ strstr($ua_low, "blackberry") ||
 2410+ strstr($ua_low, "nitro)") ||
 2411+ strstr(strtolower($HTTP_UA_OS), "windows ce") ||
23992412 strstr($HTTP_USER_AGENT, "Mozilla/4.7"))
24002413 {
24012414 // PDA browser detected (or poor old Netscape 4.7x which messes with CSS)

Status & tagging log