summaryrefslogtreecommitdiffstats
path: root/lib/files.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/files.php')
-rw-r--r--lib/files.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/files.php b/lib/files.php
index f1789d9c7ac..84dc9fd1c53 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -33,9 +33,8 @@ class OC_Files {
* @param dir $directory
*/
public static function getDirectoryContent($directory){
- global $CONFIG_DATADIRECTORY;
- if(strpos($directory,$CONFIG_DATADIRECTORY)===0){
- $directory=substr($directory,strlen($CONFIG_DATADIRECTORY));
+ if(strpos($directory,OC::$CONFIG_DATADIRECTORY)===0){
+ $directory=substr($directory,strlen(OC::$CONFIG_DATADIRECTORY));
}
$filesfound=true;
$content=array();
@@ -279,16 +278,14 @@ class OC_Files {
* @param int size filesisze in bytes
*/
static function setUploadLimit($size){
- global $SERVERROOT;
- global $WEBROOT;
$size=OC_Helper::humanFileSize($size);
$size=substr($size,0,-1);//strip the B
$size=str_replace(' ','',$size); //remove the space between the size and the postfix
- $content = "ErrorDocument 404 /$WEBROOT/core/templates/404.php\n";//custom 404 error page
+ $content = "ErrorDocument 404 /".OC::$WEBROOT."/core/templates/404.php\n";//custom 404 error page
$content.= "php_value upload_max_filesize $size\n";//upload limit
$content.= "php_value post_max_size $size\n";
$content.= "SetEnv htaccessWorking true\n";
$content.= "Options -Indexes\n";
- @file_put_contents($SERVERROOT.'/.htaccess', $content); //supress errors in case we don't have permissions for it
+ @file_put_contents(OC::$SERVERROOT.'/.htaccess', $content); //supress errors in case we don't have permissions for it
}
}