]> git.mxchange.org Git - friendica.git/commitdiff
Nope, get_basepath() should be static, then also mark it as static (in signature).
authorRoland Häder <roland@mxchange.org>
Tue, 13 Dec 2016 13:53:57 +0000 (14:53 +0100)
committerRoland Häder <roland@mxchange.org>
Tue, 13 Dec 2016 13:53:57 +0000 (14:53 +0100)
Signed-off-by: Roland Häder <roland@mxchange.org>
boot.php
include/cron.php
mod/photo.php
mod/proxy.php

index 5b497632ebea9136af059c0450a081a2b6c9c8e9..4cdd5b76ab48a9c193c969fdaef1d3b2198b2b2a 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -767,7 +767,7 @@ class App {
 
        }
 
-       function get_basepath() {
+       public static function get_basepath() {
 
                $basepath = get_config("system", "basepath");
 
index d7771c08b8dee6b2cca2a0a50ad1dd9c52c095cf..008260592fd1d18119227a0e6381fb30d9979f6c 100644 (file)
@@ -362,14 +362,14 @@ function cron_clear_cache(&$a) {
        clear_cache();
 
        // clear cache for photos
-       clear_cache($a->get_basepath(), $a->get_basepath()."/photo");
+       clear_cache(App::get_basepath(), App::get_basepath()."/photo");
 
        // clear smarty cache
-       clear_cache($a->get_basepath()."/view/smarty3/compiled", $a->get_basepath()."/view/smarty3/compiled");
+       clear_cache(App::get_basepath()."/view/smarty3/compiled", App::get_basepath()."/view/smarty3/compiled");
 
        // clear cache for image proxy
        if (!get_config("system", "proxy_disabled")) {
-               clear_cache($a->get_basepath(), $a->get_basepath()."/proxy");
+               clear_cache(App::get_basepath(), App::get_basepath()."/proxy");
 
                $cachetime = get_config('system','proxy_cache_time');
                if (!$cachetime) $cachetime = PROXY_DEFAULT_TIME;
index fc9d9f1748f645183b0344dbc94d24b0acea375d..e2fd7887b71ec25e3beb03587e5e79090dad46cb 100644 (file)
@@ -197,7 +197,7 @@ function photo_init(&$a) {
        // If the photo is public and there is an existing photo directory store the photo there
        if ($public and ($file != "")) {
                // If the photo path isn't there, try to create it
-               $basepath = $a->get_basepath();
+               $basepath = App::get_basepath();
                if (!is_dir($basepath."/photo"))
                        if (is_writable($basepath))
                                mkdir($basepath."/photo");
index 612dc910a03978c3212658ba9037f1e4248500a2..6434cf8e64722d72b0d84b0e1506673e019003fa 100644 (file)
@@ -44,7 +44,7 @@ function proxy_init() {
        $thumb = false;
        $size = 1024;
        $sizetype = "";
-       $basepath = $a->get_basepath();
+       $basepath = App::get_basepath();
 
        // If the cache path isn't there, try to create it
        if (!is_dir($basepath."/proxy"))
@@ -267,7 +267,7 @@ function proxy_url($url, $writemode = false, $size = '') {
        $url = html_entity_decode($url, ENT_NOQUOTES, 'utf-8');
 
        // Creating a sub directory to reduce the amount of files in the cache directory
-       $basepath = $a->get_basepath() . '/proxy';
+       $basepath = App::get_basepath() . '/proxy';
 
        $shortpath = hash('md5', $url);
        $longpath = substr($shortpath, 0, 2);