Permalink
Browse files

MDL-43109: mod/wiki - When editing pages populate the default value f…

…or the tags input.
  • Loading branch information...
1 parent cf0e970 commit 23353087ca50a9fb890201e17c05c83cebd7fc04 Michael Dikih committed Nov 28, 2013
Showing with 1 addition and 7 deletions.
  1. +0 −2 mod/wiki/edit_form.php
  2. +1 −5 mod/wiki/pagelib.php
View
@@ -101,10 +101,8 @@ protected function definition() {
$mform->setType('contentformat', PARAM_ALPHANUMEXT);
if (!empty($CFG->usetags)) {
- $tags = !isset($this->_customdata['tags'])?"":$this->_customdata['tags'];
$mform->addElement('header', 'tagshdr', get_string('tags', 'tag'));
$mform->addElement('tags', 'tags', get_string('tags'));
- $mform->setDefault('tags', $tags);
$mform->setType('tags', PARAM_TEXT);
}
View
@@ -564,10 +564,6 @@ protected function print_edit($content = null) {
$params['filearea'] = 'attachments';
}
- if (!empty($CFG->usetags)) {
- $params['tags'] = tag_get_tags_csv('wiki_pages', $this->page->id, TAG_RETURN_TEXT);
- }
-
$form = new mod_wiki_edit_form($url, $params);
if ($formdata = $form->get_data()) {
@@ -576,7 +572,7 @@ protected function print_edit($content = null) {
}
} else {
if (!empty($CFG->usetags)) {
- $data->tags = tag_get_tags_array('wiki', $this->page->id);
+ $data->tags = tag_get_tags_array('wiki_pages', $this->page->id);
}
}

0 comments on commit 2335308

Please sign in to comment.