summaryrefslogtreecommitdiffstats
path: root/lib/installer.php
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2012-06-04 20:37:00 +0000
committerBrice Maron <brice@bmaron.net>2012-06-06 20:24:15 +0000
commit6a812644e4d0f6eed8dca4e20c6f7135d881012a (patch)
tree546a05ff2314e3127c4b1010e9d8729c5e4e4ee8 /lib/installer.php
parent6a250d0d20c92513a883a7103885712127b51cc8 (diff)
downloadnextcloud-server-6a812644e4d0f6eed8dca4e20c6f7135d881012a.tar.gz
nextcloud-server-6a812644e4d0f6eed8dca4e20c6f7135d881012a.zip
Correct remote and public, and last occurence of OC::
Diffstat (limited to 'lib/installer.php')
-rw-r--r--lib/installer.php32
1 files changed, 17 insertions, 15 deletions
diff --git a/lib/installer.php b/lib/installer.php
index afe0b9e1bba..bfa34de2a7d 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -197,10 +197,10 @@ class OC_Installer{
//set remote/public handelers
foreach($info['remote'] as $name=>$path){
- OCP\CONFIG::setAppValue('core', 'remote_'.$name, '/apps/'.$info['id'].'/'.$path);
+ OCP\CONFIG::setAppValue('core', 'remote_'.$name, $app.'/'.$path);
}
foreach($info['public'] as $name=>$path){
- OCP\CONFIG::setAppValue('core', 'public_'.$name, '/apps/'.$info['id'].'/'.$path);
+ OCP\CONFIG::setAppValue('core', 'public_'.$name, $app.'/'.$path);
}
OC_App::setAppTypes($info['id']);
@@ -287,22 +287,24 @@ class OC_Installer{
* This function installs all apps found in the 'apps' directory that should be enabled by default;
*/
public static function installShippedApps(){
- $dir = opendir( OC::$APPSROOT."/apps" );
- while( false !== ( $filename = readdir( $dir ))){
- if( substr( $filename, 0, 1 ) != '.' and is_dir(OC::$APPSROOT."/apps/$filename") ){
- if( file_exists( OC::$APPSROOT."/apps/$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');
+ 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');
+ }
}
}
}
}
+ closedir( $dir );
}
- closedir( $dir );
}
/**
@@ -325,10 +327,10 @@ class OC_Installer{
//set remote/public handelers
foreach($info['remote'] as $name=>$path){
- OCP\CONFIG::setAppValue('core', 'remote_'.$name, '/apps/'.$app.'/'.$path);
+ OCP\CONFIG::setAppValue('core', 'remote_'.$name, $app.'/'.$path);
}
foreach($info['public'] as $name=>$path){
- OCP\CONFIG::setAppValue('core', 'public_'.$name, '/apps/'.$app.'/'.$path);
+ OCP\CONFIG::setAppValue('core', 'public_'.$name, $app.'/'.$path);
}
OC_App::setAppTypes($info['id']);