View Issue Details

IDProjectCategoryView StatusLast Update
0013740mantisbtbugtrackerpublic2015-06-14 08:26
Reportervboctor Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version1.2.9Fixed in Version1.2.9 
Summary0013740: Support auto-redirection from MantisBT to MantisTouch for mobile browsers
Description
  1. Auto-detect mobile browser.
  2. Redirect to a configured instance of MantisTouch, passing in the URL of the MantisBT instance to connect to.

This functionality will be controlled via a configuration option that enabled / disables such behavior as well as specify the MantisTouch instance to be used. This can be http://mantisbt.mobi or a private instance of MantisTouch.

TagsNo tags attached.

Relationships

related to 0013751 assignedvboctor Plugin - MantisTouchRedirect Add configuration option for mobile browser redirection 
related to 0013752 closedvboctor mantisbt Disable redirection to MantisTouch 
related to 0013750 closedvboctor MantisTouch Enable anonymous access to MantisBT 
related to 0015721 closedgrangeway mantisbt Functionality to consider porting to master-2.0.x 
related to 0017186 closedvboctor mantisbt Remove $g_mantistouch_url in favor of MantisTouchRedirect plugin 
related to 0019710 closedatrol Plugin - Reminder No emails are sent out. Test gives result. 
related to 0019837 closedatrol mantisbt PHP notices if $_SERVER['HTTP_USER_AGENT'] is not set 

Activities

zapped

zapped

2012-03-01 05:57

reporter   ~0031357

By default (without changeing browser identification/user agent) Opera browser on Linux is always detected as mobile browser. And so redirects to MantisTouch. It also redirects to MantisTouch from Wiki link.
It's annoying behavior for mantisbt.org site

Reasons are following:
For header
HTTP_USER_AGENT = Opera/9.80 (X11; Linux i686; U; ru) Presto/2.10.229 Version/11.60

this parts of code
$t_mobile_ua = substr( $t_agent, 0, 4 );
...
$t_mobile_agents = array(
...
'oper'
...
detect Opera on Linux as mobile browser
but for Windows version flag is reset later
...
if ( strpos( $t_agent, 'windows' ) !== false ) {
$t_mobile_browser = false;

Workaround is to change "Browser identification" to "Firefox" or "Internet Explorer"

zapped

zapped

2012-03-01 06:08

reporter   ~0031358

also commented on github:
"up.browser|up.link" is not strictly correct for preg_match
"up.browser|up.link" is better

here is the patch to fix this

diff --git a/core/mobile_api.php b/core/mobile_api.php
index 1dd77c4..d5a180b 100644
--- a/core/mobile_api.php
+++ b/core/mobile_api.php
@@ -35,7 +35,7 @@ function mobile_is_mobile_browser() {

$t_agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
  • if ( preg_match( '/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|iphone|ipad|ipod|android|xoom)/i', $t_agent ) ) {
  • if ( preg_match( '/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|iphone|ipad|ipod|android|xoom)/i', $t_agent ) ) {
    $t_mobile_browser = true;
    }
grangeway

grangeway

2013-04-05 17:57

reporter   ~0036300

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x b888cb09

2012-01-08 15:40

vboctor


Details Diff
Fixed 0013740: Support auto-redirection from MantisBT to MantisTouch for mobile browsers

1. Auto-detect mobile browser.
2. Redirect to a configured instance of MantisTouch, passing in the URL of the MantisBT instance to connect to.

This functionality will be controlled via a configuration option that enabled / disables such behavior as well as specify the MantisTouch instance to be used. This can be http://mantisbt.mobi or a private instance of MantisTouch.
Affected Issues
0013740
add - core/mobile_api.php Diff File
mod - config_defaults_inc.php Diff File
mod - core.php Diff File
mod - docbook/adminguide/en/configuration.sgml Diff File

MantisBT: master 72dde3fc

2012-03-25 19:41

vboctor


Details Diff
Fixed 0013740: Support auto-redirection from MantisBT to MantisTouch for mobi

1. Auto-detect mobile browser.
2. Redirect to a configured instance of MantisTouch, passing in the URL of t

This functionality will be controlled via a configuration option that enable
Affected Issues
0013740
mod - config_defaults_inc.php Diff File
mod - core.php Diff File
mod - docbook/Admin_Guide/en-US/Configuration.xml Diff File

MantisBT: master 18ff872e

2013-05-25 15:35

Damien Regad


Details Diff
Issue 0013740: use require_api() instead of require_once() Affected Issues
0013740
mod - core.php Diff File