diff --git a/config.php b/config.php index eacfda1..7a309b8 100644 --- a/config.php +++ b/config.php @@ -14,6 +14,7 @@ $config['site_title'] = 'Znote AAC'; $config['site_title_context'] = 'Because open communities are good communities. :3'; + $config['site_url'] = "http://znote.dev"; // Path to server folder without / Example: C:\Users\Alvaro\Documents\GitHub\forgottenserver $config['server_path'] = ''; diff --git a/engine/function/general.php b/engine/function/general.php index b11edad..0932f51 100644 --- a/engine/function/general.php +++ b/engine/function/general.php @@ -116,11 +116,8 @@ function calculate_discount($orig, $new) { // Proper URLs function url($path = false) { - $protocol = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'; - $domain = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != 80 ? ':' . $_SERVER['SERVER_PORT'] : null); $folder = dirname($_SERVER['SCRIPT_NAME']); - - return $protocol . $domain . ($folder == '/' ? '' : $folder) . '/' . $path; + return config('site_url') . '/' . $path; } function getCache() {