1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

#3778 - Add SEF URL configuration to 'pages' in comment_menu (WIP)

WIP - one URL configuration not working yet. See notes in issue #3778
This commit is contained in:
Moc
2021-12-20 21:29:33 +01:00
parent 305f0816f8
commit 484ef69dd3

View File

@@ -1562,10 +1562,17 @@ class comment
} }
break; break;
case 'page': // Custom Page case 'page': // Custom Page
if ($sql2->select("page", "*", "page_id='".$row['comment_item_id']."' AND page_class REGEXP '".e_CLASS_REGEXP."' "))
{
$row2 = $sql2->fetch();
$route = ($row2['page_chapter'] == 0) ? "page/view/other" : "page/view/index"; // Determine if page belongs to book/chapter.
$ret['comment_type'] = COMLAN_TYPE_PAGE; $ret['comment_type'] = COMLAN_TYPE_PAGE;
$ret['comment_title'] = $ret['comment_subject'] ? $ret['comment_subject']: $ret['comment_title'] = $ret['comment_subject'] ? $ret['comment_subject']:
$ret['comment_comment']; $ret['comment_comment'];
$ret['comment_url'] = e_HTTP."page.php?".$row['comment_item_id']; $ret['comment_url'] = e107::getUrl()->create($route, $row2); // e_HTTP."page.php?".$row['comment_item_id'];
}
break; break;
default: default:
if (isset($e_comment[$row['comment_type']]) && is_array($e_comment[$row['comment_type']])) if (isset($e_comment[$row['comment_type']]) && is_array($e_comment[$row['comment_type']]))