Skip to content
Browse files

MDL-32023 wiki: remove hard-coded edit string

  • Loading branch information...
1 parent 8440c2c commit 1238c6fee7c7469a626f4fe1cfef2c8f4282f985 @mackensen mackensen committed with stronk7 Mar 13, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −0 mod/wiki/lang/en/wiki.php
  2. +1 −2 mod/wiki/parser/markups/wikimarkup.php
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) {

0 comments on commit 1238c6f

Please sign in to comment.
Something went wrong with that request. Please try again.