Skip to content
Snippets Groups Projects
Commit 6ff1fbed authored by Jared Hancock's avatar Jared Hancock
Browse files

Allow selection of disabled topics as a parent

parent fa4c8d6d
No related branches found
No related tags found
No related merge requests found
...@@ -240,6 +240,10 @@ class Topic { ...@@ -240,6 +240,10 @@ class Topic {
return self::getHelpTopics(true); return self::getHelpTopics(true);
} }
function getAllHelpTopics() {
return self::getHelpTopics(false, true);
}
function getIdByName($name, $pid=0) { function getIdByName($name, $pid=0) {
$sql='SELECT topic_id FROM '.TOPIC_TABLE $sql='SELECT topic_id FROM '.TOPIC_TABLE
...@@ -256,6 +260,7 @@ class Topic { ...@@ -256,6 +260,7 @@ class Topic {
} }
function save($id, $vars, &$errors) { function save($id, $vars, &$errors) {
global $cfg;
$vars['topic']=Format::striptags(trim($vars['topic'])); $vars['topic']=Format::striptags(trim($vars['topic']));
......
...@@ -72,7 +72,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); ...@@ -72,7 +72,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
<td> <td>
<select name="pid"> <select name="pid">
<option value="">&mdash; Top-Level Topic &mdash;</option><?php <option value="">&mdash; Top-Level Topic &mdash;</option><?php
$topics = Topic::getHelpTopics(); $topics = Topic::getAllHelpTopics();
while (list($id,$topic) = each($topics)) { while (list($id,$topic) = each($topics)) {
if ($id == $info['topic_id']) if ($id == $info['topic_id'])
continue; ?> continue; ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment