aboutsummaryrefslogtreecommitdiff
path: root/app/class/config.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-01-29 13:39:28 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-01-29 13:39:28 +0100
commit5e1ca86211da0439003303cf3e0741edf31bced4 (patch)
tree99fb2548f6eab18b510c9e5850af2459b05d1401 /app/class/config.php
parentbd2ddfda3a922766ea2165963f2b2386066deeb2 (diff)
downloadwcms-5e1ca86211da0439003303cf3e0741edf31bced4.tar.gz
wcms-5e1ca86211da0439003303cf3e0741edf31bced4.zip
home redirect
Diffstat (limited to 'app/class/config.php')
-rw-r--r--app/class/config.php28
1 files changed, 28 insertions, 0 deletions
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;
+ }
+ }