summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-27 13:21:45 +0200
committerRobin Appelman <icewind@owncloud.com>2012-06-27 13:21:45 +0200
commit12f7cb87679453fa96c796df857b7e7193d4ee09 (patch)
treeafdc10250a5877d97b5b89a97e2e052eaa97a9b9 /lib/base.php
parent420d23a875c19ba04d679db826bcf9bd2ad9d6c2 (diff)
downloadnextcloud-server-12f7cb87679453fa96c796df857b7e7193d4ee09.tar.gz
nextcloud-server-12f7cb87679453fa96c796df857b7e7193d4ee09.zip
fix running tests from cli
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index 11e63e208eb..c2b0bbef780 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -170,8 +170,10 @@ class OC{
public static function checkInstalled() {
// 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");
+ if(!OC::$CLI){
+ $url = 'http://'.$_SERVER['SERVER_NAME'].OC::$WEBROOT.'/index.php';
+ header("Location: $url");
+ }
exit();
}
}
@@ -180,7 +182,7 @@ class OC{
// redirect to https site if configured
if( OC_Config::getValue( "forcessl", false )){
ini_set("session.cookie_secure", "on");
- if(OC_Helper::serverProtocol()<>'https') {
+ if(OC_Helper::serverProtocol()<>'https' and !OC::$CLI) {
$url = "https://". OC_Helper::serverHost() . $_SERVER['REQUEST_URI'];
header("Location: $url");
exit();