-
+ 659E33480372C2127D72ABB078045FC9D398FD7FFE89E9FA4A7FA5B972D47674E055403D278A5CF9D116C1E66CEFDB4B17FB68AB62D2024A7B2FF7497EF39B03
mp-wp/wp-includes/js/swfupload/plugins/swfupload.cookies.js
(0 . 0)(1 . 53)
116401 /*
116402 Cookie Plug-in
116403
116404 This plug in automatically gets all the cookies for this site and adds them to the post_params.
116405 Cookies are loaded only on initialization. The refreshCookies function can be called to update the post_params.
116406 The cookies will override any other post params with the same name.
116407 */
116408
116409 var SWFUpload;
116410 if (typeof(SWFUpload) === "function") {
116411 SWFUpload.prototype.initSettings = function (oldInitSettings) {
116412 return function () {
116413 if (typeof(oldInitSettings) === "function") {
116414 oldInitSettings.call(this);
116415 }
116416
116417 this.refreshCookies(false); // The false parameter must be sent since SWFUpload has not initialzed at this point
116418 };
116419 }(SWFUpload.prototype.initSettings);
116420
116421 // refreshes the post_params and updates SWFUpload. The sendToFlash parameters is optional and defaults to True
116422 SWFUpload.prototype.refreshCookies = function (sendToFlash) {
116423 if (sendToFlash === undefined) {
116424 sendToFlash = true;
116425 }
116426 sendToFlash = !!sendToFlash;
116427
116428 // Get the post_params object
116429 var postParams = this.settings.post_params;
116430
116431 // Get the cookies
116432 var i, cookieArray = document.cookie.split(';'), caLength = cookieArray.length, c, eqIndex, name, value;
116433 for (i = 0; i < caLength; i++) {
116434 c = cookieArray[i];
116435
116436 // Left Trim spaces
116437 while (c.charAt(0) === " ") {
116438 c = c.substring(1, c.length);
116439 }
116440 eqIndex = c.indexOf("=");
116441 if (eqIndex > 0) {
116442 name = c.substring(0, eqIndex);
116443 value = c.substring(eqIndex + 1);
116444 postParams[name] = value;
116445 }
116446 }
116447
116448 if (sendToFlash) {
116449 this.setPostParams(postParams);
116450 }
116451 };
116452
116453 }