diff --git a/SQL/0000-00-00-schema.sql b/SQL/0000-00-00-schema.sql index e572910e24a..3487df9d330 100644 --- a/SQL/0000-00-00-schema.sql +++ b/SQL/0000-00-00-schema.sql @@ -2192,7 +2192,7 @@ INSERT INTO Config (ConfigID, Value) SELECT ID, 0 FROM ConfigSettings WHERE Name -- default www settings INSERT INTO Config (ConfigID, Value) SELECT ID, "localhost" FROM ConfigSettings WHERE Name="host"; -INSERT INTO Config (ConfigID, Value) SELECT ID, "https://localhost/" FROM ConfigSettings WHERE Name="url"; +INSERT INTO Config (ConfigID, Value) SELECT ID, "http://localhost/" FROM ConfigSettings WHERE Name="url"; -- default dashboard settings INSERT INTO Config (ConfigID, Value) SELECT ID, "This database provides an on-line mechanism to store both imaging and behavioral data collected from various locations. Within this framework, there are several tools that will make this process as efficient and simple as possible. For more detailed information regarding any aspect of the database, please click on the Help icon at the top right. Otherwise, feel free to contact us at the DCC. We strive to make data collection almost fun." FROM ConfigSettings WHERE Name="projectDescription"; diff --git a/php/libraries/NDB_Caller.class.inc b/php/libraries/NDB_Caller.class.inc index 674fea048f9..393e4695525 100644 --- a/php/libraries/NDB_Caller.class.inc +++ b/php/libraries/NDB_Caller.class.inc @@ -78,6 +78,7 @@ class NDB_Caller extends PEAR */ function load($test_name, $subtest, $CommentID = '', $nextpage=null) { + $config = NDB_Config::singleton(); // if no first argument, return if (empty($test_name)) { return; @@ -86,11 +87,8 @@ class NDB_Caller extends PEAR && isset($_POST['login']) ) { header("HTTP/1.1 303 See Other"); - if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ) { - $isSecure = true; - } - $url = $isSecure ? 'https://' : 'http://'; - $url .= $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; + $url = $config->getSetting('url'); + $url .= $_SERVER['REQUEST_URI']; // sending user to the url that was requested header("Location: $url"); } @@ -98,8 +96,7 @@ class NDB_Caller extends PEAR $CommentID = $_REQUEST['commentID']; } // get the files path, aka the base directory - $config =& NDB_Config::singleton(); - $base = $config->getSetting('base'); + $base = $config->getSetting('base'); if (is_dir($base . "modules/$test_name")) { // New module style