Add expiration date for user ban and disabled avatar/signature
authorMatthias Schmidt <gravatronics@live.com>
Sat, 28 Jun 2014 10:06:08 +0000 (12:06 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 28 Jun 2014 10:06:08 +0000 (12:06 +0200)
13 files changed:
com.woltlab.wcf/cronjob.xml
com.woltlab.wcf/templates/user.tpl
wcfsetup/install/files/acp/js/WCF.ACP.js
wcfsetup/install/files/acp/templates/userAdd.tpl
wcfsetup/install/files/acp/templates/userList.tpl
wcfsetup/install/files/js/WCF.User.js
wcfsetup/install/files/lib/acp/form/UserAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserEditForm.class.php
wcfsetup/install/files/lib/data/user/UserAction.class.php
wcfsetup/install/files/lib/system/cronjob/UserBanCronjob.class.php [new file with mode: 0644]
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml
wcfsetup/setup/db/install.sql

index 6a46e9969f26f8363199dad20dd782526dfbaf69..00a2771b30efd6a78daa04c8c058720bfd87ff83 100644 (file)
                        <canbeedited>1</canbeedited>
                        <canbedisabled>1</canbedisabled>
                </cronjob>
+               
+               <cronjob>
+                       <classname><![CDATA[wcf\system\cronjob\UserBanCronjob]]></classname>
+                       <description><![CDATA[Unbans users and enables disabled avatars and disabled signatures]]></description>
+                       <description language="de"><![CDATA[Entsperrt gesperrte Benutzer, Avatare und Signaturen]]></description>
+                       <startminute>0</startminute>
+                       <starthour>1</starthour>
+                       <startdom>*</startdom>
+                       <startmonth>*</startmonth>
+                       <startdow>*</startdow>
+                       <active>1</active>
+                       <canbeedited>1</canbeedited>
+                       <canbedisabled>1</canbedisabled>
+               </cronjob>
        </import>
 </data>
\ No newline at end of file
index b75979ee98f7915dc4ad3e46848f9c87be710292..75ea943af9c9e81b623197d2d40b200311d8d730 100644 (file)
                                WCF.Language.addObject({
                                        'wcf.user.ban': '{lang}wcf.user.ban{/lang}',
                                        'wcf.user.ban.confirmMessage': '{lang}wcf.user.ban.confirmMessage{/lang}',
+                                       'wcf.user.ban.expires': '{lang}wcf.user.ban.expires{/lang}',
+                                       'wcf.user.ban.expires.description': '{lang}wcf.user.ban.expires.description{/lang}',
+                                       'wcf.user.ban.neverExpires': '{lang}wcf.user.ban.neverExpires{/lang}',
                                        'wcf.user.ban.reason.description': '{lang}wcf.user.ban.reason.description{/lang}',
                                        'wcf.user.unban': '{lang}wcf.user.unban{/lang}',
                                        'wcf.user.disableAvatar': '{lang}wcf.user.disableAvatar{/lang}',
+                                       'wcf.user.ban.expires': '{lang}wcf.user.ban.expires{/lang}',
+                                       'wcf.user.ban.expires.description': '{lang}wcf.user.ban.expires.description{/lang}',
+                                       'wcf.user.ban.neverExpires': '{lang}wcf.user.ban.neverExpires{/lang}',
                                        'wcf.user.disableAvatar.confirmMessage': '{lang}wcf.user.disableAvatar.confirmMessage{/lang}',
+                                       'wcf.user.disableAvatar.expires': '{lang}wcf.user.disableAvatar.expires{/lang}',
+                                       'wcf.user.disableAvatar.expires.description': '{lang}wcf.user.disableAvatar.expires.description{/lang}',
+                                       'wcf.user.disableAvatar.neverExpires': '{lang}wcf.user.disableAvatar.neverExpires{/lang}',
                                        'wcf.user.disableSignature': '{lang}wcf.user.disableSignature{/lang}',
                                        'wcf.user.disableSignature.confirmMessage': '{lang}wcf.user.disableSignature.confirmMessage{/lang}',
+                                       'wcf.user.disableSignature.expires': '{lang}wcf.user.disableSignature.expires{/lang}',
+                                       'wcf.user.disableSignature.expires.description': '{lang}wcf.user.disableSignature.expires.description{/lang}',
+                                       'wcf.user.disableSignature.neverExpires': '{lang}wcf.user.disableSignature.neverExpires{/lang}',
                                        'wcf.user.edit': '{lang}wcf.user.edit{/lang}',
                                        'wcf.user.enableAvatar': '{lang}wcf.user.enableAvatar{/lang}',
                                        'wcf.user.enableSignature': '{lang}wcf.user.enableSignature{/lang}'
index 549baef027c5a79a1e8807fb514c99ef5633bd4a..f0d7ae3949aadcf81716aaa5f5f7e66df01f4553 100644 (file)
@@ -1988,7 +1988,6 @@ WCF.ACP.User.BanHandler = {
         * Initializes WCF.ACP.User.BanHandler on first use.
         */
        init: function() {
-               this._dialog = $('<div />').hide().appendTo(document.body);
                this._proxy = new WCF.Action.Proxy({
                        success: $.proxy(this._success, this)
                });
@@ -2048,19 +2047,57 @@ WCF.ACP.User.BanHandler = {
         * @param       array<integer>  userIDs
         */
        ban: function(userIDs) {
-               WCF.System.Confirmation.show(WCF.Language.get('wcf.acp.user.ban.sure'), $.proxy(function(action) {
-                       if (action === 'confirm') {
-                               this._proxy.setOption('data', {
-                                       actionName: 'ban',
-                                       className: 'wcf\\data\\user\\UserAction',
-                                       objectIDs: userIDs,
-                                       parameters: {
-                                               banReason: $('#userBanReason').val()
-                                       }
-                               });
-                               this._proxy.sendRequest();
+               if (this._dialog === null) {
+                       // create dialog
+                       this._dialog = $('<div />').hide().appendTo(document.body);
+                       this._dialog.append($('<fieldset><dl><dt><label for="userBanReason">' + WCF.Language.get('wcf.acp.user.banReason') + '</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>' + WCF.Language.get('wcf.acp.user.banReason.description') + '</small></dd></dl><dl><dt></dt><dd><label for="userBanNeverExpires"><input type="checkbox" name="userBanNeverExpires" id="userBanNeverExpires" checked="checked" /> ' + WCF.Language.get('wcf.acp.user.ban.neverExpires') + '</label></dd></dl><dl id="userBanExpiresSettings" style="display: none;"><dt><label for="userBanExpires">' + WCF.Language.get('wcf.acp.user.ban.expires') + '</label></dt><dd><input type="date" name="userBanExpires" id="userBanExpires" class="medium" min="' + new Date(TIME_NOW * 1000).toISOString() + '" data-ignore-timezone="true" /><small>' + WCF.Language.get('wcf.acp.user.ban.expires.description') + '</small></dd></dl></fieldset>'));
+                       this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">' + WCF.Language.get('wcf.global.button.submit') + '</button></div>'));
+                       
+                       this._dialog.find('#userBanNeverExpires').change(function() {
+                               $('#userBanExpiresSettings').toggle();
+                       });
+                       
+                       this._dialog.find('button').click($.proxy(this._submit, this));
+               }
+               else {
+                       // reset dialog
+                       $('#userBanReason').val('');
+                       $('#userBanNeverExpires').prop('checked', true);
+                       $('#userBanExpiresSettings').hide();
+                       $('#userBanExpiresDatePicker, #userBanExpires').val('');
+               }
+               
+               this._dialog.data('userIDs', userIDs);
+               this._dialog.wcfDialog({
+                       title: WCF.Language.get('wcf.acp.user.ban.sure')
+               });
+       },
+       
+       /**
+        * Handles submitting the ban dialog.
+        */
+       _submit: function() {
+               this._dialog.find('.innerError').remove();
+               
+               var $banExpires = '';
+               if (!$('#userBanNeverExpires').is(':checked')) {
+                       var $banExpires = $('#userBanExpiresDatePicker').val();
+                       if (!$banExpires) {
+                               this._dialog.find('#userBanExpiresSettings > dd > small').prepend($('<small class="innerError" />').text(WCF.Language.get('wcf.global.form.error.empty')));
+                               return
                        }
-               }, this), '', $('<fieldset><dl><dt><label for="userBanReason">' + WCF.Language.get('wcf.acp.user.banReason') + '</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>' + WCF.Language.get('wcf.acp.user.banReason.description') + '</small></dd></dl></fieldset>'));
+               }
+               
+               this._proxy.setOption('data', {
+                       actionName: 'ban',
+                       className: 'wcf\\data\\user\\UserAction',
+                       objectIDs: this._dialog.data('userIDs'),
+                       parameters: {
+                               banReason: $('#userBanReason').val(),
+                               banExpires: $banExpires
+                       }
+               });
+               this._proxy.sendRequest();
        },
        
        /**
@@ -2087,6 +2124,10 @@ WCF.ACP.User.BanHandler = {
                $notification.show();
                
                WCF.Clipboard.reload();
+               
+               if (data.actionName == 'ban') {
+                       this._dialog.wcfDialog('close');
+               }
        }
 };
 
index a7cf0cb07319394132813cb9d3d13f71e27f81ba..9365f03ee515bc36b81ad5caba631be1ca31cd6b 100644 (file)
                                                </dd>
                                        </dl>
                                        
+                                       <dl>
+                                               <dt></dt>
+                                               <dd><label><input type="checkbox" id="banNeverExpires" name="banNeverExpires" value="1" {if !$banExpires}checked="checked" {/if}/> {lang}wcf.acp.user.ban.neverExpires{/lang}</label></dd>
+                                       </dl>
+                                       
+                                       <dl id="banExpiresSetting">
+                                               <dt><label for="banExpires">{lang}wcf.acp.user.ban.expires{/lang}</label></dt>
+                                               <dd>
+                                                       <input type="date" name="banExpires" id="banExpires" min="{TIME_NOW|date:'Y-m-d'}" {if $banExpires} value="{$banExpires|date:'Y-m-d'}"{/if} class="medium" data-ignore-timezone="true" />
+                                                       <small>{lang}wcf.acp.user.ban.expires.description{/lang}</small>
+                                               </dd>
+                                       </dl>
+                                       
                                        {event name='banFields'}
                                </fieldset>
                                
                                <script data-relocate="true">
                                        //<![CDATA[
-                                       $('#banned').change(function (event) {
+                                       $('#banned').change(function() {
                                                if ($('#banned').is(':checked')) {
                                                        $('#banReason').attr('readonly', false);
+                                                       $('#banNeverExpires, #banExpires').enable();
+                                                       $('#banReason, #banNeverExpires, #banExpires').parents('dl').removeClass('disabled');
                                                }
                                                else {
                                                        $('#banReason').attr('readonly', true);
+                                                       $('#banNeverExpires, #banExpires').disable();
+                                                       $('#banReason, #banNeverExpires, #banExpires').parents('dl').addClass('disabled');
                                                }
                                        });
+                                       
                                        $('#banned').change();
+                                       
+                                       $('#banNeverExpires').change(function() {
+                                               if ($('#banNeverExpires').is(':checked')) {
+                                                       $('#banExpiresSetting').hide();
+                                               }
+                                               else {
+                                                       $('#banExpiresSetting').show();
+                                               }
+                                       });
+                                       
+                                       $('#banNeverExpires').change();
                                        //]]>
                                </script>
                        {/if}
                                                        <label><input id="signatureEnableHtml" name="signatureEnableHtml" type="checkbox" value="1"{if $signatureEnableHtml} checked="checked"{/if} /> {lang}wcf.message.settings.enableHtml{/lang}</label>
                                                </dd>
                                        </dl>
+                                       
+                                       {event name='signatureFields'}
                                </fieldset>
                                
                                {if $__wcf->session->getPermission('admin.user.canDisableSignature')}
                                                                <textarea name="disableSignatureReason" id="disableSignatureReason" cols="40" rows="10">{$disableSignatureReason}</textarea>
                                                        </dd>
                                                </dl>
+                                               
+                                               <dl>
+                                                       <dt></dt>
+                                                       <dd><label><input type="checkbox" id="disableSignatureNeverExpires" name="disableSignatureNeverExpires" value="1" {if !$disableSignatureExpires}checked="checked" {/if}/> {lang}wcf.acp.user.disableSignature.neverExpires{/lang}</label></dd>
+                                               </dl>
+                                               
+                                               <dl id="disableSignatureExpiresSetting">
+                                                       <dt><label for="disableSignatureExpiresExpires">{lang}wcf.acp.user.disableSignature.expires{/lang}</label></dt>
+                                                       <dd>
+                                                               <input type="date" name="disableSignatureExpires" id="disableSignatureExpires" min="{TIME_NOW|date:'Y-m-d'}" {if $disableSignatureExpires} value="{$disableSignatureExpires|date:'Y-m-d'}"{/if} class="medium" data-ignore-timezone="true" />
+                                                               <small>{lang}wcf.acp.user.disableSignature.expires.description{/lang}</small>
+                                                       </dd>
+                                               </dl>
+
+                                               {event name='disableSignatureFields'}
                                        </fieldset>
                                        
                                        <script data-relocate="true">
                                                //<![CDATA[
-                                               $('#disableSignature').change(function (event) {
+                                               $('#disableSignature').change(function() {
                                                        if ($('#disableSignature').is(':checked')) {
                                                                $('#disableSignatureReason').attr('readonly', false);
+                                                               $('#disableSignatureNeverExpires, #disableSignatureExpires').enable();
+                                                               $('#disableSignatureReason, #disableSignatureNeverExpires, #disableSignatureExpires').parents('dl').removeClass('disabled');
                                                        }
                                                        else {
                                                                $('#disableSignatureReason').attr('readonly', true);
+                                                               $('#disableSignatureNeverExpires, #disableSignatureExpires').disable();
+                                                               $('#disableSignatureReason, #disableSignatureNeverExpires, #disableSignatureExpires').parents('dl').addClass('disabled');
                                                        }
                                                });
+                                               
                                                $('#disableSignature').change();
+                                               
+                                               $('#disableSignatureNeverExpires').change(function() {
+                                                       if ($('#disableSignatureNeverExpires').is(':checked')) {
+                                                               $('#disableSignatureExpiresSetting').hide();
+                                                       }
+                                                       else {
+                                                               $('#disableSignatureExpiresSetting').show();
+                                                       }
+                                               });
+                                               
+                                               $('#disableSignatureNeverExpires').change();
                                                //]]>
                                        </script>
                                {/if}
+
+                               {event name='signatureFieldsets'}
                        </div>
                {/if}
                
                                                        </dd>
                                                </dl>
                                        {/if}
+
+                                       {event name='avatarFields'}
                                </fieldset>
                                
                                {if $__wcf->session->getPermission('admin.user.canDisableAvatar')}
                                                                <textarea name="disableAvatarReason" id="disableAvatarReason" cols="40" rows="10">{$disableAvatarReason}</textarea>
                                                        </dd>
                                                </dl>
+                                               
+                                               <dl>
+                                                       <dt></dt>
+                                                       <dd><label><input type="checkbox" id="disableAvatarNeverExpires" name="disableAvatarNeverExpires" value="1" {if !$disableAvatarExpires}checked="checked" {/if}/> {lang}wcf.acp.user.disableAvatar.neverExpires{/lang}</label></dd>
+                                               </dl>
+                                               
+                                               <dl id="disableAvatarExpiresSetting">
+                                                       <dt><label for="disableAvatarExpiresExpires">{lang}wcf.acp.user.disableAvatar.expires{/lang}</label></dt>
+                                                       <dd>
+                                                               <input type="date" name="disableAvatarExpires" id="disableAvatarExpires" min="{TIME_NOW|date:'Y-m-d'}" {if $disableAvatarExpires} value="{$disableAvatarExpires|date:'Y-m-d'}"{/if} class="medium" />
+                                                               <small>{lang}wcf.acp.user.disableAvatar.expires.description{/lang}</small>
+                                                       </dd>
+                                               </dl>
+
+                                               {event name='disableAvatarFields'}
                                        </fieldset>
                                        
                                        <script data-relocate="true">
-                                       //<![CDATA[
-                                       $(function() {
-                                               $('#disableAvatar').change(function (event) {
+                                               //<![CDATA[
+                                               $('#disableAvatar').change(function() {
                                                        if ($('#disableAvatar').is(':checked')) {
                                                                $('#disableAvatarReason').attr('readonly', false);
+                                                               $('#disableAvatarNeverExpires, #disableAvatarExpires').enable();
+                                                               $('#disableAvatarReason, #disableAvatarNeverExpires, #disableAvatarExpires').parents('dl').removeClass('disabled');
                                                        }
                                                        else {
                                                                $('#disableAvatarReason').attr('readonly', true);
+                                                               $('#disableAvatarNeverExpires, #disableAvatarExpires').disable();
+                                                               $('#disableAvatarReason, #disableAvatarNeverExpires, #disableAvatarExpires').parents('dl').addClass('disabled');
                                                        }
                                                });
+                                               
                                                $('#disableAvatar').change();
-                                       //]]>
+                                               
+                                               $('#disableAvatarNeverExpires').change(function() {
+                                                       if ($('#disableAvatarNeverExpires').is(':checked')) {
+                                                               $('#disableAvatarExpiresSetting').hide();
+                                                       }
+                                                       else {
+                                                               $('#disableAvatarExpiresSetting').show();
+                                                       }
+                                               });
+                                               
+                                               $('#disableAvatarNeverExpires').change();
+                                               //]]>
                                        </script>
                                {/if}
                                
                                        });
                                        //]]>
                                </script>
+
+                               {event name='avatarFieldsets'}
                        </div>
                {/if}
                
index eecc7761e2c2c341970864156a564f14b61c8475..c91867ee7fe2714e7b60c0d768a07cdde5ea5551 100644 (file)
@@ -27,6 +27,9 @@
                        'wcf.acp.user.banReason': '{lang}wcf.acp.user.banReason{/lang}',
                        'wcf.acp.user.banReason.description': '{lang}wcf.acp.user.banReason.description{/lang}',
                        'wcf.acp.user.ban.sure': '{lang}wcf.acp.user.ban.sure{/lang}',
+                       'wcf.acp.user.ban.expires': '{lang}wcf.acp.user.ban.expires{/lang}',
+                       'wcf.acp.user.ban.expires.description': '{lang}wcf.acp.user.ban.expires.description{/lang}',
+                       'wcf.acp.user.ban.neverExpires': '{lang}wcf.acp.user.ban.neverExpires{/lang}',
                        'wcf.acp.user.sendNewPassword.workerTitle': '{lang}wcf.acp.user.sendNewPassword.workerTitle{/lang}',
                        'wcf.acp.worker.abort.confirmMessage': '{lang}wcf.acp.worker.abort.confirmMessage{/lang}'
                });
index 7fa202b20cba2ef090a0961d7e234bc649343f85..d855778447ace3eb5ae3c03ea261e71fbc9efc84 100644 (file)
@@ -2775,6 +2775,12 @@ WCF.User.ObjectWatch.Subscribe = Class.extend({
  * Handles inline editing of users.
  */
 WCF.User.InlineEditor = WCF.InlineEditor.extend({
+       /**
+        * dialog object
+        * @var jQuery
+        */
+       _dialog: null,
+       
        /**
         * list of permissions
         * @var object
@@ -2851,13 +2857,27 @@ WCF.User.InlineEditor = WCF.InlineEditor.extend({
         * @param       string          reason
         */
        _executeReasonAction: function(userID, optionName, reason) {
+               var $optionName = this._dialog.data('optionName');
+               
+               this._dialog.find('.innerError').remove();
+               
+               var $banExpires = '';
+               if (!$('#' + $optionName + 'NeverExpires').is(':checked')) {
+                       var $banExpires = $('#' + $optionName + 'ExpiresDatePicker').val();
+                       if (!$banExpires) {
+                               this._dialog.find('#' + $optionName + 'ExpiresSettings > dd > small').prepend($('<small class="innerError" />').text(WCF.Language.get('wcf.global.form.error.empty')));
+                               return
+                       }
+               }
+               
                var $parameters = { };
-               $parameters[optionName + WCF.String.ucfirst('reason')] = reason;
+               $parameters[$optionName + 'Reason'] = $('#' + $optionName + 'Reason').val();
+               $parameters[$optionName + 'Expires'] = $banExpires;
                
                this._proxy.setOption('data', {
-                       actionName: optionName,
+                       actionName: $optionName,
                        className: 'wcf\\data\\user\\UserAction',
-                       objectIDs: [ userID ],
+                       objectIDs: [ this._dialog.data('userID') ],
                        parameters: $parameters
                });
                this._proxy.sendRequest();
@@ -2935,14 +2955,26 @@ WCF.User.InlineEditor = WCF.InlineEditor.extend({
         * @param       string          optionName
         */
        _showReasonDialog: function(userID, optionName) {
-               var $languageItem = 'wcf.user.' + optionName + '.reason.description';
-               var $reasonDescription = WCF.Language.get($languageItem);
+               if (this._dialog) {
+                       this._dialog.remove();
+               }
                
-               WCF.System.Confirmation.show(WCF.Language.get('wcf.user.' + optionName + '.confirmMessage'), $.proxy(function(action) {
-                       if (action === 'confirm') {
-                               this._executeReasonAction(userID, optionName, $('#wcfSystemConfirmationContent').find('textarea').val());
-                       }
-               }, this), { }, $('<fieldset><dl><dt>' + WCF.Language.get('wcf.global.reason') + '</dt><dd><textarea cols="40" rows="4" />' + ($reasonDescription != $languageItem ? '<small>' + $reasonDescription + '</small>' : '') + '</dd></dl></fieldset>'));
+               // create dialog
+               this._dialog = $('<div />').hide().appendTo(document.body);
+               this._dialog.append($('<fieldset><dl><dt><label for="' + optionName + 'Reason">' + WCF.Language.get('wcf.global.reason') + '</label></dt><dd><textarea id="' + optionName + 'Reason" cols="40" rows="3" />' + (WCF.Language.get('wcf.user.' + optionName + '.reason.description') != 'wcf.user.' + optionName + '.reason.description' ? '<small>' + WCF.Language.get('wcf.user.' + optionName + '.reason.description') + '</small>' : '') + '</dd></dl><dl><dt></dt><dd><label for="' + optionName + 'NeverExpires"><input type="checkbox" name="' + optionName + 'NeverExpires" id="' + optionName + 'NeverExpires" checked="checked" /> ' + WCF.Language.get('wcf.user.' + optionName + '.neverExpires') + '</label></dd></dl><dl id="' + optionName + 'ExpiresSettings" style="display: none;"><dt><label for="' + optionName + 'Expires">' + WCF.Language.get('wcf.user.' + optionName + '.expires') + '</label></dt><dd><input type="date" name="' + optionName + 'Expires" id="' + optionName + 'Expires" class="medium" min="' + new Date(TIME_NOW * 1000).toISOString() + '" data-ignore-timezone="true" /><small>' + WCF.Language.get('wcf.user.' + optionName + '.expires.description') + '</small></dd></dl></fieldset>'));
+               this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">' + WCF.Language.get('wcf.global.button.submit') + '</button></div>'));
+               
+               this._dialog.data('optionName', optionName).data('userID', userID);
+               
+               this._dialog.find('#' + optionName + 'NeverExpires').change(function() {
+                       $('#' + optionName + 'ExpiresSettings').toggle();
+               });
+               
+               this._dialog.find('button').click($.proxy(this._executeReasonAction, this));
+               
+               this._dialog.wcfDialog({
+                       title: WCF.Language.get('wcf.user.' + optionName + '.confirmMessage')
+               });
        },
        
        /**
@@ -2959,6 +2991,10 @@ WCF.User.InlineEditor = WCF.InlineEditor.extend({
                                $element.data($property, $data.data[$property]);
                        }
                }
+               
+               if (data.actionName == 'ban' || data.actionName == 'disableAvatar' || data.actionName == 'disableSignature') {
+                       this._dialog.wcfDialog('close');
+               }
        },
        
        /**
index 6ce77b9fe3e8b35e7351ee14f87d5ec65000bfc3..a2644c9e6358bc60b90418935905a7015a786c8c 100644 (file)
@@ -122,6 +122,12 @@ class UserAddForm extends UserOptionListForm {
         */
        public $disableSignatureReason = '';
        
+       /**
+        * date when the signature will be enabled again
+        * @var string
+        */
+       public $disableSignatureExpires = '';
+       
        /**
         * @see \wcf\form\IForm::readFormParameters()
         */
@@ -148,6 +154,12 @@ class UserAddForm extends UserOptionListForm {
                if (WCF::getSession()->getPermission('admin.user.canDisableSignature')) {
                        if (isset($_POST['disableSignatureReason'])) $this->disableSignatureReason = StringUtil::trim($_POST['disableSignatureReason']);
                        if (!empty($_POST['disableSignature'])) $this->disableSignature = 1;
+                       if ($this->disableSignature && !isset($_POST['disableSignatureNeverExpires'])) {
+                               if (isset($_POST['disableSignatureExpires'])) $this->disableSignatureExpires = StringUtil::trim($_POST['disableSignatureExpires']);
+                       }
+                       else {
+                               $this->disableSignatureExpires = '';
+                       }
                }
        }
        
@@ -257,8 +269,14 @@ class UserAddForm extends UserOptionListForm {
                );
                
                if (WCF::getSession()->getPermission('admin.user.canDisableSignature')) {
+                       $disableSignatureExpires = 0;
+                       if ($this->disableSignatureExpires) {
+                               $disableSignatureExpires = strtotime($this->disableSignatureExpires);
+                       }
+
                        $data['data']['disableSignature'] = $this->disableSignature;
                        $data['data']['disableSignatureReason'] = $this->disableSignatureReason;
+                       $data['data']['disableSignatureExpires'] = $disableSignatureExpires;
                }
                
                $this->objectAction = new UserAction(array(), 'create', $data);
@@ -271,7 +289,10 @@ class UserAddForm extends UserOptionListForm {
                ));
                
                // reset values
-               $this->username = $this->email = $this->confirmEmail = $this->password = $this->confirmPassword = '';
+               $this->signatureEnableHtml = $this->disableSignature = 0;
+               $this->signatureEnableSmilies = $this->signatureEnableBBCodes = 1;
+               $this->username = $this->email = $this->confirmEmail = $this->password = $this->confirmPassword = $this->userTitle = '';
+               $this->signature = $this->disableSignatureReason = $this->disableSignatureExpires = '';
                $this->groupIDs = array();
                $this->languageID = $this->getDefaultFormLanguageID();
                $this->optionHandler->resetOptionValues();
@@ -384,7 +405,8 @@ class UserAddForm extends UserOptionListForm {
                        'signatureEnableSmilies' => $this->signatureEnableSmilies,
                        'signatureEnableHtml' => $this->signatureEnableHtml,
                        'disableSignature' => $this->disableSignature,
-                       'disableSignatureReason' => $this->disableSignatureReason
+                       'disableSignatureReason' => $this->disableSignatureReason,
+                       'disableSignatureExpires' => $this->disableSignatureExpires
                ));
        }
        
index 05ea693c0b863fbaff2baf3b29c458613aff0a51..b71c02ac1b8a6f6d71de9389e630608b3a3016b6 100755 (executable)
@@ -61,6 +61,12 @@ class UserEditForm extends UserAddForm {
         */
        public $banReason = '';
        
+       /**
+        * date when the ban expires
+        * @var string
+        */
+       public $banExpires = '';
+       
        /**
         * user avatar object
         * @var \wcf\data\user\avatar\UserAvatar
@@ -85,6 +91,12 @@ class UserEditForm extends UserAddForm {
         */
        public $disableAvatarReason = '';
        
+       /**
+        * date when the avatar will be enabled again
+        * @var string
+        */
+       public $disableAvatarExpires = '';
+       
        /**
         * @see \wcf\page\IPage::readParameters()
         */
@@ -121,11 +133,24 @@ class UserEditForm extends UserAddForm {
                
                if (!empty($_POST['banned'])) $this->banned = 1;
                if (isset($_POST['banReason'])) $this->banReason = StringUtil::trim($_POST['banReason']);
+               if ($this->banned && !isset($_POST['banNeverExpires'])) {
+                       if (isset($_POST['banExpires'])) $this->banExpires = StringUtil::trim($_POST['banExpires']);
+               }
+               else {
+                       $this->banExpires = '';
+               }
+
                if (isset($_POST['avatarType'])) $this->avatarType = $_POST['avatarType'];
                
                if (WCF::getSession()->getPermission('admin.user.canDisableAvatar')) {
                        if (!empty($_POST['disableAvatar'])) $this->disableAvatar = 1;
                        if (isset($_POST['disableAvatarReason'])) $this->disableAvatarReason = StringUtil::trim($_POST['disableAvatarReason']);
+                       if ($this->disableAvatar && !isset($_POST['disableAvatarNeverExpires'])) {
+                               if (isset($_POST['disableAvatarExpires'])) $this->disableAvatarExpires = StringUtil::trim($_POST['disableAvatarExpires']);
+                       }
+                       else {
+                               $this->disableAvatarExpires = '';
+                       }
                }
        }
        
@@ -166,6 +191,7 @@ class UserEditForm extends UserAddForm {
                $this->languageID = $this->user->languageID;
                $this->banned = $this->user->banned;
                $this->banReason = $this->user->banReason;
+               $this->banExpires = $this->user->banExpires;
                $this->userTitle = $this->user->userTitle;
                
                $this->signature = $this->user->signature;
@@ -174,8 +200,10 @@ class UserEditForm extends UserAddForm {
                $this->signatureEnableHtml = $this->user->signatureEnableHtml;
                $this->disableSignature = $this->user->disableSignature;
                $this->disableSignatureReason = $this->user->disableSignatureReason;
+               $this->disableSignatureExpires = $this->user->disableSignatureExpires;
                $this->disableAvatar = $this->user->disableAvatar;
                $this->disableAvatarReason = $this->user->disableAvatarReason;
+               $this->disableAvatarExpires = $this->user->disableAvatarExpires;
                
                if ($this->user->avatarID) $this->avatarType = 'custom';
                else if (MODULE_GRAVATAR && $this->user->enableGravatar) $this->avatarType = 'gravatar';
@@ -198,7 +226,9 @@ class UserEditForm extends UserAddForm {
                        'avatarType' => $this->avatarType,
                        'disableAvatar' => $this->disableAvatar,
                        'disableAvatarReason' => $this->disableAvatarReason,
-                       'userAvatar' => $this->userAvatar
+                       'disableAvatarExpires' => $this->disableAvatarExpires,
+                       'userAvatar' => $this->userAvatar,
+                       'banExpires' => $this->banExpires
                ));
        }
        
@@ -238,11 +268,6 @@ class UserEditForm extends UserAddForm {
                        break;
                }
                
-               if (WCF::getSession()->getPermission('admin.user.canDisableAvatar')) {
-                       $avatarData['disableAvatar'] = $this->disableAvatar;
-                       $avatarData['disableAvatarReason'] = $this->disableAvatarReason;
-               }
-               
                $this->additionalFields = array_merge($this->additionalFields, $avatarData);
                
                // add default groups
@@ -257,18 +282,13 @@ class UserEditForm extends UserAddForm {
                
                // save user
                $saveOptions = $this->optionHandler->save();
-               $this->additionalFields['languageID'] = $this->languageID;
-               if (WCF::getSession()->getPermission('admin.user.canBanUser')) {
-                       $this->additionalFields['banned'] = $this->banned;
-                       $this->additionalFields['banReason'] = $this->banReason;
-               }
+
                $data = array(
                        'data' => array_merge($this->additionalFields, array(
                                'username' => $this->username,
                                'email' => $this->email,
                                'password' => $this->password,
-                               'banned' => $this->banned,
-                               'banReason' => $this->banReason,
+                               'languageID' => $this->languageID,
                                'userTitle' => $this->userTitle,
                                'signature' => $this->signature,
                                'signatureEnableBBCodes' => $this->signatureEnableBBCodes,
@@ -279,10 +299,47 @@ class UserEditForm extends UserAddForm {
                        'languageIDs' => $this->visibleLanguages,
                        'options' => $saveOptions
                );
+
+               // handle ban
+               if (WCF::getSession()->getPermission('admin.user.canBanUser')) {
+                       if ($this->banExpires) {
+                               $this->banExpires = strtotime($this->banExpires);
+                       }
+                       else {
+                               $this->banExpires = 0;
+                       }
+                       
+                       $data['data']['banned'] = $this->banned;
+                       $data['data']['banReason'] = $this->banReason;
+                       $data['data']['banExpires'] = $this->banExpires;
+               }
                
+               // handle disabled signature
                if (WCF::getSession()->getPermission('admin.user.canDisableSignature')) {
+                       if ($this->disableSignatureExpires) {
+                               $this->disableSignatureExpires = strtotime($this->disableSignatureExpires);
+                       }
+                       else {
+                               $this->disableSignatureExpires = 0;
+                       }
+                       
                        $data['data']['disableSignature'] = $this->disableSignature;
                        $data['data']['disableSignatureReason'] = $this->disableSignatureReason;
+                       $data['data']['disableSignatureExpires'] = $this->disableSignatureExpires;
+               }
+               
+               // handle disabled avatar
+               if (WCF::getSession()->getPermission('admin.user.canDisableAvatar')) {
+                       if ($this->disableAvatarExpires) {
+                               $this->disableAvatarExpires = strtotime($this->disableAvatarExpires);
+                       }
+                       else {
+                               $this->disableAvatarExpires = 0;
+                       }
+                       
+                       $data['data']['disableAvatar'] = $this->disableAvatar;
+                       $data['data']['disableAvatarReason'] = $this->disableAvatarReason;
+                       $data['data']['disableAvatarExpires'] = $this->disableAvatarExpires;
                }
                
                $this->objectAction = new UserAction(array($this->userID), 'update', $data);
index f6dd24e09fcbb899cb54a89b2d05876c7ea4582c..c15355429bb710394031af808297436971046274 100644 (file)
@@ -188,31 +188,48 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
         * Validates the ban action.
         */
        public function validateBan() {
-               WCF::getSession()->checkPermissions(array('admin.user.canBanUser'));
+               $this->validateUnban();
                
-               $this->__validateAccessibleGroups();
+               $this->readString('banReason', true);
+               $this->readString('banExpires', true);
        }
        
        /**
         * Validates the unban action.
         */
        public function validateUnban() {
-               $this->validateBan();
+               WCF::getSession()->checkPermissions(array('admin.user.canBanUser'));
+               
+               $this->__validateAccessibleGroups();
        }
        
        /**
         * Bans users.
         */
        public function ban() {
+               $banExpires = $this->parameters['banExpires'];
+               if ($banExpires) {
+                       $banExpires = strtotime($banExpires);
+               }
+               else {
+                       $banExpires = 0;
+               }
+               
                $conditionBuilder = new PreparedStatementConditionBuilder();
                $conditionBuilder->add('userID IN (?)', array($this->objectIDs));
+               
                $sql = "UPDATE  wcf".WCF_N."_user
                        SET     banned = ?,
-                               banReason = ?
+                               banReason = ?,
+                               banExpires = ?
                        ".$conditionBuilder;
                $statement = WCF::getDB()->prepareStatement($sql);
                $statement->execute(
-                       array_merge(array(1, $this->parameters['banReason']), $conditionBuilder->getParameters())
+                       array_merge(array(
+                               1,
+                               $this->parameters['banReason'],
+                               $banExpires
+                       ), $conditionBuilder->getParameters())
                );
                
                $this->unmarkItems();
@@ -224,11 +241,18 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
        public function unban() {
                $conditionBuilder = new PreparedStatementConditionBuilder();
                $conditionBuilder->add('userID IN (?)', array($this->objectIDs));
+               
                $sql = "UPDATE  wcf".WCF_N."_user
-                       SET     banned = 0
+                       SET     banned = ?,
+                               banExpires = ?
                        ".$conditionBuilder;
                $statement = WCF::getDB()->prepareStatement($sql);
-               $statement->execute($conditionBuilder->getParameters());
+               $statement->execute(
+                       array_merge(array(
+                               0,
+                               0
+                       ), $conditionBuilder->getParameters())
+               );
        }
        
        /**
@@ -580,6 +604,7 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
                $this->validateEnableSignature();
                
                $this->readString('disableSignatureReason', true);
+               $this->readString('disableSignatureExpires', true);
        }
        
        /**
@@ -590,10 +615,19 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
                        $this->readObjects();
                }
                
+               $disableSignatureExpires = $this->parameters['disableSignatureExpires'];
+               if ($disableSignatureExpires) {
+                       $disableSignatureExpires = strtotime($disableSignatureExpires);
+               }
+               else {
+                       $disableSignatureExpires = 0;
+               }
+               
                foreach ($this->objects as $userEditor) {
                        $userEditor->update(array(
                                'disableSignature' => 1,
-                               'disableSignatureReason' => $this->parameters['disableSignatureReason']
+                               'disableSignatureReason' => $this->parameters['disableSignatureReason'],
+                               'disableSignatureExpires' => $disableSignatureExpires
                        ));
                }
        }
@@ -637,6 +671,7 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
                $this->validateEnableAvatar();
                
                $this->readString('disableAvatarReason', true);
+               $this->readString('disableAvatarExpires', true);
        }
        
        /**
@@ -646,11 +681,20 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
                if (empty($this->objects)) {
                        $this->readObjects();
                }
+
+               $disableAvatarExpires = $this->parameters['disableAvatarExpires'];
+               if ($disableAvatarExpires) {
+                       $disableAvatarExpires = strtotime($disableAvatarExpires);
+               }
+               else {
+                       $disableAvatarExpires = 0;
+               }
                
                foreach ($this->objects as $userEditor) {
                        $userEditor->update(array(
                                'disableAvatar' => 1,
-                               'disableAvatarReason' => $this->parameters['disableAvatarReason']
+                               'disableAvatarReason' => $this->parameters['disableAvatarReason'],
+                               'disableAvatarExpires' => $disableAvatarExpires
                        ));
                }
        }
diff --git a/wcfsetup/install/files/lib/system/cronjob/UserBanCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/UserBanCronjob.class.php
new file mode 100644 (file)
index 0000000..19114c2
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+namespace wcf\system\cronjob;
+use wcf\data\cronjob\Cronjob;
+use wcf\system\WCF;
+
+/**
+ * Unbans users and enables disabled avatars and disabled signatures.
+ * 
+ * @author     Matthias Schmidt
+ * @copyright  2001-2014 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package    com.woltlab.wcf
+ * @subpackage system.cronjob
+ * @category   Community Framework
+ */
+class UserBanCronjob extends AbstractCronjob {
+       /**
+        * @see \wcf\system\cronjob\ICronjob::execute()
+        */
+       public function execute(Cronjob $cronjob) {
+               parent::execute($cronjob);
+               
+               // unban users
+               $sql = "UPDATE  wcf".WCF_N."_user
+                       SET     banned = ?,
+                               banExpires = ?
+                       WHERE   banned = ?
+                               AND banExpires <= ?";
+               $statement = WCF::getDB()->prepareStatement($sql);
+               $statement->execute(array(
+                       0,
+                       0,
+                       1,
+                       TIME_NOW
+               ));
+               
+               // enable avatars
+               $sql = "UPDATE  wcf".WCF_N."_user
+                       SET     disableAvatar = ?,
+                               disableAvatarExpires = ?
+                       WHERE   disableAvatar = ?
+                               AND disableAvatarExpires <= ?";
+               $statement = WCF::getDB()->prepareStatement($sql);
+               $statement->execute(array(
+                       0,
+                       0,
+                       1,
+                       TIME_NOW
+               ));
+               
+               // enable signatures
+               $sql = "UPDATE  wcf".WCF_N."_user
+                       SET     disableSignature = ?,
+                               disableSignatureExpires = ?
+                       WHERE   disableSignature = ?
+                               AND disableSignatureExpires <= ?";
+               $statement = WCF::getDB()->prepareStatement($sql);
+               $statement->execute(array(
+                       0,
+                       0,
+                       1,
+                       TIME_NOW
+               ));
+       }
+}
index e21e70976cb24b48c97856e9618f0c46edaac848..a80b00bf42fa1208e6016e58db57dc6656a54714 100644 (file)
@@ -1440,6 +1440,9 @@ GmbH=Gesellschaft mit beschränkter Haftung]]></item>
                <item name="wcf.acp.user.banReason.description"><![CDATA[Die Begründung wird dem gesperrten Benutzer beim Aufruf der Seite angezeigt.]]></item>
                <item name="wcf.acp.user.ban"><![CDATA[Sperren]]></item>
                <item name="wcf.acp.user.unban"><![CDATA[Sperrung aufheben]]></item>
+               <item name="wcf.acp.user.ban.expires"><![CDATA[Entsperrung]]></item>
+               <item name="wcf.acp.user.ban.expires.description"><![CDATA[Der Benutzer wird zum festgelegten Zeitpunkt automatisch entsperrt.]]></item>
+               <item name="wcf.acp.user.ban.neverExpires"><![CDATA[Dauerhafte Sperrung]]></item>
                <item name="wcf.acp.user.ban.sure"><![CDATA[Wollen Sie den/die Benutzer wirklich sperren?]]></item>
                <item name="wcf.acp.user.delete.sure"><![CDATA[Wollen Sie Benutzer „{$user->username}“ wirklich löschen?]]></item>
                <item name="wcf.acp.user.edit"><![CDATA[Benutzer bearbeiten]]></item>
@@ -1567,6 +1570,12 @@ Wenn Sie unter <em>System -&gt; Optionen -&gt; Allgemein -&gt; E-Mails</em> alle
                <item name="wcf.acp.user.disableSignatureReason"><![CDATA[Begründung]]></item>
                <item name="wcf.acp.user.disableAvatar"><![CDATA[Avatar sperren]]></item>
                <item name="wcf.acp.user.disableAvatarReason"><![CDATA[Begründung]]></item>
+               <item name="wcf.acp.user.disableAvatar.expires"><![CDATA[Entsperrung]]></item>
+               <item name="wcf.acp.user.disableAvatar.expires.description"><![CDATA[Der Avatar des Benutzer wird zum festgelegten Zeitpunkt automatisch entsperrt.]]></item>
+               <item name="wcf.acp.user.disableAvatar.neverExpires"><![CDATA[Dauerhafte Sperrung]]></item>
+               <item name="wcf.acp.user.disableSignature.expires"><![CDATA[Entsperrung]]></item>
+               <item name="wcf.acp.user.disableSignature.expires.description"><![CDATA[Die Signatur des Benutzer wird zum festgelegten Zeitpunkt automatisch entsperrt.]]></item>
+               <item name="wcf.acp.user.disableSignature.neverExpires"><![CDATA[Dauerhafte Sperrung]]></item>
                <item name="wcf.acp.user.disable"><![CDATA[Deaktivieren]]></item>
                <item name="wcf.acp.user.enable"><![CDATA[Aktivieren]]></item>
                <item name="wcf.acp.user.quickSearch.disabled"><![CDATA[Nicht aktivierte Benutzer]]></item>
@@ -2628,13 +2637,22 @@ Wenn Sie Probleme mit der Aktivierung haben, wenden Sie sich bitte an den Admini
                <item name="wcf.user.moderate"><![CDATA[Benutzer moderieren]]></item>
                <item name="wcf.user.ban"><![CDATA[Benutzer sperren]]></item>
                <item name="wcf.user.ban.confirmMessage"><![CDATA[Wollen Sie den Benutzer wirklich sperren?]]></item>
+               <item name="wcf.user.ban.expires"><![CDATA[Entsperrung]]></item>
+               <item name="wcf.user.ban.expires.description"><![CDATA[Der Benutzer wird zum festgelegten Zeitpunkt automatisch entsperrt.]]></item>
+               <item name="wcf.user.ban.neverExpires"><![CDATA[Dauerhafte Sperrung]]></item>
                <item name="wcf.user.ban.reason.description"><![CDATA[Die Begründung wird dem gesperrten Benutzer beim Aufruf der Seite angezeigt.]]></item>
                <item name="wcf.user.unban"><![CDATA[Benutzer entsperren]]></item>
                <item name="wcf.user.disableAvatar"><![CDATA[Avatar sperren]]></item>
                <item name="wcf.user.disableAvatar.confirmMessage"><![CDATA[Wollen Sie den Avatar des Benutzers wirklich sperren?]]></item>
+               <item name="wcf.user.disableAvatar.expires"><![CDATA[Entsperrung]]></item>
+               <item name="wcf.user.disableAvatar.expires.description"><![CDATA[Der Avatar des Benutzer wird zum festgelegten Zeitpunkt automatisch entsperrt.]]></item>
+               <item name="wcf.user.disableAvatar.neverExpires"><![CDATA[Dauerhafte Sperrung]]></item>
                <item name="wcf.user.enableAvatar"><![CDATA[Avatar entsperren]]></item>
                <item name="wcf.user.disableSignature"><![CDATA[Signatur sperren]]></item>
                <item name="wcf.user.disableSignature.confirmMessage"><![CDATA[Wollen Sie die Signatur des Benutzers wirklich sperren?]]></item>
+               <item name="wcf.user.disableSignature.expires"><![CDATA[Entsperrung]]></item>
+               <item name="wcf.user.disableSignature.expires.description"><![CDATA[Die Signatur des Benutzer wird zum festgelegten Zeitpunkt automatisch entsperrt.]]></item>
+               <item name="wcf.user.disableSignature.neverExpires"><![CDATA[Dauerhafte Sperrung]]></item>
                <item name="wcf.user.enableSignature"><![CDATA[Signatur entsperren]]></item>
                <item name="wcf.user.edit"><![CDATA[Benutzer bearbeiten]]></item>
                <item name="wcf.user.birthdayToday"><![CDATA[Hat heute Geburtstag]]></item>
index 98d82ff01e8087f18c52d76657c3b2a1b2beaaf2..1e44f4edc3563cac21341be4710d18b0d09ea540 100644 (file)
@@ -1407,6 +1407,9 @@ GmbH=Gesellschaft mit beschränkter Haftung]]></item>
                <item name="wcf.acp.user.banUser.description"><![CDATA[The user is permanently banned from using any site functions and will be notified on site access.]]></item>
                <item name="wcf.acp.user.banReason"><![CDATA[Reason]]></item>
                <item name="wcf.acp.user.banReason.description"><![CDATA[The reason will be displayed for the affected users.]]></item>
+               <item name="wcf.acp.user.ban.expires"><![CDATA[Unbanning]]></item>
+               <item name="wcf.acp.user.ban.expires.description"><![CDATA[The user will be automatically unbanned at the entered point in time.]]></item>
+               <item name="wcf.acp.user.ban.neverExpires"><![CDATA[Permanent Ban]]></item>
                <item name="wcf.acp.user.ban"><![CDATA[Ban]]></item>
                <item name="wcf.acp.user.unban"><![CDATA[Unban]]></item>
                <item name="wcf.acp.user.ban.sure"><![CDATA[Do you really want to ban this user?]]></item>
@@ -1536,6 +1539,12 @@ You can define the default sender in <em>System -&gt; Options -&gt; General -&gt
                <item name="wcf.acp.user.disableSignatureReason"><![CDATA[Reason]]></item>
                <item name="wcf.acp.user.disableAvatar"><![CDATA[Block avatar]]></item>
                <item name="wcf.acp.user.disableAvatarReason"><![CDATA[Reason]]></item>
+               <item name="wcf.acp.user.disableAvatar.expires"><![CDATA[Unblocking]]></item>
+               <item name="wcf.acp.user.disableAvatar.expires.description"><![CDATA[The avatar of the user will be automatically unblocked at the entered point in time.]]></item>
+               <item name="wcf.acp.user.disableAvatar.neverExpires"><![CDATA[Permanent Block]]></item>
+               <item name="wcf.acp.user.disableSignature.expires"><![CDATA[Unblocking]]></item>
+               <item name="wcf.acp.user.disableSignature.expires.description"><![CDATA[The signature of the user will be automatically unblocked at the entered point in time.]]></item>
+               <item name="wcf.acp.user.disableSignature.neverExpires"><![CDATA[Permanent Block]]></item>
                <item name="wcf.acp.user.disable"><![CDATA[Disable]]></item>
                <item name="wcf.acp.user.enable"><![CDATA[Approve]]></item>
                <item name="wcf.acp.user.quickSearch.disabled"><![CDATA[Users awaiting approval]]></item>
@@ -2486,13 +2495,22 @@ If you cannot activate your email address or have any troubles following the ins
                <item name="wcf.user.moderate"><![CDATA[Moderate User]]></item>
                <item name="wcf.user.ban"><![CDATA[Ban User]]></item>
                <item name="wcf.user.ban.confirmMessage"><![CDATA[Do you really want to ban this user?]]></item>
+               <item name="wcf.user.ban.expires"><![CDATA[Unbanning]]></item>
+               <item name="wcf.user.ban.expires.description"><![CDATA[The user will be automatically unbanned at the entered point in time.]]></item>
+               <item name="wcf.user.ban.neverExpires"><![CDATA[Permanent Ban]]></item>
                <item name="wcf.user.ban.reason.description"><![CDATA[The reason will be displayed for the user when visiting the site.]]></item>
                <item name="wcf.user.unban"><![CDATA[Unban User]]></item>
                <item name="wcf.user.disableAvatar"><![CDATA[Block Avatar]]></item>
                <item name="wcf.user.disableAvatar.confirmMessage"><![CDATA[Do you really want to block the avatar of this user?]]></item>
+               <item name="wcf.user.disableAvatar.expires"><![CDATA[Unblocking]]></item>
+               <item name="wcf.user.disableAvatar.expires.description"><![CDATA[The avatar of the user will be automatically unblocked at the entered point in time.]]></item>
+               <item name="wcf.user.disableAvatar.neverExpires"><![CDATA[Permanent Block]]></item>
                <item name="wcf.user.enableAvatar"><![CDATA[Unblock Avatar]]></item>
                <item name="wcf.user.disableSignature"><![CDATA[Block Signature]]></item>
                <item name="wcf.user.disableSignature.confirmMessage"><![CDATA[Do you really want to block the signature of this user?]]></item>
+               <item name="wcf.user.disableSignature.expires"><![CDATA[Unblocking]]></item>
+               <item name="wcf.user.disableSignature.expires.description"><![CDATA[The signature of the user will be automatically unblocked at the entered point in time.]]></item>
+               <item name="wcf.user.disableSignature.neverExpires"><![CDATA[Permanent Block]]></item>
                <item name="wcf.user.enableSignature"><![CDATA[Unblock Signature]]></item>
                <item name="wcf.user.edit"><![CDATA[Edit User]]></item>
                <item name="wcf.user.birthdayToday"><![CDATA[It is their birthday]]></item>
index 8b0dfc1b7fcbc8c5e4623335083a1304de1da0c6..c67034eb14437cea4b840948266ca5a2b5f38305 100644 (file)
@@ -1034,6 +1034,7 @@ CREATE TABLE wcf1_user (
        styleID INT(10) NOT NULL DEFAULT 0,
        banned TINYINT(1) NOT NULL DEFAULT 0,
        banReason MEDIUMTEXT NULL,
+       banExpires INT(10) NOT NULL DEFAULT 0,
        activationCode INT(10) NOT NULL DEFAULT 0,
        lastLostPasswordRequestTime INT(10) NOT NULL DEFAULT 0,
        lostPasswordKey VARCHAR(40) NOT NULL DEFAULT '',
@@ -1046,6 +1047,7 @@ CREATE TABLE wcf1_user (
        avatarID INT(10),
        disableAvatar TINYINT(1) NOT NULL DEFAULT 0,
        disableAvatarReason TEXT,
+       disableAvatarExpires INT(10) NOT NULL DEFAULT 0,
        enableGravatar TINYINT(1) NOT NULL DEFAULT 0,
        signature TEXT,
        signatureEnableBBCodes TINYINT(1) NOT NULL DEFAULT 1,
@@ -1053,6 +1055,7 @@ CREATE TABLE wcf1_user (
        signatureEnableSmilies TINYINT(1) NOT NULL DEFAULT 1,
        disableSignature TINYINT(1) NOT NULL DEFAULT 0,
        disableSignatureReason TEXT,
+       disableSignatureExpires INT(10) NOT NULL DEFAULT 0,
        lastActivityTime INT(10) NOT NULL DEFAULT 0,
        profileHits INT(10) NOT NULL DEFAULT 0,
        rankID INT(10),