aboutsummaryrefslogtreecommitdiffstats
path: root/lib/installer.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-09-27 22:36:14 +0200
committerBart Visscher <bartv@thisnet.nl>2011-09-27 22:36:14 +0200
commitc6f78fbe43dbe3f6875b72b34592bde25fc78d0b (patch)
tree2684fc40a1c53fde8a2bd94195f7f7f57d2f094f /lib/installer.php
parent61aa00899d33a3b9706cf321555405fedf044775 (diff)
downloadnextcloud-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/installer.php')
-rw-r--r--lib/installer.php8
1 files changed, 5 insertions, 3 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;
}
}