6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
9/2/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#4953] Opera Mobile browser not detected correctly
*
Your Email Address
*
Spam protection
Enter the letters below:
.__.. . ..__..___ [__]| | || |[__ | ||/\|\__||__|[___
Comment
> Opera Mobile browser (not Opera Mini) has two modes of operation: one > where it identifies as a "Desktop" computer and one where it > identifies as a "Handheld." Both modes however are detected as a > non-mobile browser, making things like automatically using MIMP > instead of IMP impossible. > > > > I put in some debug statements: here's a user-agent string from Opera > Mobile as a desktop: > > > > Jan 27 01:55:10 HORDE [notice] [horde] mozilla/4.0 (compatible; msie > 6.0; windows nt 5.1; sv1) opera 8.60 [en] [on line 282 of > "/var/www/[mydomain]/htdocs/lib/Horde/Browser.php"] > > > > And as a handheld: > > > > Jan 27 01:54:03 HORDE [notice] [horde] mozilla/4.0 (compatible; msie > 6.0; windows ce; ppc; 240x320) opera 8.60 [en] [on line 282 of > "/var/www/[mydomain]/htdocs/lib/Horde/Browser.php"] > > > > Note that there is already code in Browser.php which will detect this: > > > > if (preg_match('/; > (120x160|240x280|240x320|320x320)\)/', $this->_agent)) { > > $this->_mobile = true; > > } > > > > However, this code currently is only executed in the Internet > Explorer section. Copying this code and moving it to the Opera > section, i.e. at line 296 of Browser.php, solved my problem, i.e. I > get sent to IMP or MIMP correctly depending on what Opera identifies > as. I didn't provide a patch because I wasn't sure if the best way > to solve this is to have this check repeated twice in the code for > the different browsers, or to pull it out and have it somewhere > higher up in the chain. > > > > Version of Browser.php: > > > > * $Horde: framework/Browser/Browser.php,v 1.153.2.47 2006/07/17 > 09:52:00 jan Exp $ > > > > from Gentoo Horde package version 3.1.3.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers