# HG changeset patch # User martin f. krafft # Date 1334094618 -7200 # Node ID 09fa019bb330b7432e3b8ca164b70967b345831b # Parent d863a44a6353f5d1378028204a1012ad2086c7fa Include catch-all count in domaininfo output diff -r d863a44a6353 -r 09fa019bb330 VirtualMailManager/cli/subcommands.py --- a/VirtualMailManager/cli/subcommands.py Tue Apr 10 22:56:30 2012 +0200 +++ b/VirtualMailManager/cli/subcommands.py Tue Apr 10 23:50:18 2012 +0200 @@ -810,7 +810,7 @@ order = ((u'domain name', 0), (u'gid', 1), (u'domain directory', 0), (u'quota limit/user', 0), (u'active services', 0), (u'transport', 0), (u'alias domains', 0), (u'accounts', 0), - (u'aliases', 0), (u'relocated', 0)) + (u'aliases', 0), (u'relocated', 0), (u'catch-all dests', 0)) elif ctx.scmd == 'userinfo': if ctx.argc == 4 and ctx.args[3] != u'aliases' or \ ctx.cget('account.disk_usage'): diff -r d863a44a6353 -r 09fa019bb330 VirtualMailManager/domain.py --- a/VirtualMailManager/domain.py Tue Apr 10 22:56:30 2012 +0200 +++ b/VirtualMailManager/domain.py Tue Apr 10 23:50:18 2012 +0200 @@ -348,11 +348,12 @@ self._chk_state() dbc = self._dbh.cursor() dbc.execute('SELECT aliasdomains "alias domains", accounts, aliases, ' - 'relocated FROM vmm_domain_info WHERE gid = %s', - (self._gid,)) + 'relocated, catchall "catch-all dests" ' + 'FROM vmm_domain_info WHERE gid = %s', (self._gid,)) info = dbc.fetchone() dbc.close() - keys = ('alias domains', 'accounts', 'aliases', 'relocated') + keys = ('alias domains', 'accounts', 'aliases', 'relocated', + 'catch-all dests') info = dict(zip(keys, info)) info['gid'] = self._gid info['domain name'] = self._name diff -r d863a44a6353 -r 09fa019bb330 pgsql/create_tables-dovecot-1.2.x.pgsql --- a/pgsql/create_tables-dovecot-1.2.x.pgsql Tue Apr 10 22:56:30 2012 +0200 +++ b/pgsql/create_tables-dovecot-1.2.x.pgsql Tue Apr 10 23:50:18 2012 +0200 @@ -196,7 +196,10 @@ (SELECT count(gid) FROM domain_name WHERE domain_name.gid = domain_data.gid - AND NOT domain_name.is_primary) AS aliasdomains + AND NOT domain_name.is_primary) AS aliasdomains, + (SELECT count(gid) + FROM catchall + WHERE catchall.gid = domain_data.gid) AS catchall FROM domain_data LEFT JOIN domain_name USING (gid) LEFT JOIN users USING (gid) diff -r d863a44a6353 -r 09fa019bb330 pgsql/create_tables.pgsql --- a/pgsql/create_tables.pgsql Tue Apr 10 22:56:30 2012 +0200 +++ b/pgsql/create_tables.pgsql Tue Apr 10 23:50:18 2012 +0200 @@ -196,7 +196,10 @@ (SELECT count(gid) FROM domain_name WHERE domain_name.gid = domain_data.gid - AND NOT domain_name.is_primary) AS aliasdomains + AND NOT domain_name.is_primary) AS aliasdomains, + (SELECT count(gid) + FROM catchall + WHERE catchall.gid = domain_data.gid) AS catchall FROM domain_data LEFT JOIN domain_name USING (gid) LEFT JOIN users USING (gid) diff -r d863a44a6353 -r 09fa019bb330 pgsql/update_tables_0.5.x-0.6-dovecot-1.2.x.pgsql --- a/pgsql/update_tables_0.5.x-0.6-dovecot-1.2.x.pgsql Tue Apr 10 22:56:30 2012 +0200 +++ b/pgsql/update_tables_0.5.x-0.6-dovecot-1.2.x.pgsql Tue Apr 10 23:50:18 2012 +0200 @@ -190,7 +190,10 @@ (SELECT count(gid) FROM domain_name WHERE domain_name.gid = domain_data.gid - AND NOT domain_name.is_primary) AS aliasdomains + AND NOT domain_name.is_primary) AS aliasdomains, + (SELECT count(gid) + FROM catchall + WHERE catchall.gid = domain_data.gid) AS catchall FROM domain_data LEFT JOIN domain_name USING (gid) LEFT JOIN users USING (gid) diff -r d863a44a6353 -r 09fa019bb330 pgsql/update_tables_0.5.x-0.6.pgsql --- a/pgsql/update_tables_0.5.x-0.6.pgsql Tue Apr 10 22:56:30 2012 +0200 +++ b/pgsql/update_tables_0.5.x-0.6.pgsql Tue Apr 10 23:50:18 2012 +0200 @@ -168,7 +168,10 @@ (SELECT count(gid) FROM domain_name WHERE domain_name.gid = domain_data.gid - AND NOT domain_name.is_primary) AS aliasdomains + AND NOT domain_name.is_primary) AS aliasdomains, + (SELECT count(gid) + FROM catchall + WHERE catchall.gid = domain_data.gid) AS catchall FROM domain_data LEFT JOIN domain_name USING (gid) LEFT JOIN users USING (gid)