work with non existing apps directory. thanks to Antonio for the hint
This commit is contained in:
parent
d39d7fb9ff
commit
7c5ff900d0
|
@ -287,16 +287,17 @@ class OC_Installer{
|
||||||
*/
|
*/
|
||||||
public static function installShippedApps(){
|
public static function installShippedApps(){
|
||||||
foreach(OC::$APPSROOTS as $app_dir) {
|
foreach(OC::$APPSROOTS as $app_dir) {
|
||||||
$dir = opendir( $app_dir['path'] );
|
if($dir = opendir( $app_dir['path'] )){
|
||||||
while( false !== ( $filename = readdir( $dir ))){
|
while( false !== ( $filename = readdir( $dir ))){
|
||||||
if( substr( $filename, 0, 1 ) != '.' and is_dir($app_dir['path']."/$filename") ){
|
if( substr( $filename, 0, 1 ) != '.' and is_dir($app_dir['path']."/$filename") ){
|
||||||
if( file_exists( $app_dir['path']."/$filename/appinfo/app.php" )){
|
if( file_exists( $app_dir['path']."/$filename/appinfo/app.php" )){
|
||||||
if(!OC_Installer::isInstalled($filename)){
|
if(!OC_Installer::isInstalled($filename)){
|
||||||
$info=OC_App::getAppInfo($filename);
|
$info=OC_App::getAppInfo($filename);
|
||||||
$enabled = isset($info['default_enable']);
|
$enabled = isset($info['default_enable']);
|
||||||
if( $enabled ){
|
if( $enabled ){
|
||||||
OC_Installer::installShippedApp($filename);
|
OC_Installer::installShippedApp($filename);
|
||||||
OC_Appconfig::setValue($filename,'enabled','yes');
|
OC_Appconfig::setValue($filename,'enabled','yes');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue