Save password as md5

This commit is contained in:
Ruud
2011-12-18 12:09:13 +01:00
parent 62f3121b46
commit e891287d3e
4 changed files with 19 additions and 5 deletions
+5 -2
View File
@@ -1,5 +1,5 @@
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent
from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.encoding import isInt, toUnicode
from couchpotato.core.helpers.request import getParams, jsonified
from couchpotato.core.helpers.variable import mergeDicts
@@ -137,7 +137,10 @@ class Settings():
option = params.get('name')
value = params.get('value')
self.set(section, option, value)
# See if a value handler is attached, use that as value
new_value = fireEvent('setting.save.%s.%s' % (section, option), value, single = True)
self.set(section, option, new_value if new_value else value)
self.save()
return jsonified({