From: Alexander Ebert Date: Mon, 17 Jul 2017 18:06:34 +0000 (+0200) Subject: Filtering labels by group now lifts the limit X-Git-Tag: 3.1.0_Alpha_1~250 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0bb24a0324545aad18010f750bc3eb306ad8ce6f;p=GitHub%2FWoltLab%2FWCF.git Filtering labels by group now lifts the limit Closes #2318 --- diff --git a/wcfsetup/install/files/lib/acp/page/LabelListPage.class.php b/wcfsetup/install/files/lib/acp/page/LabelListPage.class.php index d71c681248..52b8affc6a 100644 --- a/wcfsetup/install/files/lib/acp/page/LabelListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/LabelListPage.class.php @@ -70,13 +70,13 @@ class LabelListPage extends SortablePage { * label group to which the displayed labels belong * @var LabelGroup */ - public $labelGroup = null; + public $labelGroup; /** * list with available label groups * @var LabelGroupList */ - public $labelGroupList = null; + public $labelGroupList; /** * @inheritDoc @@ -103,6 +103,12 @@ class LabelListPage extends SortablePage { $this->objectList->sqlJoins = "LEFT JOIN wcf".WCF_N."_label_group label_group ON (label_group.groupID = label.groupID)"; if ($this->labelGroup) { $this->objectList->getConditionBuilder()->add('label.groupID = ?', [$this->labelGroup->groupID]); + + // Ramp up the limit to display all labels at once for easier + // drag & drop sorting. This isn't exactly infinite, but if + // you have a label group with more than 1k labels, being able + // to sort them is the least of your problems. + $this->itemsPerPage = 1000; } if ($this->cssClassName) { $this->objectList->getConditionBuilder()->add('label.cssClassName LIKE ?', ['%'.addcslashes($this->cssClassName, '_%').'%']);