summaryrefslogtreecommitdiffstats
path: root/lib/app.php
diff options
context:
space:
mode:
authorKamil Domanski <kdomanski@kdemail.net>2011-06-19 00:55:19 +0200
committerKamil Domanski <kdomanski@kdemail.net>2011-06-19 00:55:19 +0200
commit1cab3ca92cf07f7e4d7402fae7cf49e1e489b14f (patch)
treef2b9f4c59cabddec5d535433eb94b8fdbf69408a /lib/app.php
parent97ab331b2a41777b64881118819902183e5f0b98 (diff)
downloadnextcloud-server-1cab3ca92cf07f7e4d7402fae7cf49e1e489b14f.tar.gz
nextcloud-server-1cab3ca92cf07f7e4d7402fae7cf49e1e489b14f.zip
move installation of shipped apps to setup
Diffstat (limited to 'lib/app.php')
-rw-r--r--lib/app.php24
1 files changed, 3 insertions, 21 deletions
diff --git a/lib/app.php b/lib/app.php
index e373331850d..4e67da3c414 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -57,28 +57,10 @@ class OC_APP{
}
// The rest comes here
- $dir = opendir( "$SERVERROOT/apps" );
- while( false !== ( $filename = readdir( $dir ))){
- if( substr( $filename, 0, 1 ) != '.' and is_dir("$SERVERROOT/apps/$filename") ){
- if( file_exists( "$SERVERROOT/apps/$filename/appinfo/app.php" )){
- if(OC_APPCONFIG::getValue($filename,'installed_version',0)==0){ //check if the plugin is fully installed
- //install the database
- if(is_file("$SERVERROOT/apps/$filename/appinfo/database.xml")){
- OC_DB::createDbFromStructure("$SERVERROOT/apps/$filename/appinfo/database.xml");
- }
-
- //run appinfo/install.php
- if(is_file("$SERVERROOT/apps/$filename/appinfo/install.php")){
- include("$SERVERROOT/apps/$filename/appinfo/install.php");
- }
- $info=self::getAppInfo("$SERVERROOT/apps/$filename/appinfo/info.xml");
- OC_APPCONFIG::setValue($filename,'installed_version',$info['version']);
- }
- require( "apps/$filename/appinfo/app.php" );
- }
- }
+ $apps = OC_APPCONFIG::getApps();
+ foreach( $apps as $app ){
+ require( "apps/$app/appinfo/app.php" );
}
- closedir( $dir );
self::$init = true;