mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Issue #1698 - Admin Sitelinks relative URL issue. - display mode fix.
This commit is contained in:
@@ -692,15 +692,9 @@ class links_admin_form_ui extends e_admin_form_ui
|
|||||||
{
|
{
|
||||||
$linkUrl = $this->getController()->getListModel()->get('link_url');
|
$linkUrl = $this->getController()->getListModel()->get('link_url');
|
||||||
|
|
||||||
/*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
$url = $this->link_url($linkUrl,'link_id');
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
$url = $this->link_url($linkUrl,$mode);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -746,23 +740,25 @@ class links_admin_form_ui extends e_admin_form_ui
|
|||||||
|
|
||||||
function link_url($curVal,$mode)
|
function link_url($curVal,$mode)
|
||||||
{
|
{
|
||||||
if($mode == 'read')
|
if($mode == 'read' || $mode == 'link_id') // read = display mode, link_id = actual absolute URL
|
||||||
{
|
{
|
||||||
$owner = $this->getController()->getListModel()->get('link_owner');
|
$owner = $this->getController()->getListModel()->get('link_owner');
|
||||||
$sef = $this->getController()->getListModel()->get('link_sefurl');
|
$sef = $this->getController()->getListModel()->get('link_sefurl');
|
||||||
|
|
||||||
if($curVal[0] !== '{' && substr($curVal,0,4) != 'http')
|
if($curVal[0] !== '{' && substr($curVal,0,4) != 'http' && $mode == 'link_id')
|
||||||
{
|
{
|
||||||
$curVal = '{e_BASE}'.$curVal;
|
$curVal = '{e_BASE}'.$curVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($owner) && !empty($sef))
|
if(!empty($owner) && !empty($sef))
|
||||||
{
|
{
|
||||||
$curVal = e107::url($owner,$sef, null);
|
$opt = ($mode == 'read') ? array('mode'=>'raw') : array();
|
||||||
|
$curVal = e107::url($owner,$sef, null, $opt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$curVal = e107::getParser()->replaceConstants($curVal,'abs');
|
$opt = ($mode == 'read') ? 'rel' : 'abs';
|
||||||
|
$curVal = e107::getParser()->replaceConstants($curVal,$opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
e107::getDebug()->log($curVal);
|
e107::getDebug()->log($curVal);
|
||||||
|
@@ -2942,6 +2942,10 @@ class e107
|
|||||||
{
|
{
|
||||||
$sefUrl = SITEURL.$rawUrl;
|
$sefUrl = SITEURL.$rawUrl;
|
||||||
}
|
}
|
||||||
|
elseif($options['mode'] == 'raw')
|
||||||
|
{
|
||||||
|
$sefUrl = $rawUrl;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sefUrl = e_HTTP.$rawUrl;
|
$sefUrl = e_HTTP.$rawUrl;
|
||||||
|
Reference in New Issue
Block a user