mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 05:07:27 +02:00
Fixes #1698 - Admin Sitelinks relative URL issue.
This commit is contained in:
@@ -691,8 +691,19 @@ class links_admin_form_ui extends e_admin_form_ui
|
|||||||
if($mode == 'read')
|
if($mode == 'read')
|
||||||
{
|
{
|
||||||
$linkUrl = $this->getController()->getListModel()->get('link_url');
|
$linkUrl = $this->getController()->getListModel()->get('link_url');
|
||||||
$linkUrl = e107::getParser()->replaceConstants($linkUrl,'abs');
|
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
$url = $this->link_url($linkUrl,$mode);
|
$url = $this->link_url($linkUrl,$mode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "<a href='".$url."' rel='external'>".$curVal."</a>"; // $this->linkFunctions[$curVal];
|
return "<a href='".$url."' rel='external'>".$curVal."</a>"; // $this->linkFunctions[$curVal];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -740,10 +751,21 @@ class links_admin_form_ui extends e_admin_form_ui
|
|||||||
$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')
|
||||||
|
{
|
||||||
|
$curVal = '{e_BASE}'.$curVal;
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($owner) && !empty($sef))
|
if(!empty($owner) && !empty($sef))
|
||||||
{
|
{
|
||||||
$curVal = str_replace(e_HTTP,'',e107::url($owner,$sef));
|
$curVal = e107::url($owner,$sef, null);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$curVal = e107::getParser()->replaceConstants($curVal,'abs');
|
||||||
|
}
|
||||||
|
|
||||||
|
e107::getDebug()->log($curVal);
|
||||||
|
|
||||||
return $curVal; // $this->linkFunctions[$curVal];
|
return $curVal; // $this->linkFunctions[$curVal];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user