From 6ff1fbedc83c43d1daf56e0fd19ff3e5d4da7f77 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Tue, 3 Jun 2014 09:50:31 -0500 Subject: [PATCH] Allow selection of disabled topics as a parent --- include/class.topic.php | 5 +++++ include/staff/helptopic.inc.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/class.topic.php b/include/class.topic.php index 7fb60b76c..b6179f3c8 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 f93e76b5e..d1ac581a9 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; ?> -- GitLab