*/
public $objectListClassName = '';
+ /**
+ * selected sort field
+ * @var string
+ */
+ public $sortField = '';
+
+ /**
+ * selected sort order
+ * @var string
+ */
+ public $sortOrder = '';
+
/**
* @see wcf\data\DatabaseObjectList::$sqlLimit
*/
if ($this->items) {
$this->sqlLimit = $this->itemsPerPage;
$this->sqlOffset = ($this->pageNo - 1) * $this->itemsPerPage;
+ if ($this->sortField && $this->sortOrder) $this->sqlOrderBy = $this->sortField." ".$this->sortOrder;
$this->readObjects();
}
}
* @category Community Framework
*/
abstract class SortablePage extends MultipleLinkPage {
- /**
- * selected sort field
- * @var string
- */
- public $sortField = '';
-
- /**
- * selected sort order
- * @var string
- */
- public $sortOrder = '';
-
/**
* default sort field
* @var string
parent::readData();
}
- /**
- * @see wcf\page\MultipleLinkPage::readObjects()
- */
- protected function readObjects() {
- $this->sqlOrderBy = $this->sortField." ".$this->sortOrder;
-
- parent::readObjects();
- }
-
/**
* Validates the given sort field parameter.
*/