diff options
author | Kamil Domanski <kdomanski@kdemail.net> | 2011-06-19 00:55:19 +0200 |
---|---|---|
committer | Kamil Domanski <kdomanski@kdemail.net> | 2011-06-19 00:55:19 +0200 |
commit | 1cab3ca92cf07f7e4d7402fae7cf49e1e489b14f (patch) | |
tree | f2b9f4c59cabddec5d535433eb94b8fdbf69408a /lib/setup.php | |
parent | 97ab331b2a41777b64881118819902183e5f0b98 (diff) | |
download | nextcloud-server-1cab3ca92cf07f7e4d7402fae7cf49e1e489b14f.tar.gz nextcloud-server-1cab3ca92cf07f7e4d7402fae7cf49e1e489b14f.zip |
move installation of shipped apps to setup
Diffstat (limited to 'lib/setup.php')
-rw-r--r-- | lib/setup.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/setup.php b/lib/setup.php index c2757021f20..e9cb3da686c 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -31,6 +31,7 @@ else { class OC_SETUP { public static function install($options) { + global $SERVERROOT; $error = array(); $dbtype = $options['dbtype']; @@ -133,6 +134,21 @@ class OC_SETUP { OC_GROUP::createGroup('admin'); OC_GROUP::addToGroup($username, 'admin'); + foreach( array( "files_imageviewer", "files_publiclink" ) as $app ){ + + if(is_file("$SERVERROOT/apps/$app/appinfo/database.xml")){ + OC_DB::createDbFromStructure("$SERVERROOT/apps/$app/appinfo/database.xml"); + } + + //run appinfo/install.php + if(is_file("$SERVERROOT/apps/$app/appinfo/install.php")){ + include("$SERVERROOT/apps/$app/appinfo/install.php"); + } + + $info=OC_APP::getAppInfo("$SERVERROOT/apps/$app/appinfo/info.xml"); + OC_APPCONFIG::setValue($app,'installed_version',$info['version']); + } + //create htaccess files for apache hosts self::createHtaccess(); //TODO detect if apache is used |