[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Wed Jun 18 02:15:59 EDT 2014


raeburn		Wed Jun 18 06:15:59 2014 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	loncommon.pm 
  Log:
  - For 2.11
    - Backport 1.1194
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.76 loncom/interface/loncommon.pm:1.1075.2.77
--- loncom/interface/loncommon.pm:1.1075.2.76	Mon Jun 16 05:41:23 2014
+++ loncom/interface/loncommon.pm	Wed Jun 18 06:15:58 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1075.2.76 2014/06/16 05:41:23 raeburn Exp $
+# $Id: loncommon.pm,v 1.1075.2.77 2014/06/18 06:15:58 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2341,6 +2341,8 @@
 
 =item * $clientinfo
 
+=item * $clientosversion
+
 =back
 
 =back 
@@ -2360,6 +2362,7 @@
     my $clientmathml='';
     my $clientunicode='0';
     my $clientmobile=0;
+    my $clientosversion='';
     for (my $i=0;$i<=$#browsertype;$i++) {
         my ($bname,$match,$notmatch,$vreg,$minv,$univ)=split(/\%/,$browsertype[$i]);
 	if (($httpbrowser=~/$match/i)  && ($httpbrowser!~/$notmatch/i)) {
@@ -2381,7 +2384,12 @@
     if ($httpbrowser=~/next/i) { $clientos='next'; }
     if (($httpbrowser=~/mac/i) ||
         ($httpbrowser=~/powerpc/i)) { $clientos='mac'; }
-    if ($httpbrowser=~/win/i) { $clientos='win'; }
+    if ($httpbrowser=~/win/i) {
+        $clientos='win';
+        if ($httpbrowser =~/Windows\s+NT\s+(\d+\.\d+)/i) {
+            $clientosversion = $1;
+        }
+    }
     if ($httpbrowser=~/embed/i) { $clientos='pda'; }
     if ($httpbrowser=~/(Android|iPod|iPad|iPhone|webOS|Blackberry|Windows Phone|Opera m(?:ob|in)|Fennec)/i) {
         $clientmobile=lc($1);
@@ -2392,7 +2400,8 @@
         $clientinfo = 'chromeframe-'.$1;
     }
     return ($httpbrowser,$clientbrowser,$clientversion,$clientmathml,
-            $clientunicode,$clientos,$clientmobile,$clientinfo);
+            $clientunicode,$clientos,$clientmobile,$clientinfo,
+            $clientosversion);
 }
 
 ###############################################################
@@ -14519,8 +14528,8 @@
     }
 # ------------------------------------ Check browser type and MathML capability
 
-    my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml,
-        $clientunicode,$clientos,$clientmobile,$clientinfo) = &decode_user_agent($r);
+    my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml,$clientunicode,
+        $clientos,$clientmobile,$clientinfo,$clientosversion) = &decode_user_agent($r);
 
 # ------------------------------------------------------------- Get environment
 
@@ -14553,6 +14562,7 @@
 	     "browser.os"         => $clientos,
              "browser.mobile"     => $clientmobile,
              "browser.info"       => $clientinfo,
+             "browser.osversion"  => $clientosversion,
 	     "server.domain"      => $Apache::lonnet::perlvar{'lonDefDomain'},
 	     "request.course.fn"  => '',
 	     "request.course.uri" => '',




More information about the LON-CAPA-cvs mailing list