1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 13:21:54 +02:00

Admin-UI: $listGroup added for control of specific JOIN grouping when necessary. Example added to blank plugin.

This commit is contained in:
Cameron
2020-03-05 11:38:23 -08:00
parent bb6fe3283b
commit d6d178824c
2 changed files with 18 additions and 5 deletions

View File

@@ -2508,6 +2508,11 @@ class e_admin_controller_ui extends e_admin_controller
* @var string SQL order, false to disable order, null is default order
*/
protected $listOrder = null;
/**
* @var string SQL group-by field name (optional)
*/
protected $listGroup = null;
/**
* @var string field containing the order number
@@ -4411,13 +4416,18 @@ class e_admin_controller_ui extends e_admin_controller
}
// group field - currently auto-added only if there are joins
// TODO - groupField property
$groupField = '';
if($joins && $this->getPrimaryName())
{
$groupField = $tablePath.$this->getPrimaryName();
}
// appended to GROUP BY when true.
if(!empty($this->listGroup))
{
$groupField = $this->listGroup;
}
if($raw)
{
$rawData = array(