Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-32023 wiki: remove hard-coded edit string

  • Loading branch information...
commit 789379ec588dfe48f0333e5af0e51e3e135aa44a 1 parent 470d47f
Charles Fulton mackensen authored
1  mod/wiki/lang/en/wiki.php
@@ -59,6 +59,7 @@
59 59 $string['editing'] = 'Editing wiki page';
60 60 $string['editingcomment'] = 'Editing comment';
61 61 $string['editingpage'] = 'Editing this page \'{$a}\'';
  62 +$string['editsection'] = 'edit';
62 63 $string['files'] = 'Files';
63 64 $string['filenotuploadederror'] = 'File \'{$a}\' could not be uploaded correctly.';
64 65 $string['filtername'] = 'Wiki auto-linking';
3  mod/wiki/parser/markups/wikimarkup.php
@@ -18,7 +18,6 @@
18 18 protected $wiki_page_id;
19 19
20 20 //sections
21   - protected $section_edit_text = "[edit]";
22 21 protected $repeated_sections;
23 22
24 23 protected $section_editing = true;
@@ -181,7 +180,7 @@ protected function generate_header($text, $level) {
181 180 $text = trim($text);
182 181
183 182 if (!$this->pretty_print && $level == 1) {
184   - $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'));
  183 + $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'));
185 184 }
186 185
187 186 if ($level < 4) {

0 comments on commit 789379e

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