1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Fix: {CHAPTER_MENUS} shortcode now respects menu-visibility setting.

This commit is contained in:
Cameron
2017-03-12 10:01:19 -07:00
parent 392a4f1785
commit 17abb6a08a
3 changed files with 3 additions and 2 deletions

View File

@@ -185,7 +185,7 @@ class page_chapters_ui extends e_admin_ui
);
protected $fieldpref = array('checkboxes', 'chapter_icon', 'chapter_id', 'chapter_name', 'chapter_description','chapter_template', 'chapter_manager', 'chapter_order', 'options');
protected $fieldpref = array('checkboxes', 'chapter_icon', 'chapter_id', 'chapter_name', 'chapter_description','chapter_template', 'chapter_visibility', 'chapter_order', 'options');
protected $books = array();

View File

@@ -1323,6 +1323,7 @@ class users_admin_ui extends e_admin_ui
$sql = e107::getDb();
$e_event = e107::getEvent();
$admin_log = e107::getAdminLog();
$pref = e107::getPref();
if (!$_POST['ac'] == md5(ADMINPWCHANGE))
{

View File

@@ -138,7 +138,7 @@ class page_shortcodes extends e_shortcode
function sc_chapter_menus($parm=null)
{
$tp = e107::getParser();
$query = "SELECT * FROM #page AS p LEFT JOIN #page_chapters as ch ON p.page_chapter=ch.chapter_id WHERE ch.chapter_visibility IN (" . USERCLASS_LIST . ") AND ch.chapter_sef = '" . $tp->filter($parm['name'],'str') . "' ORDER BY p.page_order ASC ";
$query = "SELECT * FROM #page AS p LEFT JOIN #page_chapters as ch ON p.page_chapter=ch.chapter_id WHERE ch.chapter_visibility IN (" . USERCLASS_LIST . ") AND p.menu_class IN (" . USERCLASS_LIST . ") AND ch.chapter_sef = '" . $tp->filter($parm['name'],'str') . "' ORDER BY p.page_order ASC ";
$text = '';