Index: trunk/extensions/MeanEditor/MeanEditor.php |
— | — | @@ -38,7 +38,6 @@ |
39 | 39 | function deny_visual_because_of($reason, &$edit_context) |
40 | 40 | { |
41 | 41 | global $wgOut; |
42 | | - wfLoadExtensionMessages('MeanEditor'); |
43 | 42 | $wgOut->addHTML('<p class="visual_editing_denied errorbox">' . wfMsg('no_visual') . '<em class="visual_editing_denied_reason">'.$reason.'</em></p>'); |
44 | 43 | # FIXME: Doesn't work. Why? |
45 | 44 | #$edit_context->editFormTextBeforeContent .= '<p class="visual_editing_denied errorbox">The visual editor can\'t be used for this page. Most likely, it contains advanced or unsopported features. If you can, try editing smaller paragraphs.<br /><br />Reason: <em class="visual_editing_denied_reason">'.$reason.'</em></p>'; |
— | — | @@ -50,7 +49,6 @@ |
51 | 50 | function meaneditor_wiki2html($article, $user, &$edit_context, &$wiki_text) |
52 | 51 | { |
53 | 52 | global $wgUploadPath, $wgArticlePath; |
54 | | - wfLoadExtensionMessages('MeanEditor'); |
55 | 53 | $meaneditor_page_src = str_replace('$1', '', $wgArticlePath); |
56 | 54 | |
57 | 55 | # Detect code sections (lines beginning with whitespace) |
— | — | @@ -102,9 +100,9 @@ |
103 | 101 | #$wiki_text=preg_replace('/\'\'\'(.*?)\'\'\'/','<strong>$1</strong>',$wiki_text); |
104 | 102 | #$wiki_text=preg_replace('/\'\'(.*?)\'\'/','<em>$1</em>',$wiki_text); |
105 | 103 | $obp = new Parser; |
106 | | - $obp->clearState(); |
107 | 104 | $obp->setTitle(''); |
108 | 105 | $obp->mOptions = new ParserOptions; |
| 106 | + $obp->clearState(); |
109 | 107 | $wiki_text = $obp->doAllQuotes($wiki_text); |
110 | 108 | |
111 | 109 | #Substitute === |
— | — | @@ -262,8 +260,6 @@ |
263 | 261 | function meaneditor_showBox(&$edit_context, $html_text, $rows, $cols, $ew) |
264 | 262 | { |
265 | 263 | global $wgOut, $wgArticlePath, $wgStylePath, $wgUploadPath, $wgLang; |
266 | | - wfLoadExtensionMessages('MeanEditor'); |
267 | | - $sk = new Skin; |
268 | 264 | $wiki_path = str_replace('$1', '', $wgArticlePath); |
269 | 265 | $wgOut->addScriptFile('../../extensions/MeanEditor/wymeditor/jquery/jquery.js'); |
270 | 266 | $wgOut->addScriptFile('../../extensions/MeanEditor/wymeditor/wymeditor/jquery.wymeditor.pack.js'); |
— | — | @@ -308,7 +304,7 @@ |
309 | 305 | + "</body>", |
310 | 306 | dialogImageHtml: "<body class=\'wym_dialog wym_dialog_image\'" |
311 | 307 | + " onload=\'WYMeditor.INIT_DIALOG(" + WYMeditor.INDEX + ")\'" |
312 | | - + ">' . preg_replace('/[\r\n]+/', "", str_replace('</script>','</scr"+"ipt>',str_replace('"','\\"',str_replace('\'','\\\'',$sk->makeGlobalVariablesScript(false))))) . '" |
| 308 | + + ">" |
313 | 309 | + "<script type=\'text/javascript\' src=\''.$wgStylePath.'/common/ajax.js\'></scr"+"ipt>" |
314 | 310 | + "<script type=\'text/javascript\'>function meaneditor_responder(e) {" |
315 | 311 | + " divwait=document.getElementById(\'meaneditor_ajax_wait\');" |
— | — | @@ -475,7 +471,6 @@ |
476 | 472 | $return_empty = false; |
477 | 473 | } |
478 | 474 | if ($return_empty) { |
479 | | - wfLoadExtensionMessages('MeanEditor'); |
480 | 475 | return '<tr><td colspan="2"><strong>' . wfMsgWikiHtml('no_recent_images') . '</strong>' . ($u->isLoggedIn() ? '' : wfMsgWikiHtml('try_login')) . '</td></tr>'; |
481 | 476 | } else return $return_text; |
482 | 477 | } |
— | — | @@ -503,7 +498,6 @@ |
504 | 499 | # Regular Editpage hooks |
505 | 500 | function meaneditor_checkboxes(&$editpage, &$checkboxes, &$tabindex) |
506 | 501 | { |
507 | | - wfLoadExtensionMessages('MeanEditor'); |
508 | 502 | $checkboxes['want_traditional_editor'] = ''; |
509 | 503 | $attribs = array( |
510 | 504 | 'tabindex' => ++$tabindex, |