Logo Search packages:      
Sourcecode: zope-cmfpgforum version File versions

def CMFpgForum::CMFpgForum::CMFpgForum::SQLConnectionIDs (   self  ) 

Find SQL database connections in the current folder and above

This function return a list of ids.

Definition at line 514 of file CMFpgForum.py.

00514                               :
        """Find SQL database connections in the current folder and above

        This function return a list of ids.
        """
        ids={}
        have_id=ids.has_key
        StringType=type('')

        while self is not None:
            if hasattr(self, 'objectValues'):
                for o in self.objectValues():
                    if (hasattr(o,'_isAnSQLConnection') and o._isAnSQLConnection
                        and hasattr(o,'id')):
                        id=o.id
                        if type(id) is not StringType: id=id()
                        if not have_id(id):
                            if hasattr(o,'title_and_id'): o=o.title_and_id()
                            else: o=id
                            ids[id]=id
            if hasattr(self, 'aq_parent'): self=self.aq_parent
            else: self=None

        ids=map(lambda item: (item[1], item[0]), ids.items())
        ids.sort()
        return ids

# attach dtml files to the class


Generated by  Doxygen 1.6.0   Back to index