mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Display --sef-not-assigned-- in URL if not set in pages or chapters.
This commit is contained in:
@@ -34,7 +34,7 @@ class page_sitelink // include plugin-folder in the name.
|
|||||||
|
|
||||||
private function getSef($chapter)
|
private function getSef($chapter)
|
||||||
{
|
{
|
||||||
return varset($this->chapterSef[$chapter],'--sef-not-assigned--');
|
return vartrue($this->chapterSef[$chapter],'--sef-not-assigned--');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getParent($chapter)
|
private function getParent($chapter)
|
||||||
@@ -189,6 +189,11 @@ class page_sitelink // include plugin-folder in the name.
|
|||||||
$book = $this->getParent($row['page_chapter']);
|
$book = $this->getParent($row['page_chapter']);
|
||||||
$row['book_sef'] = $this->getSef($book);
|
$row['book_sef'] = $this->getSef($book);
|
||||||
|
|
||||||
|
if(!vartrue($row['page_sef']))
|
||||||
|
{
|
||||||
|
$row['page_sef'] = '--sef-not-assigned--';
|
||||||
|
}
|
||||||
|
|
||||||
$sublinks[$pid][] = $_pdata[] = array(
|
$sublinks[$pid][] = $_pdata[] = array(
|
||||||
'link_id' => $row['page_id'],
|
'link_id' => $row['page_id'],
|
||||||
'link_name' => $row['page_title'] ? $row['page_title'] : 'No title', // FIXME lan
|
'link_name' => $row['page_title'] ? $row['page_title'] : 'No title', // FIXME lan
|
||||||
@@ -236,6 +241,11 @@ class page_sitelink // include plugin-folder in the name.
|
|||||||
{
|
{
|
||||||
$row['book_sef'] = $this->getSef($row['chapter_parent']);
|
$row['book_sef'] = $this->getSef($row['chapter_parent']);
|
||||||
|
|
||||||
|
if(!vartrue($row['chapter_sef']))
|
||||||
|
{
|
||||||
|
$row['chapter_sef'] = '--sef-not-assigned--';
|
||||||
|
}
|
||||||
|
|
||||||
$arr[] = array(
|
$arr[] = array(
|
||||||
'link_id' => $row['chapter_id'],
|
'link_id' => $row['chapter_id'],
|
||||||
'link_name' => $row['chapter_name'],
|
'link_name' => $row['chapter_name'],
|
||||||
|
Reference in New Issue
Block a user