summaryrefslogtreecommitdiffstats
path: root/lib/installer.php
diff options
context:
space:
mode:
authorBart Visscher <bart@thisnet.nl>2011-09-18 19:37:54 +0200
committerBart Visscher <bart@thisnet.nl>2011-09-18 19:37:54 +0200
commit82c7598861db175617694891bb9f21b426426225 (patch)
treefce8fb4717b4cc2a5dc6da8835bdb51b5fb40054 /lib/installer.php
parentd5656716f69caa6a1eb98706994ffcb9a08553a7 (diff)
downloadnextcloud-server-82c7598861db175617694891bb9f21b426426225.tar.gz
nextcloud-server-82c7598861db175617694891bb9f21b426426225.zip
Remove global vars and use the OC static version.
Removed global vars are DOCUMENTROOT, SERVERROOT, SUBURI, WEBROOT and CONFIG_DATADIRECTORY
Diffstat (limited to 'lib/installer.php')
-rw-r--r--lib/installer.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/installer.php b/lib/installer.php
index e6810a267db..83c575032ec 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -55,8 +55,6 @@ class OC_Installer{
* needed to get the app working.
*/
public static function installApp( $data = array()){
- global $SERVERROOT;
-
if(!isset($data['source'])){
error_log("No source specified when installing app");
return false;
@@ -105,7 +103,7 @@ class OC_Installer{
return false;
}
$info=OC_App::getAppInfo($extractDir.'/appinfo/info.xml');
- $basedir=$SERVERROOT.'/apps/'.$info['id'];
+ $basedir=OC::$SERVERROOT.'/apps/'.$info['id'];
//check if an app with the same id is already installed
if(self::isInstalled( $info['id'] )){
@@ -246,11 +244,10 @@ class OC_Installer{
* If $enabled is false, apps are installed as disabled.
*/
public static function installShippedApps( $enabled ){
- global $SERVERROOT;
- $dir = opendir( "$SERVERROOT/apps" );
+ $dir = opendir( OC::$SERVERROOT."/apps" );
while( false !== ( $filename = readdir( $dir ))){
- if( substr( $filename, 0, 1 ) != '.' and is_dir("$SERVERROOT/apps/$filename") ){
- if( file_exists( "$SERVERROOT/apps/$filename/appinfo/app.php" )){
+ 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);
if( $enabled ){