From d6284b4d22d1e6912b01228b7d2a63e9fecbc5fb Mon Sep 17 00:00:00 2001
From: till <till@php.net>
Date: Wed, 02 Nov 2011 11:13:42 -0400
Subject: [PATCH] check-in 3.4.6 (without moxieplayer due to a content-spoofing vulnerability)

---
 program/js/common.js |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/program/js/common.js b/program/js/common.js
index 0011fea..831e44a 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -617,10 +617,10 @@
       return null;
   }
   else {
-    begin += 2;  
+    begin += 2;
   }
 
-  var end = document.cookie.indexOf(";", begin);
+  var end = dc.indexOf(";", begin);
   if (end == -1)
     end = dc.length;
 
@@ -671,6 +671,23 @@
   return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
 };
 
+// Extend Date prototype to detect Standard timezone without DST
+// from http://www.michaelapproved.com/articles/timezone-detect-and-ignore-daylight-saving-time-dst/
+Date.prototype.getStdTimezoneOffset = function()
+{
+  var m = 12,
+    d = new Date(null, m, 1),
+    tzo = d.getTimezoneOffset();
+
+    while (--m) {
+      d.setUTCMonth(m);
+      if (tzo != d.getTimezoneOffset()) {
+        return Math.max(tzo, d.getTimezoneOffset());
+    }
+  }
+
+  return tzo;
+}
 
 // Make getElementById() case-sensitive on IE
 if (bw.ie)

--
Gitblit v1.9.1