Logo Search packages:      
Sourcecode: zope-coreblog version File versions

def zope-coreblog-1.0::COREBlog::COREBlog::manage_editSettings (   self,
  REQUEST = None 
)

set the setting values

Definition at line 1325 of file COREBlog.py.

01325                                               :
        """set the setting values"""
        if REQUEST:
            pre_charcode = ""
            if self.hasProperty("management_page_charset"):
                pre_charcode = self.getProperty("management_page_charset")
            dics = get_property_dict()
            for d in dics:
                key = d["id"]
                if key in ["moblog_password","entry_password"]:
                    if not hasattr(self,'_rotorkey'):
                        self._rotorkey = make_rotorkey()
                    if not REQUEST.form[key] == "password":
                        #value changed.
                        rt = newrotor(self._rotorkey)
                        setattr(self,'_' + key,encodestring(rt.encrypt(REQUEST.form[key])))
                    REQUEST.form[key] = ""
                if REQUEST.form.has_key(key):
                    if self.hasProperty(key):
                        self._updateProperty(key,REQUEST.form[key])
                    else:
                        self.manage_addProperty(key,REQUEST.form[key],d["type"])
                elif d["type"] == "boolean" and self.hasProperty(key):
                    self._updateProperty(key,0)
            #Change objects charset if need...
            if self.hasProperty("management_page_charset"):
                post_charcode = self.getProperty("management_page_charset")
                if REQUEST.has_key("change_charcode") and pre_charcode != post_charcode:
                    change_site_encode(self,post_charcode,pre_charcode)

            return REQUEST.RESPONSE.redirect(REQUEST['HTTP_REFERER'])

    security.declareProtected(ManageCOREBlog, 'decrypt')
    def decrypt(self,src):


Generated by  Doxygen 1.6.0   Back to index