diff --git a/VERSION b/VERSION index f287dcd2..7ba0fb63 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.9 (2012-09-18 13:37:38) stable +Version 2.0.9 (2012-09-18 13:39:12) stable diff --git a/gluon/dal.py b/gluon/dal.py index ca4a6768..e4fe3b1d 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -5504,13 +5504,15 @@ class IMAPAdapter(NoSQLAdapter): # directly with set.update(deleted=True) - # This objects give access + # This object give access # to the adapter auto mailbox # mapped names (which native # mailbox has what table name) - db.mailboxes # DAL instance mailbox tablenames - db.mailbox_names # tablename, server native name pairs + db.mailboxes # tablename, server native name pairs + + # To retrieve a table native mailbox name use: + db..mailbox """ @@ -5813,10 +5815,15 @@ class IMAPAdapter(NoSQLAdapter): Field("email", "string", writable=False, readable=False), Field("attachments", "list:string", writable=False, readable=False), ) + + # Set a special _mailbox attribute for storing + # native mailbox names + self.db[mailbox_name].mailbox = \ + self.connection.mailbox_names[mailbox_name] + # Set the db instance mailbox collections - self.db.mailbox_names = self.connection.mailbox_names - self.db.mailboxes = self.connection.mailbox_names.keys() - return self.db.mailbox_names + self.db.mailboxes = self.connection.mailbox_names + return self.db.mailboxes def create_table(self, *args, **kwargs): # not implemented