]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add flag in info.xml to control the apps that are installed by default
authorBart Visscher <bartv@thisnet.nl>
Tue, 27 Sep 2011 20:36:14 +0000 (22:36 +0200)
committerBart Visscher <bartv@thisnet.nl>
Tue, 27 Sep 2011 20:36:14 +0000 (22:36 +0200)
apps/calendar/appinfo/info.xml
apps/contacts/appinfo/info.xml
apps/files_imageviewer/appinfo/info.xml
apps/files_sharing/appinfo/info.xml
apps/files_textviewer/appinfo/info.xml
apps/media/appinfo/info.xml
apps/user_openid/appinfo/info.xml
lib/installer.php
lib/setup.php

index c846fc1eebcc708de14adeb9f30f63f3420e8d39..6b1ecd2337f02282988d3b4fbc6540a871d8917e 100644 (file)
@@ -7,4 +7,5 @@
        <author>Georg Ehrke (Userinterface), Jakob Sack</author>
        <require>2</require>
        <description>Calendar with CalDAV support</description>
+       <default_enable/>
 </info>
index 77c9dc91bfc7420bef0b45de8fbf708b155d3a46..d18a19c3aeab1a8fd646262289c5ee927acec45b 100644 (file)
@@ -7,4 +7,5 @@
        <author>Jakob Sack</author>
        <require>2</require>
        <description>Address book with CardDAV support.</description>
+       <default_enable/>
 </info>
index f3b5a67960ebcb905942648d66dfd3b027dd2b66..00b55c254dd727fe189bcb6484eb238ce19a2dab 100644 (file)
@@ -7,4 +7,5 @@
        <licence>AGPL</licence>
        <author>Robin Appelman</author>
        <require>2</require>
-</info>
\ No newline at end of file
+       <default_enable/>
+</info>
index 2fbb3300f69f7b08671235b3efdc1dd94e0bd7ff..abf847b4483a2ccf6a8d747f2b5f9148608790fa 100644 (file)
@@ -7,4 +7,5 @@
        <licence>AGPL</licence>
        <author>Michael Gapczynski</author>
        <require>2</require>
-</info>
\ No newline at end of file
+       <default_enable/>
+</info>
index 209b414034639a609d82b535a9cd26bf6ab3a73b..becfd5e35c83255b76e95a65a1a7addaa8b9627a 100644 (file)
@@ -6,4 +6,5 @@
        <licence>AGPL</licence>
        <author>Robin Appelman</author>
        <require>2</require>
+       <default_enable/>
 </info>
index 044abade53f5177f37b81aaaea53190fdb492115..795c9a4dd718f0c297255c38edaa173e455d95ac 100644 (file)
@@ -7,4 +7,5 @@
        <licence>AGPL</licence>
        <author>Robin Appelman</author>
        <require>2</require>
-</info>
\ No newline at end of file
+       <default_enable/>
+</info>
index 32525009d616ed7bbb31000dc0ba4723ecd7f05a..332d2199dd3c305e850785e481bbdaf5f485e98c 100644 (file)
@@ -7,4 +7,5 @@
        <licence>AGPL</licence>
        <author>Robin Appelman</author>
        <require>2</require>
-</info>
\ No newline at end of file
+       <default_enable/>
+</info>
index 9416a42c972ee8b4a5e2f2b06549527b61ab55bc..0febb2cab46ec84543281388edce92a953ae0b0f 100644 (file)
@@ -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;
        }
 }
index 7b205acd705821ee4b1537a27f6e1edb961047fa..8d3079720ccc498373a30b430051b24bc223b34e 100644 (file)
@@ -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')) {