mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
install apps that are shipped with owncloud the first time they are loaded
This commit is contained in:
parent
72815bc553
commit
c1d02fd166
1 changed files with 13 additions and 0 deletions
13
lib/app.php
13
lib/app.php
|
|
@ -61,6 +61,19 @@ class OC_APP{
|
|||
while( false !== ( $filename = readdir( $dir ))){
|
||||
if( substr( $filename, 0, 1 ) != '.' ){
|
||||
if( file_exists( "$SERVERROOT/apps/$filename/appinfo/app.php" )){
|
||||
if(OC_APPCONFIG::getValue($filename,'installed_version',0)==0){ //check if the plugin is fully installed
|
||||
//install the database
|
||||
if(is_file("$SERVERROOT/apps/$filename/appinfo/database.xml")){
|
||||
OC_DB::createDbFromStructure("$SERVERROOT/apps/$filename/appinfo/database.xml");
|
||||
}
|
||||
|
||||
//run appinfo/install.php
|
||||
if(is_file("$SERVERROOT/apps/$filename/appinfo/install.php")){
|
||||
include("$SERVERROOT/apps/$filename/appinfo/install.php");
|
||||
}
|
||||
$info=self::getAppInfo("$SERVERROOT/apps/$filename/appinfo/info.xml");
|
||||
OC_APPCONFIG::setValue($filename,'installed_version',$info['version']);
|
||||
}
|
||||
require( "apps/$filename/appinfo/app.php" );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue