diff --git a/custompages/loggedout.php b/custompages/loggedout.php
new file mode 100644
index 0000000000..2b45579c46
--- /dev/null
+++ b/custompages/loggedout.php
@@ -0,0 +1,57 @@
+
+
+
+
+ Custompage - logged out
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
diff --git a/index.php b/index.php
index 72c46bbc49..cc0845bd19 100644
--- a/index.php
+++ b/index.php
@@ -79,9 +79,17 @@ if (api_get_setting('allow_terms_conditions') == 'true') {
unset($_SESSION['info_current_user']);
}
//If we are not logged in and customapages activated
-if (!api_get_user_id() && api_get_setting('use_custom_pages') == 'true' ){
+if (!api_get_user_id() && api_get_setting('use_custom_pages') == 'true' )
+{
require_once api_get_path(LIBRARY_PATH).'custompages.lib.php';
- CustomPages::displayPage('index-unlogged');
+ if(Request::get('loggedout'))
+ {
+ CustomPages::displayPage('loggedout');
+ }
+ else
+ {
+ CustomPages::displayPage('index-unlogged');
+ }
}
/**
diff --git a/main/inc/global.inc.php b/main/inc/global.inc.php
index c5441f6914..1e45c60eac 100644
--- a/main/inc/global.inc.php
+++ b/main/inc/global.inc.php
@@ -92,6 +92,7 @@ ini_set('include_path', api_create_include_path_setting());
ini_set('auto_detect_line_endings', '1');
// Include the libraries that are necessary everywhere
+require_once $lib_path.'request.class.php';
require_once $lib_path.'database.lib.php';
require_once $lib_path.'template.lib.php';
require_once $lib_path.'display.lib.php';
diff --git a/main/inc/lib/request.class.php b/main/inc/lib/request.class.php
new file mode 100644
index 0000000000..d5ae0c2397
--- /dev/null
+++ b/main/inc/lib/request.class.php
@@ -0,0 +1,36 @@
+
+ */
+class Request
+{
+
+ public static function get($key, $default = null)
+ {
+ return isset($_GET[$key]) ? isset($_GET[$key]) : $default;
+ }
+
+ public static function post($key, $default = null)
+ {
+ return isset($_POST[$key]) ? isset($_POST[$key]) : $default;
+ }
+
+ static function server($key, $default = null)
+ {
+ return isset($_SERVER[$key]) ? isset($_SERVER[$key]) : $default;
+ }
+
+ static function file($key, $default = null)
+ {
+ return isset($_FILES[$key]) ? isset($_FILES[$key]) : $default;
+ }
+
+ static function environment($key, $default = null)
+ {
+ return isset($_ENV[$key]) ? isset($_ENV[$key]) : $default;
+ }
+
+}
\ No newline at end of file
diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php
index 4ff887d76e..c302326715 100644
--- a/main/inc/lib/userportal.lib.php
+++ b/main/inc/lib/userportal.lib.php
@@ -158,6 +158,7 @@ class IndexManager {
}
exit_of_chat($uid);
api_session_destroy();
+ $query_string = $query_string ? "$query_string&loggedout=true" : '?loggedout=true';
header("Location: index.php$query_string");
exit();
}