From d17713051ca2fef29de8025fe876d417838cea7f Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 25 Mar 2020 19:53:38 +0100 Subject: graph look, add redirections, close #50 --- app/class/Config.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'app/class/Config.php') diff --git a/app/class/Config.php b/app/class/Config.php index fa9082f..2cfdcd3 100644 --- a/app/class/Config.php +++ b/app/class/Config.php @@ -3,6 +3,8 @@ namespace Wcms; +use Http\Client\Common\Plugin\RetryPlugin; + abstract class Config { protected static $pagetable = 'mystore'; @@ -129,9 +131,16 @@ abstract class Config return self::$fontsize; } - public static function basepath() + /** + * @param bool $trailingslash If not empty basepath, add a trailing slash after the basepath + */ + public static function basepath(bool $trailingslash = false) : string { - return self::$basepath; + if($trailingslash && !empty(self::$basepath)) { + return self::$basepath . '/'; + } else { + return self::$basepath; + } } public static function route404() -- cgit v1.2.3