From 124c85a5ce1c60cbbf5539ac0c09b5c738699b48 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 21 Jul 2013 17:27:33 -0500 Subject: [PATCH 1/4] fixed typo in changelog, thanks niphlod --- CHANGELOG | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index bc54d9de..998ebdc4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,7 +5,7 @@ ## 2.5.1 - New style virtual fields in grid -- Conditional fields (experimental) ``db.table.field.show_id = db.table.otherfield==True`` or ``db.table.field.show_id = db.table.otherfiel.contains(values)`` +- Conditional fields (experimental) ``db.table.field.show_if = db.table.otherfield==True`` or ``db.table.field.show_if = db.table.otherfiel.contains(values)`` - auth.settings.manager_group_role="manager" enables http://.../app/appadmin/auth_manage and http://.../app/appadmin/manage for members of the "manager" group. (also experimental) - support for POST variables in DELETE - Fixed memory leak when using the TAG helper diff --git a/VERSION b/VERSION index 124db821..d816b64a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.21.17.14.46 +Version 2.6.0-development+timestamp.2013.07.21.17.26.46 From 87ea0565657a19125c2cf694ed03dfc159e7b119 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 22 Jul 2013 04:04:28 -0500 Subject: [PATCH 2/4] fixed issue 1602:Retrieve migration data from db fails if table is not yet created --- VERSION | 2 +- gluon/dal.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index d816b64a..f29bb318 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.21.17.26.46 +Version 2.6.0-development+timestamp.2013.07.22.04.03.41 diff --git a/gluon/dal.py b/gluon/dal.py index 8e665a07..b0e97d82 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -4316,8 +4316,13 @@ class DatabaseStoredFile: if exists(filename): return True query = "SELECT path FROM web2py_filesystem WHERE path='%s'" % filename - if db.executesql(query): - return True + try: + if db.executesql(query): + return True + except IOError, e: + # no web2py_filesystem found? + LOGGER.error("Could not retrieve %s. %s" % (filename, e)) + pass return False From b1926349465102eaa89e50959130e43d14f60321 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 22 Jul 2013 04:10:36 -0500 Subject: [PATCH 3/4] fixed issue 1599:Shell relative paths while webserver's are absolute in dal, thanks Alan --- VERSION | 2 +- gluon/dal.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f29bb318..d919b3d3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.22.04.03.41 +Version 2.6.0-development+timestamp.2013.07.22.04.09.52 diff --git a/gluon/dal.py b/gluon/dal.py index b0e97d82..515ea300 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -567,6 +567,11 @@ class ConnectionPool(object): """ this actually does not make the folder. it has to be there """ self.folder = getattr(THREAD_LOCAL,'folder','') + if (os.path.isabs(self.folder) and + isinstance(self, UseDatabaseStoredFile) and + self.folder.startswith(os.getcwd())): + self.folder = os.path.relpath(self.folder, os.getcwd()) + # Creating the folder if it does not exist if False and self.folder and not exists(self.folder): os.mkdir(self.folder) From 60d0812f774bfc94ef20542bc0b1fbe0bcae66e2 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 22 Jul 2013 04:48:53 -0500 Subject: [PATCH 4/4] fixed issue 1596:Alias don't work with record versioning --- VERSION | 2 +- gluon/dal.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index d919b3d3..ace6c9b8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.22.04.09.52 +Version 2.6.0-development+timestamp.2013.07.22.04.48.04 diff --git a/gluon/dal.py b/gluon/dal.py index 515ea300..c49c847e 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -8320,12 +8320,13 @@ class Table(object): archive_name = '%(tablename)s_archive', current_record = 'current_record', is_active = 'is_active'): - archive_db = archive_db or self._db + db = self._db + archive_db = archive_db or db archive_name = archive_name % dict(tablename=self._tablename) if archive_name in archive_db.tables(): return # do not try define the archive if already exists fieldnames = self.fields() - same_db = archive_db is self._db + same_db = archive_db is db field_type = self if same_db else 'bigint' clones = [] for field in self: @@ -8340,7 +8341,10 @@ class Table(object): if is_active and is_active in fieldnames: self._before_delete.append( lambda qset: qset.update(is_active=False)) - newquery = lambda query, t=self: t.is_active == True + newquery = lambda query, t=self: \ + reduce(AND,[db[tn].is_active == True + for tn in db._adapter.tables(query) + if tn==t.name or getattr(db[tn],'_ot',None)==t.name]) query = self._common_filter if query: newquery = query & newquery