diff --git a/bl-plugins/api/plugin.php b/bl-plugins/api/plugin.php index f60ae555..baba4d46 100644 --- a/bl-plugins/api/plugin.php +++ b/bl-plugins/api/plugin.php @@ -74,7 +74,7 @@ class pluginAPI extends Plugin { // Get the authentication key $authKey = $this->getDbField('authKey'); - $url = 'https://api.bludit.com/ping?authKey='.$authKey.'&url='.DOMAIN; + $url = 'https://api.bludit.com/ping?authKey='.$authKey.'&url='.DOMAIN_BASE; // Check if curl is installed if( function_exists('curl_version') ) { diff --git a/install.php b/install.php index 1563caa6..d17ccb81 100644 --- a/install.php +++ b/install.php @@ -575,6 +575,15 @@ function checkPOST($args) return true; } +function redirect($url) { + if(!headers_sent()) { + header("Location:".$url, TRUE, 302); + exit; + } + + exit(''); +} + // ============================================================================ // MAIN // ============================================================================ @@ -585,19 +594,16 @@ if( alreadyInstalled() ) { exit('Bludit already installed'); } -if( $_SERVER['REQUEST_METHOD'] == 'POST' ) -{ +if( isset($_GET['demo']) ) { + install('demo123', '', 'UTC'); + redirect(HTML_PATH_ROOT); +} + +if( $_SERVER['REQUEST_METHOD'] == 'POST' ) { $error = checkPOST($_POST); - if($error===true) - { - if(!headers_sent()) - { - header("Location:".HTML_PATH_ROOT, TRUE, 302); - exit; - } - - exit(''); + if($error===true) { + redirect(HTML_PATH_ROOT); } }