1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Display --sef-not-assigned-- in URL if not set in pages or chapters.

This commit is contained in:
Cameron 2014-01-12 12:52:16 -08:00
parent 08e758e9b5
commit a52c8abdae

View File

@ -34,7 +34,7 @@ class page_sitelink // include plugin-folder in the name.
private function getSef($chapter)
{
return varset($this->chapterSef[$chapter],'--sef-not-assigned--');
return vartrue($this->chapterSef[$chapter],'--sef-not-assigned--');
}
private function getParent($chapter)
@ -189,6 +189,11 @@ class page_sitelink // include plugin-folder in the name.
$book = $this->getParent($row['page_chapter']);
$row['book_sef'] = $this->getSef($book);
if(!vartrue($row['page_sef']))
{
$row['page_sef'] = '--sef-not-assigned--';
}
$sublinks[$pid][] = $_pdata[] = array(
'link_id' => $row['page_id'],
'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']);
if(!vartrue($row['chapter_sef']))
{
$row['chapter_sef'] = '--sef-not-assigned--';
}
$arr[] = array(
'link_id' => $row['chapter_id'],
'link_name' => $row['chapter_name'],