Merge branch 'release/0.7.0' into develop

This commit is contained in:
Adam 2015-02-28 12:23:46 +08:00
commit 9f55f91ce9
2 changed files with 21 additions and 9 deletions

View file

@ -94,8 +94,8 @@ $(document).ready(function(){
});
$('.show_update_hour_value').text($('#show_update_hour').val())
},
success: function(){
setTimeout('config_success()', 2000)
success: function(response){
setTimeout(function(){config_success(response)}, 2000);
}
});
@ -121,11 +121,14 @@ $(document).ready(function(){
});
function config_success(){
function config_success(response){
if (response == 'reload'){
window.location.reload(true);
}
$('.config_submitter').each(function(){
$(this).removeAttr('disabled');
$(this).next().remove();
$(this).show();
});
$('#email_show').trigger('notify');
}
}

View file

@ -121,7 +121,7 @@ class BaseHandler(RequestHandler):
def get_current_user(self, *args, **kwargs):
if sickbeard.WEB_USERNAME or sickbeard.WEB_PASSWORD:
return self.get_secure_cookie('user')
return self.get_secure_cookie('sickgear-session')
else:
return True
@ -178,7 +178,7 @@ class LoginHandler(BaseHandler):
and (self.get_argument('password') == password or not password):
remember_me = int(self.get_argument('remember_me', default=0) or 0)
self.set_secure_cookie('user', sickbeard.COOKIE_SECRET, expires_days=30 if remember_me > 0 else None)
self.set_secure_cookie('sickgear-session', sickbeard.COOKIE_SECRET, expires_days=30 if remember_me > 0 else None)
self.redirect(self.get_argument('next', '/home/'))
else:
@ -188,7 +188,7 @@ class LoginHandler(BaseHandler):
class LogoutHandler(BaseHandler):
def get(self, *args, **kwargs):
self.clear_cookie('user')
self.clear_cookie('sickgear-session')
self.redirect('/login/')
@ -3383,9 +3383,16 @@ class ConfigGeneral(Config):
sickbeard.WEB_IPV6 = config.checkbox_to_value(web_ipv6)
# sickbeard.WEB_LOG is set in config.change_LOG_DIR()
sickbeard.ENCRYPTION_VERSION = config.checkbox_to_value(encryption_version)
sickbeard.WEB_USERNAME = web_username
reload_page = False
if sickbeard.WEB_USERNAME != web_username:
sickbeard.WEB_USERNAME = web_username
reload_page = True
if set('*') != set(web_password):
sickbeard.WEB_PASSWORD = web_password
reload_page = True
sickbeard.FUZZY_DATING = config.checkbox_to_value(fuzzy_dating)
sickbeard.TRIM_ZERO = config.checkbox_to_value(trim_zero)
@ -3437,7 +3444,9 @@ class ConfigGeneral(Config):
else:
ui.notifications.message('Configuration Saved', ek.ek(os.path.join, sickbeard.CONFIG_FILE))
self.redirect('/config/general/')
if reload_page:
self.clear_cookie('sickgear-session')
self.write('reload')
class ConfigSearch(Config):