diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-12-24 14:26:11 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-12-24 14:26:11 -0800 |
commit | efdeba7416f39377db1b6d9ee095b8d3c765d1f7 (patch) | |
tree | 427d1b37a30691c57bdd43691b3f64888ab89785 /lib | |
parent | a87a18d56c98c9408a828774a2431be195fdb0a6 (diff) | |
parent | c6377e9125ed2a1b508dd1d2e12db8a82934f648 (diff) | |
download | nextcloud-server-efdeba7416f39377db1b6d9ee095b8d3c765d1f7.tar.gz nextcloud-server-efdeba7416f39377db1b6d9ee095b8d3c765d1f7.zip |
Merge pull request #6449 from owncloud/core-appsorderfix
Fixed apps loading order
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/app.php | 10 | ||||
-rw-r--r-- | lib/private/appconfig.php | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/private/app.php b/lib/private/app.php index eca40a81cc1..34c00e97fb9 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -166,20 +166,22 @@ class OC_App{ * get all enabled apps */ private static $enabledAppsCache = array(); - public static function getEnabledApps() { + public static function getEnabledApps($forceRefresh = false) { if(!OC_Config::getValue('installed', false)) { return array(); } - if(!empty(self::$enabledAppsCache)) { + if(!$forceRefresh && !empty(self::$enabledAppsCache)) { return self::$enabledAppsCache; } $apps=array('files'); $sql = 'SELECT `appid` FROM `*PREFIX*appconfig`' - .' WHERE `configkey` = \'enabled\' AND `configvalue`=\'yes\''; + . ' WHERE `configkey` = \'enabled\' AND `configvalue`=\'yes\'' + . ' ORDER BY `appid`'; if (OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') { //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison $sql = 'SELECT `appid` FROM `*PREFIX*appconfig`' - .' WHERE `configkey` = \'enabled\' AND to_char(`configvalue`)=\'yes\''; + . ' WHERE `configkey` = \'enabled\' AND to_char(`configvalue`)=\'yes\'' + . ' ORDER BY `appid`'; } $query = OC_DB::prepare( $sql ); $result=$query->execute(); diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php index dfe03698059..da0b2ff8604 100644 --- a/lib/private/appconfig.php +++ b/lib/private/appconfig.php @@ -52,7 +52,7 @@ class OC_Appconfig { */ public static function getApps() { // No magic in here! - $query = OC_DB::prepare('SELECT DISTINCT `appid` FROM `*PREFIX*appconfig`'); + $query = OC_DB::prepare('SELECT DISTINCT `appid` FROM `*PREFIX*appconfig` ORDER BY `appid`'); $result = $query->execute(); $apps = array(); |