Changeset 1711 for branches/3.4/install.php
- Timestamp:
- 08/30/08 12:49:26 (4 months ago)
- Files:
-
- 1 modified
-
branches/3.4/install.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.4/install.php
r1634 r1711 62 62 if ($_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } 63 63 else { $http_type = "http://"; } 64 $php_self = $http_type . $_SERVER['HTTP_HOST'] . "/" . preg_replace("/^\/(.+\.php)\/?.*/","$1",$_SERVER['PHP_SELF']); 64 define('WEB_PATH',$http_type . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/' . basename($_SERVER['PHP_SELF'])); 65 define('WEB_ROOT',$http_type . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF'])); 65 66 66 67 /* Catch the Current Action */ … … 76 77 $charset = $_REQUEST['charset']; 77 78 78 header ("Location: " . $php_self. "?action=show_create_config&local_db=$database&local_host=$hostname&htmllang=$htmllang&charset=$charset");79 header ("Location: " . WEB_PATH . "?action=show_create_config&local_db=$database&local_host=$hostname&htmllang=$htmllang&charset=$charset"); 79 80 80 81 break; … … 132 133 } 133 134 134 if ($_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } 135 else { $http_type = "http://"; } 136 137 $web_path = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path']; 138 139 header ("Location: " . $web_path . "/login.php"); 135 header ("Location: " . WEB_ROOT . "/login.php"); 140 136 break; 141 137 case 'show_create_account': … … 145 141 /* Make sure we've got a valid config file */ 146 142 if (!check_config_values($results)) { 143 Error::add('general',_('Error: Config file not found or Unreadable')); 147 144 require_once Config::get('prefix') . '/templates/show_install_config.inc.php'; 148 145 break; … … 212 209 /* Do some basic tests here... most common error, no mysql */ 213 210 if (!function_exists('mysql_query')) { 214 header ("Location: test.php");211 header ("Location: " . WEB_PATH . "/test.php"); 215 212 } 216 213 $htmllang = "en_US";
