Added support for label group show order and i18n names
authorAlexander Ebert <ebert@woltlab.com>
Tue, 27 May 2014 16:11:30 +0000 (18:11 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 27 May 2014 16:11:30 +0000 (18:11 +0200)
16 files changed:
wcfsetup/install/files/acp/templates/labelAdd.tpl
wcfsetup/install/files/acp/templates/labelGroupAdd.tpl
wcfsetup/install/files/acp/templates/labelGroupList.tpl
wcfsetup/install/files/acp/templates/labelList.tpl
wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php
wcfsetup/install/files/lib/acp/form/LabelGroupEditForm.class.php
wcfsetup/install/files/lib/acp/page/LabelGroupListPage.class.php
wcfsetup/install/files/lib/data/label/group/LabelGroup.class.php
wcfsetup/install/files/lib/data/label/group/LabelGroupList.class.php
wcfsetup/install/files/lib/system/cache/builder/LabelCacheBuilder.class.php
wcfsetup/install/files/lib/system/label/LabelHandler.class.php
wcfsetup/install/files/lib/system/label/object/AbstractLabelObjectHandler.class.php
wcfsetup/install/files/lib/system/label/object/ILabelObjectHandler.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml
wcfsetup/setup/db/install.sql

index 3a49b3f053559440f043ce47d620cd5d57466787..25b2b3629952d7e22a300ab7dde55c80d3c72f1a 100644 (file)
@@ -49,7 +49,7 @@
                                                <select id="groupID" name="groupID">
                                                        <option value="0">{lang}wcf.global.noSelection{/lang}</option>
                                                        {foreach from=$labelGroupList item=group}
-                                                               <option value="{@$group->groupID}"{if $group->groupID == $groupID} selected="selected"{/if}>{$group->groupName}</option>
+                                                               <option value="{@$group->groupID}"{if $group->groupID == $groupID} selected="selected"{/if}>{$group}</option>
                                                        {/foreach}
                                                </select>
                                                {if $errorField == 'groupID'}
index a1d9bc42e8540203571512bef47094889e17bc3b..19ce26e6cde363fe4c310c60a4fc4f0781bf8f0d 100644 (file)
@@ -18,6 +18,8 @@
        {include file='aclPermissionJavaScript' containerID='groupPermissions' objectID=$groupID}
 {/if}
 
+{assign var=labelForceSelection value=$forceSelection}
+
 <header class="boxHeadline">
        <h1>{lang}wcf.acp.label.group.{$action}{/lang}</h1>
 </header>
@@ -54,7 +56,7 @@
                                <dl{if $errorField == 'groupName'} class="formError"{/if}>
                                        <dt><label for="groupName">{lang}wcf.acp.label.group.groupName{/lang}</label></dt>
                                        <dd>
-                                               <input type="text" id="groupName" name="groupName" value="{$groupName}" autofocus="autofocus" class="long" />
+                                               <input type="text" id="groupName" name="groupName" value="{$i18nPlainValues['groupName']}" autofocus="autofocus" class="long" />
                                                {if $errorField == 'groupName'}
                                                        <small class="innerError">
                                                                {if $errorType == 'empty'}
                                                                {/if}
                                                        </small>
                                                {/if}
+                                               {include file='multipleLanguageInputJavascript' elementIdentifier='groupName' forceSelection=false}
+                                       </dd>
+                               </dl>
+                               
+                               <dl>
+                                       <dt><label for="showOrder">{lang}wcf.acp.label.group.showOrder{/lang}</label></dt>
+                                       <dd>
+                                               <input type="number" min="0" id="showOrder" name="showOrder" class="tiny" value="{if $showOrder}{@$showOrder}{/if}" />
                                        </dd>
                                </dl>
                                
                                <dl>
-                                       <dt class="reversed"><label for="forceSelection">{lang}wcf.acp.label.group.forceSelection{/lang}</label></dt>
-                                       <dd><input type="checkbox" name="forceSelection" id="forceSelection" value="1"{if $forceSelection} checked="checked"{/if} /></dd>
+                                       <dt></dt>
+                                       <dd><label><input type="checkbox" name="forceSelection" id="forceSelection" value="1"{if $labelForceSelection} checked="checked"{/if} /> {lang}wcf.acp.label.group.forceSelection{/lang}</label></dd>
                                </dl>
                                
                                <dl id="groupPermissions">
index 556ab58ab4c35a8b648dfed796e77c4b1f53c0e4..710e5e1129a7f459e299bf48dbd1f5bde41d41c2 100644 (file)
@@ -47,6 +47,7 @@
                                <tr>
                                        <th class="columnID columnLabelGroupID{if $sortField == 'groupID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='LabelGroupList'}pageNo={@$pageNo}&sortField=groupID&sortOrder={if $sortField == 'groupID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
                                        <th class="columnTitle columnGroupName{if $sortField == 'groupName'} active {@$sortOrder}{/if}"><a href="{link controller='LabelGroupList'}pageNo={@$pageNo}&sortField=groupName&sortOrder={if $sortField == 'groupName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.label.group.groupName{/lang}</a></th>
+                                       <th class="columnDigits columnShowOrder{if $sortField == 'showOrder'} active {@$sortOrder}{/if}"><a href="{link controller='LabelGroupList'}pageNo={@$pageNo}&sortField=showOrder&sortOrder={if $sortField == 'showOrder' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.label.group.showOrder{/lang}</a></th>
                                        
                                        {event name='columnHeads'}
                                </tr>
@@ -62,7 +63,8 @@
                                                        {event name='rowButtons'}
                                                </td>
                                                <td class="columnID">{@$group->groupID}</td>
-                                               <td class="columnTitle columnGroupName"><a href="{link controller='LabelGroupEdit' object=$group}{/link}">{$group->groupName}</a></td>
+                                               <td class="columnTitle columnGroupName"><a href="{link controller='LabelGroupEdit' object=$group}{/link}">{$group}</a></td>
+                                               <td class="columnDigits columnShowOrder">{@$group->showOrder}</td>
                                                
                                                {event name='columns'}
                                        </tr>
index 494e1bc63b9a79a3a7c017943441b524107763ac..573d5b47b0aac162dccbe0da9a1ee8fe92334a68 100644 (file)
@@ -64,7 +64,7 @@
                                                </td>
                                                <td class="columnID">{@$label->labelID}</td>
                                                <td class="columnTitle columnLabel"><a href="{link controller='LabelEdit' object=$label}{/link}" title="{$label}" class="badge label{if $label->getClassNames()} {$label->getClassNames()}{/if}">{$label}</a></td>
-                                               <td class="columnText columnGroup">{$label->groupName}</td>
+                                               <td class="columnText columnGroup">{lang}{$label->groupName}{/lang}</td>
                                                
                                                {event name='columns'}
                                        </tr>
index 11573d0567696f5f5d3b8dc3a36b87ce22a4fc56..e08d1b2719c7397e71701aa6972a308f96745d55 100644 (file)
@@ -5,8 +5,10 @@ use wcf\data\object\type\ObjectTypeCache;
 use wcf\form\AbstractForm;
 use wcf\system\acl\ACLHandler;
 use wcf\system\exception\UserInputException;
+use wcf\system\language\I18nHandler;
 use wcf\system\WCF;
 use wcf\util\StringUtil;
+use wcf\data\label\group\LabelGroupEditor;
 
 /**
  * Shows the label group add form.
@@ -65,6 +67,12 @@ class LabelGroupAddForm extends AbstractForm {
         */
        public $objectTypeID = 0;
        
+       /**
+        * show order
+        * @var integer
+        */
+       public $showOrder = 0;
+       
        /**
         * @see \wcf\page\AbstractPage::readParameters()
         */
@@ -72,6 +80,8 @@ class LabelGroupAddForm extends AbstractForm {
                parent::readParameters();
                
                $this->objectTypeID = ACLHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.label');
+               
+               I18nHandler::getInstance()->register('groupName');
        }
        
        /**
@@ -80,9 +90,13 @@ class LabelGroupAddForm extends AbstractForm {
        public function readFormParameters() {
                parent::readFormParameters();
                
+               I18nHandler::getInstance()->readValues();
+               
+               if (I18nHandler::getInstance()->isPlainValue('groupName')) $this->groupName = I18nHandler::getInstance()->getValue('groupName');
+               
                if (isset($_POST['forceSelection'])) $this->forceSelection = true;
-               if (isset($_POST['groupName'])) $this->groupName = StringUtil::trim($_POST['groupName']);
                if (isset($_POST['objectTypes']) && is_array($_POST['objectTypes'])) $this->objectTypes = $_POST['objectTypes'];
+               if (isset($_POST['showOrder'])) $this->showOrder = intval($_POST['showOrder']);
        }
        
        /**
@@ -112,9 +126,19 @@ class LabelGroupAddForm extends AbstractForm {
        public function validate() {
                parent::validate();
                
-               // validate class name
-               if (empty($this->groupName)) {
-                       throw new UserInputException('groupName');
+               // validate group name
+               try {
+                       if (!I18nHandler::getInstance()->validateValue('groupName')) {
+                               if (I18nHandler::getInstance()->isPlainValue('groupName')) {
+                                       throw new UserInputException('groupName');
+                               }
+                               else {
+                                       throw new UserInputException('groupName', 'multilingual');
+                               }
+                       }
+               }
+               catch (UserInputException $e) {
+                       $this->errorType[$e->getField()] = $e->getType();
                }
                
                // validate object type relations
@@ -134,10 +158,21 @@ class LabelGroupAddForm extends AbstractForm {
                // save label
                $this->objectAction = new LabelGroupAction(array(), 'create', array('data' => array_merge($this->additionalFields, array(
                        'forceSelection' => ($this->forceSelection ? 1 : 0),
-                       'groupName' => $this->groupName
+                       'groupName' => $this->groupName,
+                       'showOrder' => $this->showOrder
                ))));
                $returnValues = $this->objectAction->executeAction();
                
+               if (!I18nHandler::getInstance()->isPlainValue('groupName')) {
+                       I18nHandler::getInstance()->save('groupName', 'wcf.acp.label.group'.$returnValues['returnValues']->groupID, 'wcf.acp.label', 1);
+                               
+                       // update group name
+                       $groupEditor = new LabelGroupEditor($returnValues['returnValues']);
+                       $groupEditor->update(array(
+                               'groupName' => 'wcf.acp.label.group'.$returnValues['returnValues']->groupID
+                       ));
+               }
+               
                // save acl
                ACLHandler::getInstance()->save($returnValues['returnValues']->groupID, $this->objectTypeID);
                ACLHandler::getInstance()->disableAssignVariables();
@@ -155,12 +190,15 @@ class LabelGroupAddForm extends AbstractForm {
                $this->forceSelection = false;
                $this->groupName = '';
                $this->objectTypes = array();
+               $this->showOrder = 0;
                $this->setObjectTypeRelations();
                
                // show success
                WCF::getTPL()->assign(array(
                        'success' => true
                ));
+               
+               I18nHandler::getInstance()->reset();
        }
        
        /**
@@ -170,13 +208,15 @@ class LabelGroupAddForm extends AbstractForm {
                parent::assignVariables();
                
                ACLHandler::getInstance()->assignVariables($this->objectTypeID);
+               I18nHandler::getInstance()->assignVariables();
                
                WCF::getTPL()->assign(array(
                        'action' => 'add',
                        'forceSelection' => $this->forceSelection,
                        'groupName' => $this->groupName,
                        'labelObjectTypeContainers' => $this->labelObjectTypeContainers,
-                       'objectTypeID' => $this->objectTypeID
+                       'objectTypeID' => $this->objectTypeID,
+                       'showOrder' => $this->showOrder
                ));
        }
        
index 5c89a0cd4c5c5f932478f8e15c08b1517b874578..e99522f9d35e4ccf37894fd65e75ae601284765d 100644 (file)
@@ -5,6 +5,7 @@ use wcf\data\label\group\LabelGroupAction;
 use wcf\form\AbstractForm;
 use wcf\system\acl\ACLHandler;
 use wcf\system\exception\IllegalLinkException;
+use wcf\system\language\I18nHandler;
 use wcf\system\WCF;
 
 /**
@@ -59,10 +60,20 @@ class LabelGroupEditForm extends LabelGroupAddForm {
        public function save() {
                AbstractForm::save();
                
+               $this->groupName = 'wcf.acp.label.group'.$this->group->groupID;
+               if (I18nHandler::getInstance()->isPlainValue('groupName')) {
+                       I18nHandler::getInstance()->remove($this->groupName);
+                       $this->groupName = I18nHandler::getInstance()->getValue('groupName');
+               }
+               else {
+                       I18nHandler::getInstance()->save('groupName', $this->groupName, 'wcf.acp.label', 1);
+               }
+               
                // update label
                $this->objectAction = new LabelGroupAction(array($this->groupID), 'update', array('data' => array_merge($this->additionalFields, array(
                        'forceSelection' => ($this->forceSelection ? 1 : 0),
-                       'groupName' => $this->groupName
+                       'groupName' => $this->groupName,
+                       'showOrder' => $this->showOrder
                ))));
                $this->objectAction->executeAction();
                
@@ -92,8 +103,11 @@ class LabelGroupEditForm extends LabelGroupAddForm {
                parent::readData();
                
                if (empty($_POST)) {
+                       I18nHandler::getInstance()->setOptions('groupName', 1, $this->group->groupName, 'wcf.acp.label.group\d+');
+                       
                        $this->forceSelection = ($this->group->forceSelection ? true : false);
                        $this->groupName = $this->group->groupName;
+                       $this->showOrder = $this->group->showOrder;
                }
        }
        
@@ -103,6 +117,8 @@ class LabelGroupEditForm extends LabelGroupAddForm {
        public function assignVariables() {
                parent::assignVariables();
                
+               I18nHandler::getInstance()->assignVariables(!empty($_POST));
+               
                WCF::getTPL()->assign(array(
                        'action' => 'edit',
                        'groupID' => $this->groupID,
index 592158651532d19fafaf3864bda866c23b0bf050..5f885e3bafb1bbff0e848a84a5cd0398c5e137b8 100644 (file)
@@ -21,12 +21,12 @@ class LabelGroupListPage extends SortablePage {
        /**
         * @see \wcf\page\SortablePage::$defaultSortField
         */
-       public $defaultSortField = 'groupName';
+       public $defaultSortField = 'showOrder';
        
        /**
         * @see \wcf\page\SortablePage::$validSortFields
         */
-       public $validSortFields = array('groupID', 'groupName');
+       public $validSortFields = array('groupID', 'groupName', 'showOrder');
        
        /**
         * @see \wcf\page\AbstractPage::$neededPermissions
index 1195de32d9f68e8d2efb3f1cfe2515e7466c06f7..f85272cf04f6b7cf6b3ce1dcb24dd5d77acf6eea 100644 (file)
@@ -2,6 +2,7 @@
 namespace wcf\data\label\group;
 use wcf\data\DatabaseObject;
 use wcf\system\request\IRouteController;
+use wcf\system\WCF;
 
 /**
  * Represents a label group.
@@ -28,6 +29,30 @@ class LabelGroup extends DatabaseObject implements IRouteController {
         * @see \wcf\data\ITitledObject::getTitle()
         */
        public function getTitle() {
-               return $this->groupName;
+               return WCF::getLanguage()->get($this->groupName);
+       }
+       
+       /**
+        * Returns label group title.
+        * 
+        * @return      string
+        */
+       public function __toString() {
+               return $this->getTitle();
+       }
+       
+       /**
+        * Callback for uasort() to sort label groups by show order and (if equal) group id.
+        * 
+        * @param       \wcf\data\DatabaseObject        $groupA
+        * @param       \wcf\data\DatabaseObject        $groupB
+        * @return      integer
+        */
+       public static function sortLabelGroups(DatabaseObject $groupA, DatabaseObject $groupB) {
+               if ($groupA->showOrder == $groupB->showOrder) {
+                       return ($groupA->groupID > $groupB->groupID) ? 1 : -1;
+               }
+               
+               return ($groupA->showOrder > $groupB->showOrder) ? 1 : -1;
        }
 }
index 84eaa4a8c5ae7235aae48f6bd12e221fa69caee9..5e848acbc4edef1b39320dbf43ebcf44756c047f 100644 (file)
@@ -17,4 +17,9 @@ class LabelGroupList extends DatabaseObjectList {
         * @see \wcf\data\DatabaseObjectList::$className
         */
        public $className = 'wcf\data\label\group\LabelGroup';
+       
+       /**
+        * @see \wcf\data\DatabaseObjectList::$sqlOrderBy
+        */
+       public $sqlOrderBy = 'label_group.showOrder ASC, label_group.groupID';
 }
index 39957cb31423e7528a730e1b84b500fdecc4986d..1a0172ac17148a854afbcb1f98ab5876c99b9700 100644 (file)
@@ -27,7 +27,6 @@ class LabelCacheBuilder extends AbstractCacheBuilder {
                
                // get label groups
                $groupList = new LabelGroupList();
-               $groupList->sqlOrderBy = 'groupName';
                $groupList->readObjects();
                $groups = $groupList->getObjects();
                foreach ($groups as &$group) {
index 8b6b3f319eb486f39a4844e2f704dab2b1f03bbf..f382e0d0a58d0ea35abf280798d52d853eeea5d9 100644 (file)
@@ -248,6 +248,22 @@ class LabelHandler extends SingletonFactory {
                        }
                }
                
+               // order label ids by label group
+               $labelGroups =& $this->labelGroups;
+               foreach ($data as &$labels) {
+                       usort($labels, function($a, $b) use($labelGroups) {
+                               $groupA = $labelGroups['groups'][$a->groupID];
+                               $groupB = $labelGroups['groups'][$b->groupID];
+                               
+                               if ($groupA->showOrder == $groupB->showOrder) {
+                                       return ($groupA->groupID > $groupB->groupID) ? 1 : -1;
+                               }
+                               
+                               return ($groupA->showOrder > $groupB->showOrder) ? 1 : -1;
+                       });
+               }
+               unset($labels);
+               
                return $data;
        }
        
@@ -298,6 +314,14 @@ class LabelHandler extends SingletonFactory {
                        $data[$groupID] = $this->labelGroups['groups'][$groupID];
                }
                
+               uasort($data, function($a, $b) {
+                       if ($a->showOrder == $b->showOrder) {
+                               return ($a->groupID > $b->groupID) ? 1 : -1;
+                       }
+                       
+                       return ($a->showOrder > $b->showOrder) ? 1 : -1;
+               });
+               
                return $data;
        }
        
index 9247aa7f7d3a8bec06da6431e21f7e465a5539c7..013aef3a9a8f2f5c077d452cba4eeb8d0020d010 100644 (file)
@@ -64,13 +64,15 @@ abstract class AbstractLabelObjectHandler extends SingletonFactory implements IL
                        $data[$groupID] = $this->labelGroups[$groupID];
                }
                
+               uasort($data, array('\wcf\data\label\group\LabelGroup', 'sortLabelGroups'));
+               
                return $data;
        }
        
        /**
         * @see \wcf\system\label\manager\ILabelObjectHandler::validateLabelIDs()
         */
-       public function validateLabelIDs(array $labelIDs, $optionName = '') {
+       public function validateLabelIDs(array $labelIDs, $optionName = '', $legacyReturnValue = true) {
                $optionID = 0;
                if (!empty($optionName)) {
                        $optionID = LabelHandler::getInstance()->getOptionID($optionName);
@@ -79,21 +81,31 @@ abstract class AbstractLabelObjectHandler extends SingletonFactory implements IL
                        }
                }
                
+               $validationErrors = array();
                $satisfiedGroups = array();
                foreach ($labelIDs as $groupID => $labelID) {
                        // only one label per group is allowed
                        if (is_array($labelID)) {
-                               return false;
+                               $validationErrors[$groupID] = 'invalid';
+                               continue;
+                       }
+                       
+                       // label group id is unknown
+                       if (!isset($this->labelGroups[$groupID])) {
+                               $validationErrors[0] = 'invalid';
+                               continue;
                        }
                        
-                       // label group id is unknown or label id is invalid for this group
-                       if (!isset($this->labelGroups[$groupID]) || !$this->labelGroups[$groupID]->isValid($labelID)) {
-                               return false;
+                       // label id is invalid for this group
+                       if (!$this->labelGroups[$groupID]->isValid($labelID)) {
+                               $validationErrors[$groupID] = 'invalid';
+                               continue;
                        }
                        
                        // check permission
                        if ($optionID && !$this->labelGroups[$groupID]->getPermission($optionID)) {
-                               return false;
+                               $validationErrors[0] = 'invalid';
+                               continue;
                        }
                        
                        $satisfiedGroups[] = $groupID;
@@ -107,11 +119,19 @@ abstract class AbstractLabelObjectHandler extends SingletonFactory implements IL
                                        continue;
                                }
                                
-                               return false;
+                               $validationErrors[$labelGroup->groupID] = 'missing';
+                               continue;
                        }
                }
                
-               return true;
+               if ($legacyReturnValue) {
+                       // WCF 2.0: boolean true/false
+                       return (empty($validationErrors));
+               }
+               else {
+                       // WCF 2.1+: detailed error report (empty array if validation passed)
+                       return $validationErrors;
+               }
        }
        
        /**
index 3e322c0e00c9c9abdbe264c441e25b92f2391135..ebb90f8ec6cd402dadb685bf8aa31857968770e7 100644 (file)
@@ -33,9 +33,9 @@ interface ILabelObjectHandler {
         * 
         * @param       array<integer>          $labelIDs
         * @param       array                   $optionName
-        * @return      boolean
+        * @return      mixed
         */
-       public function validateLabelIDs(array $labelIDs, $optionName = '');
+       public function validateLabelIDs(array $labelIDs, $optionName = '', $legacyReturnValue = true);
        
        /**
         * Assigns labels to an object.
index 7af5c9d26680858b28ce165105ec9e6a35e4270f..ac381a80b5844954ce88b98e56edcbed9270bfd5 100644 (file)
                <item name="wcf.acp.label.group.edit"><![CDATA[Labelgruppe bearbeiten]]></item>
                <item name="wcf.acp.label.group.error.notValid"><![CDATA[Die gewählte Labelgruppe ist ungültig.]]></item>
                <item name="wcf.acp.label.group.forceSelection"><![CDATA[Label aus dieser Gruppe muss zwingend ausgewählt werden]]></item>
-               <item name="wcf.acp.label.group.groupName"><![CDATA[Gruppenname]]></item>
                <item name="wcf.acp.label.group.list"><![CDATA[Labelgruppen]]></item>
+               <item name="wcf.acp.label.group.showOrder"><![CDATA[Reihenfolge]]></item>
                <item name="wcf.acp.label.label"><![CDATA[Label]]></item>
                <item name="wcf.acp.label.list"><![CDATA[Labels]]></item>
        </category>
@@ -1929,6 +1929,7 @@ Fehler sind beispielsweise:
        
        <category name="wcf.label">
                <item name="wcf.label.all"><![CDATA[Alle]]></item>
+               <item name="wcf.label.error.missing"><![CDATA[Sie müssen ein Label auswählen.]]></item>
                <item name="wcf.label.error.notValid"><![CDATA[Die Labelauswahl ist ungültig.]]></item>
                <item name="wcf.label.label"><![CDATA[Label]]></item>
                <item name="wcf.label.labels"><![CDATA[Labels]]></item>
index 754e533aa7427aefd3b976435f368dfd5f138a37..621d5ead1f25e9d03e4e09f125bcae9d30f07dd6 100644 (file)
@@ -432,8 +432,8 @@ Examples for medium ID detection:
                <item name="wcf.acp.label.group.edit"><![CDATA[Edit Label Group]]></item>
                <item name="wcf.acp.label.group.error.notValid"><![CDATA[Chosen label group is invalid.]]></item>
                <item name="wcf.acp.label.group.forceSelection"><![CDATA[Force selection of a label]]></item>
-               <item name="wcf.acp.label.group.groupName"><![CDATA[Title]]></item>
                <item name="wcf.acp.label.group.list"><![CDATA[Label Groups]]></item>
+               <item name="wcf.acp.label.group.showOrder"><![CDATA[Display Order]]></item>
                <item name="wcf.acp.label.label"><![CDATA[Label]]></item>
                <item name="wcf.acp.label.list"><![CDATA[Labels]]></item>
        </category>
@@ -1872,6 +1872,7 @@ Errors are:
        
        <category name="wcf.label">
                <item name="wcf.label.all"><![CDATA[All]]></item>
+               <item name="wcf.label.error.missing"><![CDATA[You are required to select a label.]]></item>
                <item name="wcf.label.error.notValid"><![CDATA[The label selection is invalid.]]></item>
                <item name="wcf.label.label"><![CDATA[Label]]></item>
                <item name="wcf.label.labels"><![CDATA[Labels]]></item>
index 654ef966fead0476e701a952e486cfe103e6c6dd..a3c303891dd0cd9a45d3aea7a68e8a9c45a16f2f 100644 (file)
@@ -365,7 +365,8 @@ DROP TABLE IF EXISTS wcf1_label_group;
 CREATE TABLE wcf1_label_group (
        groupID INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
        groupName VARCHAR(80) NOT NULL,
-       forceSelection TINYINT(1) NOT NULL DEFAULT 0
+       forceSelection TINYINT(1) NOT NULL DEFAULT 0,
+       showOrder INT(10) NOT NULL DEFAULT 0
 );
 
 DROP TABLE IF EXISTS wcf1_label_group_to_object;