740 def _get_order(ctx): |
740 def _get_order(ctx): |
741 """returns a tuple with (key, 1||0) tuples. Used by functions, which |
741 """returns a tuple with (key, 1||0) tuples. Used by functions, which |
742 get a dict from the handler.""" |
742 get a dict from the handler.""" |
743 order = () |
743 order = () |
744 if ctx.scmd == 'domaininfo': |
744 if ctx.scmd == 'domaininfo': |
745 order = ((u'domainname', 0), (u'gid', 1), (u'transport', 0), |
745 order = ((u'domain name', 0), (u'gid', 1), (u'domain directory', 0), |
746 (u'domaindir', 0), (u'quota limit', 0), (u'aliasdomains', 0), |
746 (u'quota limit', 0), (u'active services', 0), |
747 (u'accounts', 0), (u'aliases', 0), (u'relocated', 0)) |
747 (u'transport', 0), (u'alias domains', 0), (u'accounts', 0), |
|
748 (u'aliases', 0), (u'relocated', 0)) |
748 elif ctx.scmd == 'userinfo': |
749 elif ctx.scmd == 'userinfo': |
749 dc12 = ctx.cget('misc.dovecot_version') >= 0x10200b02 |
|
750 sieve = (u'managesieve', u'sieve')[dc12] |
|
751 if ctx.argc == 4 and ctx.args[3] != u'aliases' or \ |
750 if ctx.argc == 4 and ctx.args[3] != u'aliases' or \ |
752 ctx.cget('account.disk_usage'): |
751 ctx.cget('account.disk_usage'): |
753 order = ((u'address', 0), (u'name', 0), (u'uid', 1), (u'gid', 1), |
752 order = ((u'address', 0), (u'name', 0), (u'uid', 1), (u'gid', 1), |
754 (u'home', 0), (u'mail_location', 0), |
753 (u'home', 0), (u'mail_location', 0), |
755 (u'quota storage', 0), (u'quota messages', 0), |
754 (u'quota storage', 0), (u'quota messages', 0), |
756 (u'disk usage', 0), (u'transport', 0), (u'smtp', 1), |
755 (u'disk usage', 0), (u'transport', 0), (u'smtp', 1), |
757 (u'pop3', 1), (u'imap', 1), (sieve, 1)) |
756 (u'pop3', 1), (u'imap', 1), (u'sieve', 1)) |
758 else: |
757 else: |
759 order = ((u'address', 0), (u'name', 0), (u'uid', 1), (u'gid', 1), |
758 order = ((u'address', 0), (u'name', 0), (u'uid', 1), (u'gid', 1), |
760 (u'home', 0), (u'mail_location', 0), |
759 (u'home', 0), (u'mail_location', 0), |
761 (u'quota storage', 0), (u'quota messages', 0), |
760 (u'quota storage', 0), (u'quota messages', 0), |
762 (u'transport', 0), (u'smtp', 1), (u'pop3', 1), |
761 (u'transport', 0), (u'smtp', 1), (u'pop3', 1), |
763 (u'imap', 1), (sieve, 1)) |
762 (u'imap', 1), (u'sieve', 1)) |
764 elif ctx.scmd == 'getuser': |
763 elif ctx.scmd == 'getuser': |
765 order = ((u'uid', 1), (u'gid', 1), (u'address', 0)) |
764 order = ((u'uid', 1), (u'gid', 1), (u'address', 0)) |
766 return order |
765 return order |
767 |
766 |
768 |
767 |