diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-03-25 19:53:38 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-03-25 19:54:22 +0100 |
commit | d17713051ca2fef29de8025fe876d417838cea7f (patch) | |
tree | 77f51378b10ba2e4c938fbbc8bc68cd030079c62 /app/class/Config.php | |
parent | 70266304bab399b827af4acab153daaa47a2ba93 (diff) | |
download | wcms-d17713051ca2fef29de8025fe876d417838cea7f.tar.gz wcms-d17713051ca2fef29de8025fe876d417838cea7f.zip |
graph look, add redirections, close #50
Diffstat (limited to 'app/class/Config.php')
-rw-r--r-- | app/class/Config.php | 13 |
1 files changed, 11 insertions, 2 deletions
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() |