- Timestamp:
- 26.11.2008 10:45:44 (3 years ago)
- Location:
- CMESS/forum/branches/captcha/cmess
- Files:
-
- 1 edited
- 1 moved
-
. (moved) (moved from CMESS/forum/branches/captcha/org/cmess)
-
forum/zms/zmsforum.metaobj.xml (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CMESS/forum/branches/captcha/cmess/forum/zms/zmsforum.metaobj.xml
r304 r315 94 94 </item> 95 95 <item type="dictionary"><dictionary> 96 <item key="id"><![CDATA[zfEnableCaptcha]]></item> 97 <item key="keys" type="list"><list> 98 <item><![CDATA[captcha.net]]></item> 99 </list> 100 </item> 101 <item key="mandatory" type="int">0</item> 102 <item key="multilang" type="int">1</item> 103 <item key="name"><![CDATA[Captcha?]]></item> 104 <item key="repetitive" type="int">0</item> 105 <item key="type"><![CDATA[select]]></item> 96 <item key="id"><![CDATA[attr_captcha]]></item> 97 <item key="mandatory" type="int">1</item> 98 <item key="multilang" type="int">0</item> 99 <item key="name"><![CDATA[Captcha]]></item> 100 <item key="repetitive" type="int">0</item> 101 <item key="type"><![CDATA[attr_captcha]]></item> 106 102 </dictionary> 107 103 </item> … … 1210 1206 1211 1207 def checkCaptcha(): 1212 temp_captcha_mode = context.getObjProperty('zfEnableCaptcha', REQUEST) 1213 if ((temp_captcha_mode is not None) and (len(temp_captcha_mode) > 0)): 1214 temp_result = context.ZMSForum_isCaptchaValid(temp_captcha_mode, REQUEST) 1215 else: 1208 try: 1209 temp_captcha_enabled = context.attr_captcha.getObjProperty('captchaEnabled', REQUEST) 1210 if (temp_captcha_enabled): 1211 temp_result = context.captcha_isValid(context) 1212 else: 1213 temp_result = (True, '') 1214 except: 1216 1215 temp_result = (True, '') 1217 1216 … … 1245 1244 1246 1245 def getCaptchaContent(): 1247 temp_captcha_mode = context.getObjProperty('zfEnableCaptcha', REQUEST) 1248 if ((temp_captcha_mode is not None) and (len(temp_captcha_mode) > 0)): 1249 temp_captcha_content = context.ZMSForum_getCaptchaContent(temp_captcha_mode) 1250 else: 1246 try: 1247 temp_captcha_enabled = context.attr_captcha.getObjProperty('captchaEnabled', REQUEST) 1248 if (temp_captcha_enabled): 1249 temp_captcha_content = context.captcha_getContent(context) 1250 else: 1251 temp_captcha_content = '' 1252 except: 1251 1253 temp_captcha_content = '' 1252 1254 1253 1255 return temp_captcha_content 1254 1256 … … 2231 2233 </dictionary> 2232 2234 </item> 2233 <item type="dictionary"><dictionary>2234 <item key="custom"><![CDATA[from org.cmess.forum.c_handler_captcha import C_Handler_Captcha2235 2236 def ZMSForum_getCaptchaContent(captcha_mode):2237 temp_handler = C_Handler_Captcha(captcha_mode)2238 temp_result = temp_handler.GetCaptchaContent()2239 2240 return temp_result]]></item>2241 <item key="id"><![CDATA[ZMSForum_getCaptchaContent]]></item>2242 <item key="mandatory" type="int">0</item>2243 <item key="multilang" type="int">0</item>2244 <item key="name"><![CDATA[ZMSForum_getCaptchaContent]]></item>2245 <item key="repetitive" type="int">0</item>2246 <item key="type"><![CDATA[External Method]]></item>2247 </dictionary>2248 </item>2249 <item type="dictionary"><dictionary>2250 <item key="custom"><![CDATA[from org.cmess.forum.c_handler_captcha import C_Handler_Captcha2251 2252 def ZMSForum_isCaptchaValid(captcha_mode, REQUEST):2253 temp_handler = C_Handler_Captcha(captcha_mode)2254 temp_result = temp_handler.IsCodeValid(REQUEST)2255 2256 return temp_result]]></item>2257 <item key="id"><![CDATA[ZMSForum_isCaptchaValid]]></item>2258 <item key="mandatory" type="int">0</item>2259 <item key="multilang" type="int">0</item>2260 <item key="name"><![CDATA[ZMSForum_isCaptchaValid]]></item>2261 <item key="repetitive" type="int">0</item>2262 <item key="type"><![CDATA[External Method]]></item>2263 </dictionary>2264 </item>2265 2235 </list> 2266 2236 </item>
Note: See TracChangeset
for help on using the changeset viewer.
