]> source.dussan.org Git - nextcloud-server.git/commitdiff
only install shipped apps on setup that should be enabled by default
authorRobin Appelman <icewind@owncloud.com>
Sun, 29 Apr 2012 12:38:56 +0000 (14:38 +0200)
committerRobin Appelman <icewind@owncloud.com>
Sun, 29 Apr 2012 12:38:56 +0000 (14:38 +0200)
lib/installer.php

index d5592273815199fc63721c4e5b82b28e04a55221..b75c009c8f04ed2f6370d94f39bfd4091aecd489 100644 (file)
@@ -263,11 +263,8 @@ class OC_Installer{
 
        /**
         * @brief Installs shipped apps
-        * @param $enabled
         *
-        * This function installs all apps found in the 'apps' directory;
-        * If $enabled is true, apps are installed as enabled.
-        * If $enabled is false, apps are installed as disabled.
+        * This function installs all apps found in the 'apps' directory that should be enabled by default;
         */
        public static function installShippedApps(){
                $dir = opendir( OC::$APPSROOT."/apps" );
@@ -275,12 +272,11 @@ class OC_Installer{
                        if( substr( $filename, 0, 1 ) != '.' and is_dir(OC::$APPSROOT."/apps/$filename") ){
                                if( file_exists( OC::$APPSROOT."/apps/$filename/appinfo/app.php" )){
                                        if(!OC_Installer::isInstalled($filename)){
-                                               $info = OC_Installer::installShippedApp($filename);
+                                               $info=OC_App::getAppInfo($filename);
                                                $enabled = isset($info['default_enable']);
                                                if( $enabled ){
+                                                       OC_Installer::installShippedApp($filename);
                                                        OC_Appconfig::setValue($filename,'enabled','yes');
-                                               }else{
-                                                       OC_Appconfig::setValue($filename,'enabled','no');
                                                }
                                        }
                                }