Commits

Zhang Huangbin committed d9a3a66

Fixed: missing msg handler in account list pages. Thanks Jure Pečar <jure.pecar _at_ arctur.si> for the report.

  • Participants
  • Parent commits ca46cdd

Comments (0)

Files changed (2)

File ChangeLog.dbmail_mysql

         + Able to execute addition SQL commands after creating user.
 
     * Fixed:
+        + Missing msg handler in account list pages.
+          Thanks Jure Pečar <jure.pecar _at_ arctur.si> for the report.
         + Incorrect per-user quota usage calculation.
           Thanks paparaciz <helpaz@gmail> for the report and suggested fix.
         + Fix possible 'internal server error' caused by incorrect timestamp

File templates/default/macros/msgHandlers.html

 {% if msg is defined and msg is not sameas none and msg|string != '' %}
     {% set handlers = {
         'UPDATED': successInfo(_('Profile updated success.')),
+        'INVALID_ACTION': errorInfo(_('Invalid action.')),
         'DELETED': successInfo(_('Selected domains were deleted.')),
         'DISABLED': successInfo(_('Selected domains were disabled.')),
         'ENABLED': successInfo(_('Selected domains were enabled.')),
-
         'INVALID_DOMAIN_NAME': errorInfo(_('Invalid domain name.')),
-        'INVALID_ACTION': errorInfo(_('Invalid action.')),
         'INVALID_MAIL': errorInfo(_('Invalid mail address.')),
         'EMPTY_DOMAIN': errorInfo(_('Domain name is empty.')),
         'EXCEEDED_LDAP_SERVER_SIZELIMIT': errorInfo(_('Server-side size limit exceeded. Please increase "sizelimit" in your LDAP server.')),
     {% set handlers = {
         'UPDATED': successInfo(_('Profile updated success.')),
         'UPDATED_FAILED':  errorInfo( _('Profile updated failed.')),
+        'INVALID_ACTION': errorInfo(_('Invalid action.')),
         'NO_DOMAIN_AVAILABLE': generalInfo( _('No domain under control.') ),
         'MISSING_DOMAIN_OR_USERNAME': errorInfo( _('Domain name or username is missed.') ),
         'INVALID_MAIL': errorInfo(_('Invalid mail address.')),
 {% if msg is defined and msg is not sameas none and msg|string != '' %}
     {% set handlers = {
         'UPDATED': successInfo(_('Profile updated success.')),
+        'INVALID_ACTION': errorInfo(_('Invalid action.')),
         'PERMISSION_DENIED': errorInfo(_("Permission denied.")),
         'DELETED': successInfo(_('Selected accounts were deleted.')),
         'DISABLED': successInfo(_('Selected accounts were disabled.')),
         'ALREADY_EXISTS': errorInfo(_('Account already exists, please choose another username.')),
         'INVALID_USERNAME': errorInfo(_('Invalid username.')),
         'UPDATED': successInfo(_('Profile updated success.')),
+        'INVALID_ACTION': errorInfo(_('Invalid action.')),
         'UPDATED_FAILED': errorInfo(_('Profile updated failed.')),
         'MEMBER_ASSIGNED': successInfo(_('Member assigned success.')),
         'MEMBER_REMOVED': successInfo(_('Member removed success.')),
         'MODERATOR_ASSIGNED_SUCCESS': successInfo(_('Moderators assigned success.')),
         'MODERATOR_REMOVED_SUCCESS': successInfo(_('Moderators removed success.')),
-        'INVALID_ACTION': errorInfo(_('Invalid action.')),
         'DELETED': successInfo(_('Selected accounts were deleted.')),
         'DISABLED': successInfo(_('Selected accounts were disabled.')),
         'ENABLED': successInfo(_('Selected accounts were enabled.')),
     {% set handlers = {
         'ALREADY_EXISTS': errorInfo(_('Account already exists, please choose another username.')),
         'UPDATED': successInfo(_('Profile updated success.')),
+        'INVALID_ACTION': errorInfo(_('Invalid action.')),
         'NO_DOMAIN_AVAILABLE': generalInfo(_('No domain under control.')),
         'DELETED': successInfo(_('Selected accounts were deleted.')),
         'DISABLED': successInfo(_('Selected accounts were disabled.')),
         {{ successInfo( _('Records are added. <a href="%s" target="_blank">View them now</a>') |format(ctx.homepath + '/system/' + listname), trusted=true) }}
     {% elif msg == 'DELETED' %}
         {{ successInfo( _('Selected records were deleted.') ) }}
+    {% elif msg == 'INVALID_ACTION' %}
+        {{ errorInfo(_('Invalid action.')) }}
     {% else %}
         {{ errorInfo( msg ) }}
     {% endif %}
     {% set handlers = {
         'RELEASED': successInfo(_('Mails were released.')),
         'DELETED': successInfo(_('Mails were deleted.')),
+        'INVALID_ACCOUNT': errorInfo(_('Invalid domain name or mail address.')),
         'INVALID_ACTION': errorInfo(_('Invalid action.')),
         'INVALID_MAILID': errorInfo(_('Invalid request data.')),
         'PERMISSION_DENIED': errorInfo(_('Permission denied.')),
 {% if msg is defined and msg is not sameas none and msg |string != '' %}
     {% set handlers = {
         'DELETED': successInfo(_('Selected log records were deleted.')),
+        'INVALID_ACTION': errorInfo(_('Invalid action.')),
         'INVALID_ACCOUNT': errorInfo(_('Invalid domain name or mail address.')),
         'PERMISSION_DENIED': errorInfo(_('Permission denied.')),
         }
         {{ errorInfo( _('Search keyword could not be empty.') ) }}
     {% elif msg == 'INVALID_MAIL' %}
         {{ errorInfo( _('Invalid mail address.') ) }}
-    {% elif msg == 'INVALID_MAIL' %}
+    {% elif msg == 'INVALID_ACTION' %}
         {{ errorInfo(_('Invalid action.')) }}
     {% else %}
         {{ errorInfo( msg ) }}