From 95850c2ce21dcfb47de22bd68b306eaadbe9c3ff Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Fri, 11 Mar 2011 20:56:01 +0000
Subject: [PATCH] Return True if a ERP5 Site is present as subobject. This is  
     usefull to identify if a erp5 is present already on a Zope       Setup.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44218 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/patches/OFSFolder.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/product/ERP5Type/patches/OFSFolder.py b/product/ERP5Type/patches/OFSFolder.py
index 7ace3949d9..030299036b 100644
--- a/product/ERP5Type/patches/OFSFolder.py
+++ b/product/ERP5Type/patches/OFSFolder.py
@@ -46,3 +46,12 @@ def Folder_setOb(self, id, object):
   _updateCacheEntry(self.id, id)
 
 Folder._setOb = Folder_setOb
+
+def Folder_isERP5SitePresent(self):
+  """ Return True if a ERP5 Site is present as subobject. This is
+      usefull to identify if a erp5 is present already on a Zope
+      Setup.
+  """
+  return len(self.objectIds("ERP5 Site")) > 1
+
+Folder.isERP5SitePresent = Folder_isERP5SitePresent
-- 
2.30.9