Add explicit sorting

This commit is contained in:
Robin Appelman 2014-02-11 14:26:40 +01:00
parent a7c50514ac
commit 50cc6a85e5
1 changed files with 4 additions and 2 deletions

View File

@ -92,7 +92,7 @@ class AppConfig implements \OCP\IAppConfig {
* entry in the appconfig table. * entry in the appconfig table.
*/ */
public function getApps() { public function getApps() {
$query = 'SELECT DISTINCT `appid` FROM `*PREFIX*appconfig`'; $query = 'SELECT DISTINCT `appid` FROM `*PREFIX*appconfig` ORDER BY `appid`';
$result = $this->conn->executeQuery($query); $result = $this->conn->executeQuery($query);
$apps = array(); $apps = array();
@ -112,7 +112,9 @@ class AppConfig implements \OCP\IAppConfig {
*/ */
public function getKeys($app) { public function getKeys($app) {
$values = $this->getAppValues($app); $values = $this->getAppValues($app);
return array_keys($values); $keys = array_keys($values);
sort($keys);
return $keys;
} }
/** /**