[commits] r103 - selinux-site/trunk/selinux.theme/selinux/theme

tim at mail.se.linux.org tim at mail.se.linux.org
Tors Aug 23 00:30:53 CEST 2007


Author: tim
Date: 2007-08-23 00:30:52 +0200 (Thu, 23 Aug 2007)
New Revision: 103

Removed:
   selinux-site/trunk/selinux.theme/selinux/theme/notifications.py
Modified:
   selinux-site/trunk/selinux.theme/selinux/theme/configure.zcml
Log:
Code that handles irc stuff is moved to its own package.


Modified: selinux-site/trunk/selinux.theme/selinux/theme/configure.zcml
===================================================================
--- selinux-site/trunk/selinux.theme/selinux/theme/configure.zcml	2007-08-17 23:11:35 UTC (rev 102)
+++ selinux-site/trunk/selinux.theme/selinux/theme/configure.zcml	2007-08-22 22:30:52 UTC (rev 103)
@@ -37,16 +37,4 @@
       handler=".caching_subscribers.news_workflow_transition"
       />
 
-  <subscriber
-      for="Products.CMFCore.interfaces.IContentish
-           zope.app.container.interfaces.IObjectAddedEvent"
-      handler=".notifications.irc_object_added"
-      />
-
-  <subscriber
-      for="Products.CMFCore.interfaces.IContentish
-           Products.CMFCore.interfaces.IActionSucceededEvent"
-      handler=".notifications.irc_object_published"
-      />
-
 </configure>

Deleted: selinux-site/trunk/selinux.theme/selinux/theme/notifications.py
===================================================================
--- selinux-site/trunk/selinux.theme/selinux/theme/notifications.py	2007-08-17 23:11:35 UTC (rev 102)
+++ selinux-site/trunk/selinux.theme/selinux/theme/notifications.py	2007-08-22 22:30:52 UTC (rev 103)
@@ -1,23 +0,0 @@
-from xmlrpclib import Server
-from Products.CMFCore.utils import getToolByName
-from zope.i18n import translate
-from Products.CMFPlone.i18nl10n import utranslate
-
-def irc_object_added(obj, event):
-    workflow = getToolByName(obj, 'portal_workflow')
-    state = workflow.getInfoFor(obj, 'review_state', None)
-
-    # when an object is created it's first added to a temporary folder
-    # that shouldn't trigger irc notification
-    if state == 'published' and obj.aq_parent.portal_type != 'TempFolder':
-        server = Server('http://localhost:7080')
-        obj_type = utranslate('plone', obj.portal_type,
-                         target_language='sv', context=obj)
-        msg = "%s (%s), %s" % (obj.Title(), obj_type, obj.absolute_url())
-        try:
-            server.say('webb', msg)
-        except:
-            pass
-
-def irc_object_published(obj, event):
-    irc_object_added(obj, event)




More information about the commits mailing list