mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
Refactor more URL related functions
This commit is contained in:
parent
a8094fe766
commit
08560f84be
5 changed files with 9 additions and 15 deletions
|
|
@ -63,8 +63,7 @@ class image_link extends EditorHandler
|
|||
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
|
||||
else if(substr($src , 0, 1)=='/')
|
||||
{
|
||||
if($_SERVER['HTTPS']=='on') $http_src = 'https://';
|
||||
else $http_src = 'http://';
|
||||
$http_src = RX_SSL ? 'https://' : 'http://';
|
||||
$src = $http_src.$_SERVER['HTTP_HOST'].$src;
|
||||
}
|
||||
else if(!strpos($temp_src[0],':') && $src) $src = Context::getRequestUri().$src;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class installView extends install
|
|||
Context::set('progressMenu', '4');
|
||||
|
||||
$error_return_url = getNotEncodedUrl('', 'act', Context::get('act'), 'db_type', Context::get('db_type'));
|
||||
if($_SERVER['HTTPS'] == 'on')
|
||||
if(RX_SSL)
|
||||
{
|
||||
// Error occured when using https protocol at "ModuleHandler::init() '
|
||||
$parsedUrl = parse_url($error_return_url);
|
||||
|
|
@ -182,7 +182,7 @@ class installView extends install
|
|||
include _XE_PATH_.'files/config/tmpDB.config.php';
|
||||
|
||||
Context::set('use_rewrite', $_SESSION['use_rewrite']);
|
||||
Context::set('use_ssl', $_SERVER['HTTPS'] === 'on' ? 'always' : 'none');
|
||||
Context::set('use_ssl', RX_SSL ? 'always' : 'none');
|
||||
Context::set('time_zone', $GLOBALS['time_zone']);
|
||||
Context::set('db_type', $db_info->db_type);
|
||||
$this->setTemplateFile('admin_form');
|
||||
|
|
|
|||
|
|
@ -157,8 +157,7 @@ class rssView extends rss
|
|||
break;
|
||||
}
|
||||
|
||||
if($_SERVER['HTTPS']=='on') $proctcl = 'https://';
|
||||
else $proctcl = 'http://';
|
||||
$proctcl = RX_SSL ? 'https://' : 'http://';
|
||||
|
||||
$temp_link = explode('/', $info->link);
|
||||
if($temp_link[0]=='' && $info->link)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue