Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -N -r1.118.2.8 -r1.118.2.9 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 2 Jan 2016 00:46:28 -0000 1.118.2.8 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 5 Jan 2016 18:03:48 -0000 1.118.2.9 @@ -1444,6 +1444,20 @@ # return the physical peer address return [ns_conn $var] } + + mobile_p { + # + # Check, if we are used from a mobile device (based on user_agent). + # + if {[ns_conn isconnected]} { + set user_agent [string tolower [ns_set get [ns_conn headers] User-Agent]] + set ad_conn(mobile_p) [regexp (android|webos|iphone|ipad) $user_agent] + } else { + set ad_conn(mobile_p) 0 + } + return $ad_conn(mobile_p) + } + default { return [ns_conn $var] }