Commit cdf78496 authored by Lucas Carvalho's avatar Lucas Carvalho

2010-06-21 Lucas

* Added a draft script: WebSite_getSkinSignature

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36485 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed7d6273
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""\n
This scripts must be created for every site. It is used\n
to test that nobody changes the order of skin selection.\n
Zabbix must call this script on a web site to make sure\n
that nothing wrong happens.\n
"""\n
skin_constraint = []\n
required_skin_folder_id_list = [\'erp5_web_multiflex5_theme\',\n
\'erp5_xhtml_style\',\n
\'erp5_web\']\n
# No method available to retrieve selected skin (it will be needed some day)\n
default_skin = context.getSkinSelectionName()\n
\n
skin_selection = context.portal_skins.getSkinPath(default_skin).split(\',\')\n
\n
# Add here a line each an order error happens\n
skin_constraint.append(skin_selection.index(\'erp5_web_multiflex5_theme\') < \\\n
skin_selection.index(\'erp5_web\'))\n
skin_constraint.append(skin_selection.index(\'erp5_web_multiflex5_theme\') < \\\n
skin_selection.index(\'erp5_xhtml_style\'))\n
\n
for required_skin_folder_id in required_skin_folder_id_list:\n
skin_constraint.append(required_skin_folder_id in skin_selection)\n
\n
# make sure no cache server in front will cache script\n
context.REQUEST.RESPONSE.setHeader(\'Cache-Control\', \'no-cache\')\n
\n
# Return signature\n
return "%s %s" % (default_skin, not False in skin_constraint)\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>skin_constraint</string>
<string>required_skin_folder_id_list</string>
<string>_getattr_</string>
<string>context</string>
<string>default_skin</string>
<string>skin_selection</string>
<string>_getiter_</string>
<string>required_skin_folder_id</string>
<string>False</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getSkinSignature</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2010-06-21 Lucas
* Added a draft script: WebSite_getSkinSignature
2009-06-10 kazuhiko
* news widget and search bar are enabled by existence of those section id configuration.
......
185
\ No newline at end of file
187
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment