summaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/dashboard.inc.php5
-rw-r--r--inc/database.inc.php13
2 files changed, 18 insertions, 0 deletions
diff --git a/inc/dashboard.inc.php b/inc/dashboard.inc.php
index 59d81c2d..d576a8f1 100644
--- a/inc/dashboard.inc.php
+++ b/inc/dashboard.inc.php
@@ -103,5 +103,10 @@ class Dashboard
{
self::$subMenu[] = array('url' => $url, 'name' => $name);
}
+
+ public static function getSubmenus()
+ {
+ return self::$subMenu;
+ }
} \ No newline at end of file
diff --git a/inc/database.inc.php b/inc/database.inc.php
index d5992795..3b2414b5 100644
--- a/inc/database.inc.php
+++ b/inc/database.inc.php
@@ -77,6 +77,19 @@ class Database
}
/**
+ * Fetch the first column of the query as a plain list-of-values array.
+ *
+ * @return array|bool List of values representing first column of query
+ */
+ public static function queryColumnArray($query, $args = array(), $ignoreError = null)
+ {
+ $res = self::simpleQuery($query, $args, $ignoreError);
+ if ($res === false)
+ return false;
+ return $res->fetchAll(PDO::FETCH_COLUMN, 0);
+ }
+
+ /**
* Execute the given query and return the number of rows affected.
* Mostly useful for UPDATEs or INSERTs
*