summaryrefslogtreecommitdiffstats
path: root/lib/installer.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-06-23 16:17:59 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-06-23 16:17:59 +0200
commit7c5ff900d020ad3a3bd49377d99b5e5963d17c9c (patch)
treea5adb406e34862cd194c3f5ff45b27c67e5daa41 /lib/installer.php
parentd39d7fb9ff7d071b8981e6c8caf74fffb9eb0218 (diff)
downloadnextcloud-server-7c5ff900d020ad3a3bd49377d99b5e5963d17c9c.tar.gz
nextcloud-server-7c5ff900d020ad3a3bd49377d99b5e5963d17c9c.zip
work with non existing apps directory. thanks to Antonio for the hint
Diffstat (limited to 'lib/installer.php')
-rw-r--r--lib/installer.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/installer.php b/lib/installer.php
index c0903f93d51..b650f3eed0d 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -287,16 +287,17 @@ class OC_Installer{
*/
public static function installShippedApps(){
foreach(OC::$APPSROOTS as $app_dir) {
- $dir = opendir( $app_dir['path'] );
- while( false !== ( $filename = readdir( $dir ))){
- if( substr( $filename, 0, 1 ) != '.' and is_dir($app_dir['path']."/$filename") ){
- if( file_exists( $app_dir['path']."/$filename/appinfo/app.php" )){
- if(!OC_Installer::isInstalled($filename)){
- $info=OC_App::getAppInfo($filename);
- $enabled = isset($info['default_enable']);
- if( $enabled ){
- OC_Installer::installShippedApp($filename);
- OC_Appconfig::setValue($filename,'enabled','yes');
+ if($dir = opendir( $app_dir['path'] )){
+ while( false !== ( $filename = readdir( $dir ))){
+ if( substr( $filename, 0, 1 ) != '.' and is_dir($app_dir['path']."/$filename") ){
+ if( file_exists( $app_dir['path']."/$filename/appinfo/app.php" )){
+ if(!OC_Installer::isInstalled($filename)){
+ $info=OC_App::getAppInfo($filename);
+ $enabled = isset($info['default_enable']);
+ if( $enabled ){
+ OC_Installer::installShippedApp($filename);
+ OC_Appconfig::setValue($filename,'enabled','yes');
+ }
}
}
}