<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
    </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>"""\n
  Unindexed deleted business template in order to the manager don\'t see it.\n
  \n
  This is script is probably a workarround.\n
"""\n
\n
from Products.CMFActivity.ActiveResult import ActiveResult\n
portal = context.getPortalObject()\n
active_process = portal.restrictedTraverse(active_process)\n
\n
unindexed_list = []\n
for i in context.portal_templates.portal_catalog(portal_type="Business Template"):\n
  if i.getInstallationState() == "deleted":\n
    unindexed_list.append(i.path)\n
    if fixit:\n
      context.portal_catalog.activate(\n
        activity="SQLQueue").unindexObject(uid=i.uid)\n
\n
if len(unindexed_list):\n
  if fixit:\n
    summary="The followed bt5 were unindexed: %s" % unindexed_list\n
  else:\n
    summary="The followed bt5 are going to be unindexed: %s" % unindexed_list\n
  active_process.postResult(ActiveResult(\n
     summary=summary,\n
     severity=2,\n
     detail=""))\n
</string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>tag, fixit, active_process, **kw</string> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>TemplateTool_unindexDeletedObjectList</string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
