1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-13 17:12:07 +02:00

Page: Fix for {CPAGEFIELDTITLE: name=x} rendering.

This commit is contained in:
Cameron 2017-10-04 14:17:08 -07:00
parent c6c6467a59
commit 2d43b87b81

View File

@ -36,6 +36,8 @@ class cpage_shortcodes extends e_shortcode
$this->chapterData[$id] = $row;
}
@ -622,6 +624,7 @@ class cpage_shortcodes extends e_shortcode
function sc_cpagefieldtitle($parm=null)
{
if(empty($parm['name']) || empty($this->var['page_fields']))
{
return null;
@ -631,6 +634,12 @@ class cpage_shortcodes extends e_shortcode
$key = $parm['name'];
if(!empty($this->chapterData[$chap]['chapter_fields']) && is_string($this->chapterData[$chap]['chapter_fields']))
{
$this->chapterData[$chap]['chapter_fields'] = e107::unserialize($this->chapterData[$chap]['chapter_fields']);
}
if(!empty($this->chapterData[$chap]['chapter_fields'][$key]['title']))
{
return $this->chapterData[$chap]['chapter_fields'][$key]['title'];