1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Fix navigation links assembling (navigation handler)

This commit is contained in:
SecretR
2013-02-13 17:03:53 +02:00
parent fa0e7ee4b5
commit bcaf4e70c6
5 changed files with 13 additions and 10 deletions

View File

@@ -280,6 +280,7 @@ class page_admin_ui extends e_admin_ui
protected $batchCopy = true;
protected $sortField = 'page_order';
protected $orderStep = 10;
protected $itemRoute = 'page/view?page_id=page_id&page_sef=page_sef';
// protected $listSorting = true;
protected $fields = array(

View File

@@ -2224,12 +2224,12 @@ class e_admin_controller_ui extends e_admin_controller
protected $listOrder = null;
/**
* @var field containing the order number
* @var string field containing the order number
*/
protected $sortField = null;
/**
* @var reorder step
* @var int reorder step
*/
protected $orderStep = 1;

View File

@@ -2012,7 +2012,7 @@ class e_form
$value = ($value ? vartrue($parms['pre']).defset($value, $value).vartrue($parms['post']) : '');
// Inline Editing. //FIXME - doesn't save data
// Inline Editing.
if(!vartrue($attributes['noedit']) && vartrue($parms['editable']) && !vartrue($parms['link'])) // avoid bad markup, better solution coming up
{
$mode = preg_replace('/[^\w]/', '', vartrue($_GET['mode'], ''));
@@ -2048,12 +2048,12 @@ class e_form
{
$value = $tp->htmlwrap($value, (int)$parms['wrap'], varset($parms['wrapChar'], ' '));
}
if(vartrue($parms['link']) && $id && is_numeric($id) )
if(vartrue($parms['link']) && $id && is_numeric($id))
{
$link = str_replace('[id]',$id,$parms['link']);
$link = $tp->replaceConstants($link); // SEF URL is not important since we're in admin.
$dialog = vartrue($parms['dialog']) ? "e-dialog" : "";
$value = "<a class='e-tip {$dialog}' href='".$link."' title='Quick View'>".$value."</a>";
$dialog = vartrue($parms['dialog']) ? " e-dialog" : "";
$value = "<a class='e-tip{$dialog}' href='".$link."' title='Quick View'>".$value."</a>";
}
if(!vartrue($attributes['noedit']) && vartrue($parms['editable']) && !vartrue($parms['link'])) // avoid bad markup, better solution coming up

View File

@@ -1535,7 +1535,11 @@ class navigation_shortcodes extends e_shortcode
function sc_link_url($parm='')
{
if($this->var['link_url'][0] != "{" && strpos($this->var['link_url'],"://")===false)
if(strpos($this->var['link_url'], e_HTTP) === 0)
{
$url = "{e_BASE}".substr($this->var['link_url'], strlen(e_HTTP));
}
elseif($this->var['link_url'][0] != "{" && strpos($this->var['link_url'],"://")===false)
{
$url = "{e_BASE}".$this->var['link_url']; // Add e_BASE to links like: 'news.php' or 'contact.php'
}

View File

@@ -52,9 +52,7 @@ class page_sitelinks // include plugin-folder in the name.
$sublinks[$pid][] = array(
'link_id' => $row['page_id'],
'link_name' => $row['page_title'],
// 'link_url' => vartrue($row['page_sef'],'page.php?id='.$row['page_id']),
'link_url' => 'page.php?id='.$row['page_id'],
// 'link_url' => e107::getUrl()->create('page/view', $row, 'allow=page_id,page_sef'), //XXX FIXME - bad links created.
'link_url' => e107::getUrl()->create('page/view', $row, array('allow' => 'page_sef,page_title,page_id')),
'link_description' => '',
'link_button' => '',
'link_category' => '',