I think in newattacment.php file, if we can add check if the user uses mobile to browse then disable asset manager before this line
I found the half of the solution, here is the check code from include/init.php file
PHP Code:
// Test mobile browser
$mobile_browser = false;
$mobile_browser_advanced = false;
if (stripos($_SERVER['HTTP_USER_AGENT'], 'windows') === false OR preg_match('/(Windows Phone OS|htc)/i', strtolower($_SERVER['HTTP_USER_AGENT'])))
{
if (
preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|android|Windows Phone OS|htc)/i', strtolower($_SERVER['HTTP_USER_AGENT']))
OR
stripos($_SERVER['HTTP_ACCEPT'],'application/vnd.wap.xhtml+xml') !== false
OR
((isset($_SERVER['HTTP_X_WAP_PROFILE']) OR isset($_SERVER['HTTP_PROFILE'])))
OR
stripos($_SERVER['ALL_HTTP'],'OperaMini') !== false
)
{
$mobile_browser = true;
}
// This array is big and may be bigger later on. So we move it to a second if.
else if (in_array(
strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4)),
array(
'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac',
'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno',
'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-',
'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-',
'newt','noki','oper','palm','pana','pant','phil','play','port','prox',
'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar',
'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-',
'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp',
'wapr','webc','winw','winw','xda ','xda-')
)
)
{
$mobile_browser = true;
if(strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4)) == 'oper' AND preg_match('/(linux|mac)/i', $_SERVER['HTTP_USER_AGENT']))
{
$mobile_browser = false;
}
}
}
if (
$mobile_browser
AND
preg_match('/(ipad|ipod|iphone|blackberry|android|pre\/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine|Windows Phone OS|htc)/i', strtolower($_SERVER['HTTP_USER_AGENT']))
)
{
$mobile_browser_advanced = true;
}
The problem is that I was mistaken about newattacment.php file it is not the responsible about checking if the asset manager enabled or not.