diff --git a/include/class.topic.php b/include/class.topic.php index 7fb60b76c8781c7a8b24f997bb3c70e7a5ab6b42..b6179f3c85e1bc04a0d5f6582e307e301e7b161a 100644 --- a/include/class.topic.php +++ b/include/class.topic.php @@ -240,6 +240,10 @@ class Topic { return self::getHelpTopics(true); } + function getAllHelpTopics() { + return self::getHelpTopics(false, true); + } + function getIdByName($name, $pid=0) { $sql='SELECT topic_id FROM '.TOPIC_TABLE @@ -256,6 +260,7 @@ class Topic { } function save($id, $vars, &$errors) { + global $cfg; $vars['topic']=Format::striptags(trim($vars['topic'])); diff --git a/include/staff/helptopic.inc.php b/include/staff/helptopic.inc.php index f93e76b5e72823fc179d3d524cc3a6eb7f488242..d1ac581a911312b81d7def619a1ddba5876278b5 100644 --- a/include/staff/helptopic.inc.php +++ b/include/staff/helptopic.inc.php @@ -72,7 +72,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); <td> <select name="pid"> <option value="">— Top-Level Topic —</option><?php - $topics = Topic::getHelpTopics(); + $topics = Topic::getAllHelpTopics(); while (list($id,$topic) = each($topics)) { if ($id == $info['topic_id']) continue; ?>