fixed bugs introduced by making admin components

also show a TOC on both admin pages to easily switch
This commit is contained in:
Andreas Gohr
2016-02-04 13:20:28 +01:00
parent 15929be2d8
commit dbffe06e4b
3 changed files with 20 additions and 18 deletions

View File

@ -68,8 +68,6 @@ class admin_plugin_struct_assignments extends DokuWiki_Admin_Plugin {
* Render HTML output, e.g. helpful text and a form
*/
public function html() {
global $INPUT;
echo $this->locale_xhtml('assignments_intro');
$res = $this->sqlite->query('SELECT tbl FROM schemas GROUP BY tbl');
@ -106,17 +104,17 @@ class admin_plugin_struct_assignments extends DokuWiki_Admin_Plugin {
$html .= "</div></li>";
echo $html;
echo '</ul>';
}
$table = Schema::cleanTableName($INPUT->str('table'));
if($table) {
echo '<h2>'.sprintf($this->getLang('edithl'), hsc($table)).'</h2>';
$editor = new SchemaEditor(new Schema($table));
echo $editor->getEditor();
} else {
$this->html_newschema();
}
/**
* Copies the TOC from the Schema Editor
*
* @return array
*/
public function getTOC() {
/** @var admin_plugin_struct_schemas $plugin */
$plugin = plugin_load('admin', 'struct_schemas');
return $plugin->getTOC();
}
}