Skip to content
Snippets Groups Projects
Commit c6f78fbe authored by Bart Visscher's avatar Bart Visscher
Browse files

Add flag in info.xml to control the apps that are installed by default

parent 61aa0089
Branches
No related tags found
No related merge requests found
......@@ -7,4 +7,5 @@
<author>Georg Ehrke (Userinterface), Jakob Sack</author>
<require>2</require>
<description>Calendar with CalDAV support</description>
<default_enable/>
</info>
......@@ -7,4 +7,5 @@
<author>Jakob Sack</author>
<require>2</require>
<description>Address book with CardDAV support.</description>
<default_enable/>
</info>
......@@ -7,4 +7,5 @@
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>2</require>
<default_enable/>
</info>
......@@ -7,4 +7,5 @@
<licence>AGPL</licence>
<author>Michael Gapczynski</author>
<require>2</require>
<default_enable/>
</info>
......@@ -6,4 +6,5 @@
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>2</require>
<default_enable/>
</info>
......@@ -7,4 +7,5 @@
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>2</require>
<default_enable/>
</info>
......@@ -7,4 +7,5 @@
<licence>AGPL</licence>
<author>Robin Appelman</author>
<require>2</require>
<default_enable/>
</info>
......@@ -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;
}
}
......@@ -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')) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment