From 5e1ca86211da0439003303cf3e0741edf31bced4 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 29 Jan 2019 13:39:28 +0100 Subject: home redirect --- app/class/config.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'app/class/config.php') diff --git a/app/class/config.php b/app/class/config.php index 39c8f12..00c03ae 100644 --- a/app/class/config.php +++ b/app/class/config.php @@ -20,6 +20,8 @@ abstract class Config protected static $internallinkblank = false; protected static $reccursiverender = true; protected static $defaultprivacy = 0; + protected static $homepage = 'default'; + protected static $homeredirect = null; // _______________________________________ F U N _______________________________________ @@ -156,6 +158,16 @@ abstract class Config return self::$defaultprivacy; } + public static function homepage() + { + return self::$homepage; + } + + public static function homeredirect() + { + return self::$homeredirect; + } + // __________________________________________ S E T ______________________________________ @@ -268,6 +280,22 @@ abstract class Config self::$defaultprivacy = $defaultprivacy; } } + + public static function sethomepage($homepage) + { + if(in_array($homepage, Model::HOMEPAGE)) { + self::$homepage = $homepage; + } + } + + public static function sethomeredirect($homeredirect) + { + if(is_string($homeredirect) && strlen($homeredirect) > 0) { + self::$homeredirect = idclean($homeredirect); + } else { + self::$homeredirect = null; + } + } -- cgit v1.2.3