aboutsummaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-02-11 17:37:35 -0500
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-02-11 17:37:47 -0500
commit6929652e141352f44c2ad63673d8aebeceee262b (patch)
tree5d8dc5300b56835c13be1835c7d70720ec3b83fa /lib/base.php
parent26a5c13906e44b3e1b89cb9f37917b98c70698b7 (diff)
downloadnextcloud-server-6929652e141352f44c2ad63673d8aebeceee262b.tar.gz
nextcloud-server-6929652e141352f44c2ad63673d8aebeceee262b.zip
Redirect to installer if not installed
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 5b8eeb746b1..31133b72624 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -142,6 +142,13 @@ class OC{
// set the right include path
set_include_path(OC::$SERVERROOT.'/lib'.PATH_SEPARATOR.OC::$SERVERROOT.'/config'.PATH_SEPARATOR.OC::$SERVERROOT.'/3rdparty'.PATH_SEPARATOR.get_include_path().PATH_SEPARATOR.OC::$SERVERROOT);
+ // Redirect to installer if not installed
+ if (!OC_Config::getValue('installed', false) && OC::$SUBURI != '/index.php') {
+ $url = 'http://'.$_SERVER['SERVER_NAME'].OC::$WEBROOT.'/index.php';
+ header("Location: $url");
+ exit();
+ }
+
// redirect to https site if configured
if( OC_Config::getValue( "forcessl", false )){
ini_set("session.cookie_secure", "on");