implemented buildURL() function (and fixed redirecting on https page)
added comments block (file description) in each PHP file
This commit is contained in:
@@ -1,5 +1,23 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
function buildURL($URI, $https = false)
|
||||
{
|
||||
$url = 'http';
|
||||
if ($https && USE_HTTPS)
|
||||
$url .= 's';
|
||||
|
||||
$url .= '://'.FORUM_DOMAIN;
|
||||
if ($https && USE_HTTPS && HTTPS_PORT != 443)
|
||||
$url .= ':'.HTTPS_PORT;
|
||||
|
||||
if ((!$https || !USE_HTTPS) && HTTP_PORT != 80)
|
||||
$url .= ':'.HTTP_PORT;
|
||||
|
||||
if (strpos($URI, FORUM_PATH) === 0)
|
||||
$url .= $URI;
|
||||
else
|
||||
$url .= FORUM_PATH.'/'.$URI;
|
||||
|
||||
return $url;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user