diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-09-27 22:36:14 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-09-27 22:36:14 +0200 |
commit | c6f78fbe43dbe3f6875b72b34592bde25fc78d0b (patch) | |
tree | 2684fc40a1c53fde8a2bd94195f7f7f57d2f094f /lib | |
parent | 61aa00899d33a3b9706cf321555405fedf044775 (diff) | |
download | nextcloud-server-c6f78fbe43dbe3f6875b72b34592bde25fc78d0b.tar.gz nextcloud-server-c6f78fbe43dbe3f6875b72b34592bde25fc78d0b.zip |
Add flag in info.xml to control the apps that are installed by default
Diffstat (limited to 'lib')
-rw-r--r-- | lib/installer.php | 8 | ||||
-rw-r--r-- | lib/setup.php | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/installer.php b/lib/installer.php index 9416a42c972..0febb2cab46 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -243,13 +243,14 @@ class OC_Installer{ * If $enabled is true, apps are installed as enabled. * If $enabled is false, apps are installed as disabled. */ - public static function installShippedApps( $enabled ){ + public static function installShippedApps(){ $dir = opendir( OC::$SERVERROOT."/apps" ); while( false !== ( $filename = readdir( $dir ))){ if( substr( $filename, 0, 1 ) != '.' and is_dir(OC::$SERVERROOT."/apps/$filename") ){ if( file_exists( OC::$SERVERROOT."/apps/$filename/appinfo/app.php" )){ if(!OC_Installer::isInstalled($filename)){ - OC_Installer::installShippedApp($filename); + $info = OC_Installer::installShippedApp($filename); + $enabled = isset($info['default_enable']); if( $enabled ){ OC_Appconfig::setValue($filename,'enabled','yes'); }else{ @@ -265,7 +266,7 @@ class OC_Installer{ /** * install an app already placed in the app folder * @param string $app id of the app to install - * @return bool + * @returns array see OC_App::getAppInfo */ public static function installShippedApp($app){ //install the database @@ -279,5 +280,6 @@ class OC_Installer{ } $info=OC_App::getAppInfo(OC::$SERVERROOT."/apps/$app/appinfo/info.xml"); OC_Appconfig::setValue($app,'installed_version',$info['version']); + return $info; } } diff --git a/lib/setup.php b/lib/setup.php index 7b205acd705..8d3079720cc 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -206,7 +206,7 @@ class OC_Setup { OC_User::login($username, $password); //guess what this does - OC_Installer::installShippedApps(true); + OC_Installer::installShippedApps(); //create htaccess files for apache hosts if (strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) { |