summaryrefslogtreecommitdiffstats
path: root/modules-available/sysconfig/inc/sysconfig.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/sysconfig/inc/sysconfig.inc.php')
-rw-r--r--modules-available/sysconfig/inc/sysconfig.inc.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/modules-available/sysconfig/inc/sysconfig.inc.php b/modules-available/sysconfig/inc/sysconfig.inc.php
index 09860c7d..362ce1a9 100644
--- a/modules-available/sysconfig/inc/sysconfig.inc.php
+++ b/modules-available/sysconfig/inc/sysconfig.inc.php
@@ -3,15 +3,14 @@
class SysConfig
{
+ /**
+ * @return array{array{configid: int, title: string, filepath: string, status: string, locs: string}}
+ */
public static function getAll(): array
{
- $res = Database::simpleQuery("SELECT c.configid, c.title, c.filepath, c.status, Group_Concat(cl.locationid) AS locs FROM configtgz c"
- . " LEFT JOIN configtgz_location cl USING (configid) GROUP BY c.configid");
- $ret = array();
- foreach ($res as $row) {
- $ret[] = $row;
- }
- return $ret;
+ return Database::queryAll("SELECT c.configid, c.title, c.filepath, c.status, Group_Concat(cl.locationid) AS locs
+ FROM configtgz c
+ LEFT JOIN configtgz_location cl USING (configid) GROUP BY c.configid");
}
public static function archiveContentsFromTask($status, &$userGroupWarn = null) : array