Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-32023 wiki: remove hard-coded edit string

  • Loading branch information...
commit ed10bfb2b04fa8881068cf73b853c5f1cfc38a52 1 parent c86262e
@mackensen mackensen authored stronk7 committed
View
1  mod/wiki/lang/en/wiki.php
@@ -59,6 +59,7 @@
$string['editing'] = 'Editing wiki page';
$string['editingcomment'] = 'Editing comment';
$string['editingpage'] = 'Editing this page \'{$a}\'';
+$string['editsection'] = 'edit';
$string['files'] = 'Files';
$string['filenotuploadederror'] = 'File \'{$a}\' could not be uploaded correctly.';
$string['filtername'] = 'Wiki auto-linking';
View
3  mod/wiki/parser/markups/wikimarkup.php
@@ -18,7 +18,6 @@
protected $wiki_page_id;
//sections
- protected $section_edit_text = "[edit]";
protected $repeated_sections;
protected $section_editing = true;
@@ -181,7 +180,7 @@ protected function generate_header($text, $level) {
$text = trim($text);
if (!$this->pretty_print && $level == 1) {
- $text .= parser_utils::h('a', $this->section_edit_text, array('href' => "edit.php?pageid={$this->wiki_page_id}&section=" . urlencode($text), 'class' => 'wiki_edit_section'));
+ $text .= parser_utils::h('a', '['.get_string('editsection', 'wiki').']', array('href' => "edit.php?pageid={$this->wiki_page_id}&section=" . urlencode($text), 'class' => 'wiki_edit_section'));
}
if ($level < 4) {
Please sign in to comment.
Something went wrong with that request. Please try again.