aboutsummaryrefslogtreecommitdiffstats
path: root/lib/app.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-08-10 12:20:43 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-08-10 14:03:54 +0200
commitcdf91b6b3e0f6d9fc435497b9dcc051ff24d6c7e (patch)
tree9793b565309aa098d174a69f10b22d89cb007502 /lib/app.php
parent9059b559791b9f5333c24815c4bfd77cc6201c5e (diff)
downloadnextcloud-server-cdf91b6b3e0f6d9fc435497b9dcc051ff24d6c7e.tar.gz
nextcloud-server-cdf91b6b3e0f6d9fc435497b9dcc051ff24d6c7e.zip
work in new app management
Diffstat (limited to 'lib/app.php')
-rw-r--r--lib/app.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/app.php b/lib/app.php
index 411c08cbe5b..9c7b7e75dcd 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -136,7 +136,6 @@ class OC_App{
* This function returns all data it got via register().
*/
public static function get(){
- // TODO: write function
return OC_App::$apps;
}
@@ -242,7 +241,7 @@ class OC_App{
if(is_file($appid)){
$file=$appid;
}else{
- $file='apps/'.$appid.'/appinfo/info.xml';
+ $file=OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/info.xml';
if(!is_file($file)){
return array();
}
@@ -332,4 +331,18 @@ class OC_App{
public static function registerPersonal($app,$page){
self::$personalForms[]='apps/'.$app.'/'.$page.'.php';
}
+
+ /**
+ * get a list of all apps in the apps folder
+ */
+ public static function getAllApps(){
+ $apps=array();
+ $dh=opendir(OC::$SERVERROOT.'/apps');
+ while($file=readdir($dh)){
+ if(is_file(OC::$SERVERROOT.'/apps/'.$file.'/appinfo/app.php')){
+ $apps[]=$file;
+ }
+ }
+ return $apps;
+ }
}