tweaked getting the configuration from the cookie

This commit is contained in:
hamza zia 2013-06-22 21:37:14 +01:00
parent e73778ab18
commit 4bd0c7c7c1
2 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,9 @@ function(syscall, time, alerts, utils, rootScope, uri) {
} }
var cookieConf = utils.getCookie('aria2conf'); var cookieConf = utils.getCookie('aria2conf');
if (cookieConf) configurations.unshift(cookieConf);
// try at the end, so that it is not overwridden in case it doesnt work
if (cookieConf) configurations.push(cookieConf);
// update is implemented such that // update is implemented such that
// only one syscall at max is ongoing // only one syscall at max is ongoing

View File

@ -18,6 +18,8 @@ angular.module('webui.services.utils', [])
return JSON.parse(unescape(cvalue)); return JSON.parse(unescape(cvalue));
} }
} }
return null;
}, },
getFileName: function(path) { getFileName: function(path) {
var seed = path.split(/[/\\]/); var seed = path.split(/[/\\]/);