Skip to content

Commit

Permalink
toGMTString is deprecated, changed to toUTCString (OpenMage#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinkortman authored and rafaelpatro committed May 14, 2019
1 parent d8e56aa commit a5ca7bb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/mage/adminhtml/flexuploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ if(!window.Flex) {

document.cookie = escape(response.cookie.name) + "="
+ escape(response.cookie.value)
+ "; expires=" + date.toGMTString()
+ "; expires=" + date.toUTCString()
+ (response.cookie.path.blank() ? "" : "; path=" + response.cookie.path)
+ (response.cookie.domain.blank() ? "" : "; domain=" + response.cookie.domain);
}
Expand Down
2 changes: 1 addition & 1 deletion js/mage/adminhtml/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ var Cookie = {
if (cookieLifeTime) {
var date = new Date();
date.setTime(date.getTime()+(cookieLifeTime*1000));
expires = '; expires='+date.toGMTString();
expires = '; expires='+date.toUTCString();
}
var urlPath = '/' + BASE_URL.split('/').slice(3).join('/'); // Get relative path
document.cookie = escape(cookieName) + "=" + escape(cookieValue) + expires + "; path=" + urlPath;
Expand Down
2 changes: 1 addition & 1 deletion js/mage/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Mage.Cookies.set = function(name, value){
var domain = (argc > 4) ? argv[4] : Mage.Cookies.domain;
var secure = (argc > 5) ? argv[5] : Mage.Cookies.secure;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((expires == null) ? "" : ("; expires=" + expires.toUTCString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
Expand Down
2 changes: 1 addition & 1 deletion js/prototype/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -1817,7 +1817,7 @@ var WindowUtilities = {

setCookie: function(value, parameters) {
document.cookie= parameters[0] + "=" + escape(value) +
((parameters[1]) ? "; expires=" + parameters[1].toGMTString() : "") +
((parameters[1]) ? "; expires=" + parameters[1].toUTCString() : "") +
((parameters[2]) ? "; path=" + parameters[2] : "") +
((parameters[3]) ? "; domain=" + parameters[3] : "") +
((parameters[4]) ? "; secure" : "");
Expand Down

0 comments on commit a5ca7bb

Please sign in to comment.