r50669 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50668‎ | r50669 | r50670 >
Date:19:56, 16 May 2009
Author:ashley
Status:deferred (Comments)
Tags:
Comment:
FCKeditor updates:
*coding style tweaks
*remove some backwards-compatibility stuff; versions older than 1.13 are not supported anymore (see http://www.mediawiki.org/wiki/Version_lifecycle)
*combine i18n files into one i18n file
*add Finnish i18n
*use class autoloading
*add Michael's patch from http://www.mediawiki.org/wiki/Extension_talk:FCKeditor_(Official) to support Taiwan Chinese language
*document configuration variables
*move hook registration into main loader file
*add two new hooked functions and remove two; thanks to onGetPreferences function, FCKeditor-related prefs are now in the correct tab on Special:Preferences (fixes http://dev.fckeditor.net/ticket/2527)
*tweak extension credits; name some devs from FCKeditor team, remove Wikia (per Fred's comment on http://www.mediawiki.org/wiki/Extension_talk:FCKeditor_(Official)/Archive_1#Remove_.22Wikia.22_references_from_this_project), add version number, add myself to authors
*remove unused globals
*document some functions
*update README file
*remove BROKEN file - should be working now and has been tested with nightly build of FCKeditor & MW 1.16alpha (r50657), PHP 5.2.4 and MySQL 5.0.45
Modified paths:
  • /trunk/extensions/FCKeditor/BROKEN (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.ar.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.de.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.en.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.es.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.fa.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.fr.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.gl.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.he.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.hsb.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.ko.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.nl.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.no.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.oc.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.pl.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.pms.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.pt.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.sk.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.sv.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.i18n.zh-tw.php (deleted) (history)
  • /trunk/extensions/FCKeditor/FCKeditor.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorEditPage.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorParser.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorParserWrapper.body.php (added) (history)
  • /trunk/extensions/FCKeditor/FCKeditorSajax.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorSkin.body.php (modified) (history)
  • /trunk/extensions/FCKeditor/README.txt (modified) (history)
  • /trunk/extensions/FCKeditor/fckeditor_config.js (modified) (history)
  • /trunk/extensions/FCKeditor/mw11 (deleted) (history)
  • /trunk/extensions/FCKeditor/mw12 (deleted) (history)
  • /trunk/extensions/FCKeditor/mw14 (deleted) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/fckplugin.js (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/lang/en.js (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/lang/fi.js (added) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/lang/he.js (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/lang/ko.js (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/lang/pl.js (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/lang/sv.js (modified) (history)
  • /trunk/extensions/FCKeditor/plugins/mediawiki/lang/zh-tw.js (added) (history)

Diff [purge]

Index: trunk/extensions/FCKeditor/FCKeditor.i18n.no.php
@@ -1,19 +0,0 @@
2 -<?php
3 -$messages = array(
4 - 'textrichditor' => 'Rik tekstredigering',
5 - 'tog-riched_disable' => 'Slå av rik tekstredigering',
6 - 'tog-riched_disable_ns_main' => 'Slå av rik tekstredigering i hovednavnerommet',
7 - 'tog-riched_disable_ns_talk' => 'Slå av rik tekstredigering i «{{ns:Talk}}»-navnerommet',
8 - 'tog-riched_disable_ns_user' => 'Slå av rik tekstredigering i «{{ns:User}}»-navnerommet',
9 - 'tog-riched_disable_ns_user_talk' => 'Slå av rik tekstredigering i «{{ns:User_talk}}»-navnerommet',
10 - 'tog-riched_disable_ns_project' => 'Slå av rik tekstredigering i «{{ns:Project}}»-navnerommet',
11 - 'tog-riched_disable_ns_project_talk' => 'Slå av rik tekstredigering i «{{ns:Project_talk}}»-navnerommet',
12 - 'tog-riched_disable_ns_image' => 'Slå av rik tekstredigering i «{{ns:Image}}»-navnerommet',
13 - 'tog-riched_disable_ns_image_talk' => 'Slå av rik tekstredigering i «{{ns:Image_talk}}»-navnerommet',
14 - 'tog-riched_disable_ns_template' => 'Slå av rik tekstredigering i «{{ns:Template}}»-navnerommet',
15 - 'tog-riched_disable_ns_template_talk' => 'Slå av rik tekstredigering i «{{ns:Template_talk}}»-navnerommet',
16 - 'tog-riched_disable_ns_help' => 'Slå av rik tekstredigering i «{{ns:Help}}»-navnerommet',
17 - 'tog-riched_disable_ns_help_talk' => 'Slå av rik tekstredigering i «{{ns:Help_talk}}»-navnerommet',
18 - 'tog-riched_disable_ns_category' => 'Slå av rik tekstredigering i «{{ns:Category}}»-navnerommet',
19 - 'tog-riched_disable_ns_category_talk' => 'Slå av rik tekstredigering i «{{ns:Category_talk}}»-navnerommet',
20 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.pt.php
@@ -1,21 +0,0 @@
2 -<?php
3 -$messages = array(
4 - 'textrichditor' => 'Editor Rico',
5 - 'tog-riched_disable' => 'Desactivar editor rico',
6 - 'tog-riched_disable_ns_main' => 'Desactivar editor rico no espaço nominal principal',
7 - 'tog-riched_disable_ns_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Talk}}"',
8 - 'tog-riched_disable_ns_user' => 'Desactivar editor rico no espaço nominal "{{ns:User}}"',
9 - 'tog-riched_disable_ns_user_talk' => 'Desactivar editor rico no espaço nominal "{{ns:User_talk}}"',
10 - 'tog-riched_disable_ns_project' => 'Desactivar editor rico no espaço nominal "{{ns:Project}}"',
11 - 'tog-riched_disable_ns_project_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Project_talk}}"',
12 - 'tog-riched_disable_ns_image' => 'Desactivar editor rico no espaço nominal "{{ns:Image}}"',
13 - 'tog-riched_disable_ns_image_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Image_talk}}"',
14 - 'tog-riched_disable_ns_mediawiki' => 'Desactivar editor rico no espaço nominal "{{ns:MediaWiki}}"',
15 - 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar editor rico no espaço nominal "{{ns:MediaWiki_talk}}"',
16 - 'tog-riched_disable_ns_template' => 'Desactivar editor rico no espaço nominal "{{ns:Template}}"',
17 - 'tog-riched_disable_ns_template_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Template_talk}}"',
18 - 'tog-riched_disable_ns_help' => 'Desactivar editor rico no espaço nominal "{{ns:Help}}"',
19 - 'tog-riched_disable_ns_help_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Help_talk}}"',
20 - 'tog-riched_disable_ns_category' => 'Desactivar editor rico no espaço nominal "{{ns:Category}}"',
21 - 'tog-riched_disable_ns_category_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Category_talk}}"',
22 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.oc.php
@@ -1,22 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 - 'textrichditor' => '\'\'Rich Editor\'\'',
6 - 'tog-riched_disable' => 'Desactivar \'\'Rich Editor\'\'',
7 - 'tog-riched_disable_ns_main' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms principal.',
8 - 'tog-riched_disable_ns_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Talk}}\'\'.',
9 - 'tog-riched_disable_ns_user' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:User}}\'\'.',
10 - 'tog-riched_disable_ns_user_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:User_talk}}\'\'.',
11 - 'tog-riched_disable_ns_project' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Project}}\'\'.',
12 - 'tog-riched_disable_ns_project_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Project_talk}}\'\'.',
13 - 'tog-riched_disable_ns_image' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Image}}\'\'.',
14 - 'tog-riched_disable_ns_image_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Image_talk}}\'\'.',
15 - 'tog-riched_disable_ns_mediawiki' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Image_talk}}\'\'.',
16 - 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:MediaWiki_talk}}\'\'.',
17 - 'tog-riched_disable_ns_template' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Template}}\'\'.',
18 - 'tog-riched_disable_ns_template_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Template_talk}}\'\'.',
19 - 'tog-riched_disable_ns_help' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Help}}\'\'.',
20 - 'tog-riched_disable_ns_help_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Help_talk}}\'\'.',
21 - 'tog-riched_disable_ns_category' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Category}}\'\'.',
22 - 'tog-riched_disable_ns_category_talk' => 'Desactivar \'\'Rich Editor\'\' dins l\'espaci de noms \'\'{{ns:Category_talk}}\'\'.',
23 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.ar.php
@@ -1,21 +0,0 @@
2 -<?php
3 -$messages = array(
4 - 'textrichditor' => 'محرر متقدم',
5 - 'tog-riched_disable' => 'عطل المحرر المتقدم',
6 - 'tog-riched_disable_ns_main' => 'عطل المحرر المتقدم في النطاق الرئيسي',
7 - 'tog-riched_disable_ns_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Talk}}"',
8 - 'tog-riched_disable_ns_user' => 'عطل المحرر المتقدم في نطاق "{{ns:User}}"',
9 - 'tog-riched_disable_ns_user_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:User_talk}}"',
10 - 'tog-riched_disable_ns_project' => 'عطل المحرر المتقدم في نطاق "{{ns:Project}}"',
11 - 'tog-riched_disable_ns_project_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Project_talk}}"',
12 - 'tog-riched_disable_ns_image' => 'عطل المحرر المتقدم في نطاق "{{ns:Image}}"',
13 - 'tog-riched_disable_ns_image_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Image_talk}}"',
14 - 'tog-riched_disable_ns_mediawiki' => 'عطل المحرر المتقدم في نطاق "{{ns:MediaWiki}}"',
15 - 'tog-riched_disable_ns_mediawiki_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:MediaWiki_talk}}"',
16 - 'tog-riched_disable_ns_template' => 'عطل المحرر المتقدم في نطاق "{{ns:Template}}"',
17 - 'tog-riched_disable_ns_template_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Template_talk}}"',
18 - 'tog-riched_disable_ns_help' => 'عطل المحرر المتقدم في نطاق "{{ns:Help}}"',
19 - 'tog-riched_disable_ns_help_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Help_talk}}"',
20 - 'tog-riched_disable_ns_category' => 'عطل المحرر المتقدم في نطاق "{{ns:Category}}"',
21 - 'tog-riched_disable_ns_category_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Category_talk}}"',
22 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.en.php
@@ -1,27 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 -'textrichditor' => 'Rich Editor',
6 -'tog-riched_disable' => 'Disable rich editor',
7 -'tog-riched_disable_ns_main' => 'Disable rich editor within the main namespace',
8 -'tog-riched_disable_ns_talk' => 'Disable rich editor within the "{{ns:Talk}}" namespace',
9 -'tog-riched_disable_ns_user' => 'Disable rich editor within the "{{ns:User}}" namespace',
10 -'tog-riched_disable_ns_user_talk' => 'Disable rich editor within the "{{ns:User_talk}}" namespace',
11 -'tog-riched_disable_ns_project' => 'Disable rich editor within the "{{ns:Project}}" namespace',
12 -'tog-riched_disable_ns_project_talk' => 'Disable rich editor within the "{{ns:Project_talk}}" namespace',
13 -'tog-riched_disable_ns_image' => 'Disable rich editor within the "{{ns:Image}}" namespace',
14 -'tog-riched_disable_ns_image_talk' => 'Disable rich editor within the "{{ns:Image_talk}}" namespace',
15 -'tog-riched_disable_ns_mediawiki' => 'Disable rich editor within the "{{ns:MediaWiki}}" namespace',
16 -'tog-riched_disable_ns_mediawiki_talk' => 'Disable rich editor within the "{{ns:MediaWiki_talk}}" namespace',
17 -'tog-riched_disable_ns_template' => 'Disable rich editor within the "{{ns:Template}}" namespace',
18 -'tog-riched_disable_ns_template_talk' => 'Disable rich editor within the "{{ns:Template_talk}}" namespace',
19 -'tog-riched_disable_ns_help' => 'Disable rich editor within the "{{ns:Help}}" namespace',
20 -'tog-riched_disable_ns_help_talk' => 'Disable rich editor within the "{{ns:Help_talk}}" namespace',
21 -'tog-riched_disable_ns_category' => 'Disable rich editor within the "{{ns:Category}}" namespace',
22 -'tog-riched_disable_ns_category_talk' => 'Disable rich editor within the "{{ns:Category_talk}}" namespace',
23 -'rich_editor_new_window' => 'Open Rich editor in new window',
24 -'tog-riched_start_disabled' => 'Start with rich editor disabled',
25 -'tog-riched_use_popup' => 'Open rich editor in a popup',
26 -'tog-riched_use_toggle' => 'Use toggle to switch between wikitext and rich editor (replace textarea with rich editor)',
27 -'tog-riched_toggle_remember_state' => 'Remember last toggle state',
28 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.gl.php
@@ -1,27 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 - 'textrichditor' => 'Editor Rico',
6 - 'tog-riched_disable' => 'Desactivar o editor rico',
7 - 'tog-riched_disable_ns_main' => 'Desactivar o editor rico no espazo de nomes principal',
8 - 'tog-riched_disable_ns_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Talk}}"',
9 - 'tog-riched_disable_ns_user' => 'Desactivar o editor rico no espazo de nomes "{{ns:User}}"',
10 - 'tog-riched_disable_ns_user_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:User_Talk}}"',
11 - 'tog-riched_disable_ns_project' => 'Desactivar o editor rico no espazo de nomes "{{ns:Project}}"',
12 - 'tog-riched_disable_ns_project_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Project_Talk}}"',
13 - 'tog-riched_disable_ns_image' => 'Desactivar o editor rico no espazo de nomes "{{ns:Image}}"',
14 - 'tog-riched_disable_ns_image_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Image_talk}}"',
15 - 'tog-riched_disable_ns_mediawiki' => 'Desactivar o editor rico no espazo de nomes "{{ns:MediaWiki}}"',
16 - 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:MediaWiki_talk}}"',
17 - 'tog-riched_disable_ns_template' => 'Desactivar o editor rico no espazo de nomes "{{ns:Template}}"',
18 - 'tog-riched_disable_ns_template_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Template_talk}}"',
19 - 'tog-riched_disable_ns_help' => 'Desactivar o editor rico no espazo de nomes "{{ns:Help}}"',
20 - 'tog-riched_disable_ns_help_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Help_talk}}"',
21 - 'tog-riched_disable_ns_category' => 'Desactivar o editor rico no espazo de nomes "{{ns:Category}}"',
22 - 'tog-riched_disable_ns_category_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Category_talk}}"',
23 - 'rich_editor_new_window' => 'Abrir editor enriquecido nunha nova ventana',
24 - 'tog-riched_start_disabled' => 'Comenzar con o editor enriquecido desactivado',
25 - 'tog-riched_use_popup' => 'Abrir o editor enriquecido nun popup',
26 - 'tog-riched_use_toggle' => 'Utilizar un selector para cambiar entre wikitext e o editor enriquecido',
27 - 'tog-riched_toggle_remember_state' => 'Recordar a �ltima selecci�n do editor',
28 -);
Index: trunk/extensions/FCKeditor/BROKEN
@@ -1,5 +0,0 @@
2 -This version is broken outdated and should not be used. Development is
3 -taking place elsewhere.
4 -
5 -See http://www.mediawiki.org/wiki/Extension:FCKeditor_(by_FCKeditor_and_Wikia)
6 -for a download location.
\ No newline at end of file
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.es.php
@@ -1,27 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 - 'textrichditor' => 'Editor enriquecido',
6 - 'tog-riched_disable' => 'Desactivar editor enriquecido',
7 - 'tog-riched_disable_ns_main' => 'Desactivar editor enriquecido en el espacio de nombres principal',
8 - 'tog-riched_disable_ns_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Talk}}"',
9 - 'tog-riched_disable_ns_user' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:User}}"',
10 - 'tog-riched_disable_ns_user_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:User_talk}}"',
11 - 'tog-riched_disable_ns_project' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Project}}"',
12 - 'tog-riched_disable_ns_project_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Project_talk}}"',
13 - 'tog-riched_disable_ns_image' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Image}}"',
14 - 'tog-riched_disable_ns_image_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Image_talk}}"',
15 - 'tog-riched_disable_ns_mediawiki' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:MediaWiki}}"',
16 - 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:MediaWiki_talk}}"',
17 - 'tog-riched_disable_ns_template' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Template}}"',
18 - 'tog-riched_disable_ns_template_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Template_talk}}"',
19 - 'tog-riched_disable_ns_help' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Help}}"',
20 - 'tog-riched_disable_ns_help_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Help_talk}}"',
21 - 'tog-riched_disable_ns_category' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Category}}"',
22 - 'tog-riched_disable_ns_category_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Category_talk}}"',
23 - 'rich_editor_new_window' => 'Abrir el editor enriquecido en una nueva ventana',
24 - 'tog-riched_start_disabled' => 'Empezar con el editor enriquecido desactivado',
25 - 'tog-riched_use_popup' => 'Abrir editor enriquecido en un popup',
26 - 'tog-riched_use_toggle' => 'Utilizar un selector para cambiar entre wikitext y editor enriquecido',
27 - 'tog-riched_toggle_remember_state' => 'Recordar la última selección del editor',
28 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.ko.php
@@ -1,27 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 -'textrichditor' => '리치 에디터',
6 -'tog-riched_disable' => '리치 에디터 사용하지 않기',
7 -'tog-riched_disable_ns_main' => '주 이름 공간에서 리치 에디어 사용하지 않기',
8 -'tog-riched_disable_ns_talk' => '"{{ns:Talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
9 -'tog-riched_disable_ns_user' => '"{{ns:User}}" 이름 공간에서 리치 에디어 사용하지 않기',
10 -'tog-riched_disable_ns_user_talk' => '"{{ns:User_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
11 -'tog-riched_disable_ns_project' => '"{{ns:Project}}" 이름 공간에서 리치 에디어 사용하지 않기',
12 -'tog-riched_disable_ns_project_talk' => '"{{ns:Project_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
13 -'tog-riched_disable_ns_image' => '"{{ns:Image}}" 이름 공간에서 리치 에디어 사용하지 않기',
14 -'tog-riched_disable_ns_image_talk' => '"{{ns:Image_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
15 -'tog-riched_disable_ns_mediawiki' => '"{{ns:MediaWiki}}" 이름 공간에서 리치 에디어 사용하지 않기',
16 -'tog-riched_disable_ns_mediawiki_talk' => '"{{ns:MediaWiki_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
17 -'tog-riched_disable_ns_template' => '"{{ns:Template}}" 이름 공간에서 리치 에디어 사용하지 않기',
18 -'tog-riched_disable_ns_template_talk' => '"{{ns:Template_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
19 -'tog-riched_disable_ns_help' => '"{{ns:Help}}" 이름 공간에서 리치 에디어 사용하지 않기',
20 -'tog-riched_disable_ns_help_talk' => '"{{ns:Help_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
21 -'tog-riched_disable_ns_category' => '"{{ns:Category}}" 이름 공간에서 리치 에디어 사용하지 않기',
22 -'tog-riched_disable_ns_category_talk' => '"{{ns:Category_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
23 -'rich_editor_new_window' => '새 창에 리치 에디터 열기',
24 -'tog-riched_start_disabled' => '리치 에디터를 끈 채로 시작하기',
25 -'tog-riched_use_popup' => '팝업 창에 리치 에디터 열기',
26 -'tog-riched_use_toggle' => '토글을 이용해 위키텍스트와 리치 에디터를 오가기 (텍스트영역을 리치 에디터로 대체하기)',
27 -'tog-riched_toggle_remember_state' => '마지막 토글 상태를 기억하기',
28 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.hsb.php
@@ -1,22 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 - 'textrichditor' => 'Rich editor',
6 - 'tog-riched_disable' => 'Rich editor deaktiwizować',
7 - 'tog-riched_disable_ns_main' => 'Rich editor znutřka hłowneho mjenoweho ruma deaktiwizować',
8 - 'tog-riched_disable_ns_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Talk}}" deaktiwizować',
9 - 'tog-riched_disable_ns_user' => 'Rich editor znutřka mjenoweho ruma "{{ns:User}}" deaktiwizować',
10 - 'tog-riched_disable_ns_user_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:User_talk}}" deaktiwizować',
11 - 'tog-riched_disable_ns_project' => 'Rich editor znutřka mjenoweho ruma "{{ns:Project}}" deaktiwizować',
12 - 'tog-riched_disable_ns_project_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Project_talk}}" deaktiwizować',
13 - 'tog-riched_disable_ns_image' => 'Rich editor znutřka mjenoweho ruma "{{ns:Image}}" deaktiwizować',
14 - 'tog-riched_disable_ns_image_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Image_talk}}" deaktiwizować',
15 - 'tog-riched_disable_ns_mediawiki' => 'Rich editor znutřka mjenoweho ruma "{{ns:MediaWiki}}" deaktiwizować',
16 - 'tog-riched_disable_ns_mediawiki_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:MediaWiki_talk}}" deaktiwizować',
17 - 'tog-riched_disable_ns_template' => 'Rich editor znutřka mjenoweho ruma "{{ns:Template}}" deaktiwizować',
18 - 'tog-riched_disable_ns_template_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Template_talk}}" deaktiwizować',
19 - 'tog-riched_disable_ns_help' => 'Rich editor znutřka mjenoweho ruma "{{ns:Help}}" deaktiwizować',
20 - 'tog-riched_disable_ns_help_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Help_talk}}" deaktiwizować',
21 - 'tog-riched_disable_ns_category' => 'Rich editor znutřka mjenoweho ruma the "{{ns:Category}}" deaktiwizować',
22 - 'tog-riched_disable_ns_category_talk' => 'Rich editor znutřka mjenoweho ruma the "{{ns:Category_talk}}" deaktiwizować',
23 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.sk.php
@@ -1,21 +0,0 @@
2 -<?php
3 -$messages = array(
4 - 'textrichditor' => 'Editor formátovaného textu',
5 - 'tog-riched_disable' => 'Vypnúť editor formátovaného textu',
6 - 'tog-riched_disable_ns_main' => 'Vypnúť editor formátovaného textu v hlavnom mennom priestore',
7 - 'tog-riched_disable_ns_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Talk}}“',
8 - 'tog-riched_disable_ns_user' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:User}}“',
9 - 'tog-riched_disable_ns_user_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:User_talk}}“',
10 - 'tog-riched_disable_ns_project' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Project}}“',
11 - 'tog-riched_disable_ns_project_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Project_talk}}“',
12 - 'tog-riched_disable_ns_image' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Image}}“',
13 - 'tog-riched_disable_ns_image_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Image_talk}}“',
14 - 'tog-riched_disable_ns_mediawiki' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:MediaWiki}}“',
15 - 'tog-riched_disable_ns_mediawiki_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:MediaWiki_talk}}“',
16 - 'tog-riched_disable_ns_template' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Template}}“',
17 - 'tog-riched_disable_ns_template_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Template_talk}}“',
18 - 'tog-riched_disable_ns_help' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Help}}“',
19 - 'tog-riched_disable_ns_help_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Help_talk}}“',
20 - 'tog-riched_disable_ns_category' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Category}}“',
21 - 'tog-riched_disable_ns_category_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Category_talk}}“',
22 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.fa.php
@@ -1,22 +0,0 @@
2 -<?php
3 -$messages = array(
4 -'textrichditor' => 'ويرايشگر پيشرفته',
5 -'tog-riched_disable' => 'غيرفعال کردن ويرايشگر پيشرفته',
6 -'tog-riched_disable_ns_main' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام اصلي',
7 -'tog-riched_disable_ns_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Talk}}"',
8 -'tog-riched_disable_ns_user' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:User}}"',
9 -'tog-riched_disable_ns_user_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:User_talk}}"',
10 -'tog-riched_disable_ns_project' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Project}}"',
11 -'tog-riched_disable_ns_project_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام
12 -"{{ns:Project_talk}}"',
13 -'tog-riched_disable_ns_image' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Image}}"',
14 -'tog-riched_disable_ns_image_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Image_talk}}"',
15 -'tog-riched_disable_ns_mediawiki' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:MediaWiki}}"',
16 -'tog-riched_disable_ns_mediawiki_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:MediaWiki_talk}}"',
17 -'tog-riched_disable_ns_template' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Template}}"',
18 -'tog-riched_disable_ns_template_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Template_talk}}"',
19 -'tog-riched_disable_ns_help' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Help}}"',
20 -'tog-riched_disable_ns_help_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Help_talk}}"',
21 -'tog-riched_disable_ns_category' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Category}}"',
22 -'tog-riched_disable_ns_category_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Category_talk}}"',
23 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.de.php
@@ -1,22 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 -'textrichditor' => 'Rich Editor',
6 -'tog-riched_disable' => 'Rich editor deaktivieren',
7 -'tog-riched_disable_ns_main' => 'Rich editor deaktivieren im Haupt-Namensraum',
8 -'tog-riched_disable_ns_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Talk}}" ',
9 -'tog-riched_disable_ns_user' => 'Rich editor deaktivieren im Namensraum "{{ns:User}}" ',
10 -'tog-riched_disable_ns_user_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:User_talk}}" ',
11 -'tog-riched_disable_ns_project' => 'Rich editor deaktivieren im Namensraum "{{ns:Project}}" ',
12 -'tog-riched_disable_ns_project_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Project_talk}}" ',
13 -'tog-riched_disable_ns_image' => 'Rich editor deaktivieren im Namensraum "{{ns:Image}}" ',
14 -'tog-riched_disable_ns_image_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Image_talk}}" ',
15 -'tog-riched_disable_ns_mediawiki' => 'Rich editor deaktivieren im Namensraum "{{ns:MediaWiki}}" ',
16 -'tog-riched_disable_ns_mediawiki_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:MediaWiki_talk}}" ',
17 -'tog-riched_disable_ns_template' => 'Rich editor deaktivieren im Namensraum "{{ns:Template}}" ',
18 -'tog-riched_disable_ns_template_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Template_talk}}" ',
19 -'tog-riched_disable_ns_help' => 'Rich editor deaktivieren im Namensraum "{{ns:Help}}" ',
20 -'tog-riched_disable_ns_help_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Help_talk}}" ',
21 -'tog-riched_disable_ns_category' => 'Rich editor deaktivieren im Namensraum "{{ns:Category}}" ',
22 -'tog-riched_disable_ns_category_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Category_talk}}" ',
23 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.sv.php
@@ -1,52 +0,0 @@
2 -<?php
3 -$messages = array(
4 - 'textrichditor' => 'Grafiskt läge',
5 - 'tog-riched_disable' => 'Inaktivera grafiskt läge',
6 - 'tog-riched_disable_ns_main' => 'Inaktivera grafiskt läge i huvudnamnrymden',
7 - 'tog-riched_disable_ns_talk' => 'Inaktivera grafiskt läge i "{{ns:Talk}}" namnrymden',
8 - 'tog-riched_disable_ns_user' => 'Inaktivera grafiskt läge i "{{ns:User}}" namnrymden',
9 - 'tog-riched_disable_ns_user_talk' => 'Inaktivera grafiskt läge i "{{ns:User_talk}}" namnrymden',
10 - 'tog-riched_disable_ns_project' => 'Inaktivera grafiskt läge i "{{ns:Project}}" namnrymden',
11 - 'tog-riched_disable_ns_project_talk' => 'Inaktivera grafiskt läge i "{{ns:Project_talk}}" namnrymden',
12 - 'tog-riched_disable_ns_image' => 'Inaktivera grafiskt läge i "{{ns:Image}}" namnrymden',
13 - 'tog-riched_disable_ns_image_talk' => 'Inaktivera grafiskt läge i "{{ns:Image_talk}}" namnrymden',
14 - 'tog-riched_disable_ns_mediawiki' => 'Inaktivera grafiskt läge i "{{ns:MediaWiki}}" namnrymden',
15 - 'tog-riched_disable_ns_mediawiki_talk' => 'Inaktivera grafiskt läge i "{{ns:MediaWiki_talk}}" namnrymden',
16 - 'tog-riched_disable_ns_template' => 'Inaktivera grafiskt läge i "{{ns:Template}}" namnrymden',
17 - 'tog-riched_disable_ns_template_talk' => 'Inaktivera grafiskt läge i "{{ns:Template_talk}}" namnrymden',
18 - 'tog-riched_disable_ns_help' => 'Inaktivera grafiskt läge i "{{ns:Help}}" namnrymden',
19 - 'tog-riched_disable_ns_help_talk' => 'Inaktivera grafiskt läge i "{{ns:Help_talk}}" namnrymden',
20 - 'tog-riched_disable_ns_category' => 'Inaktivera grafiskt läge i "{{ns:Category}}" namnrymden',
21 - 'tog-riched_disable_ns_category_talk' => 'Inaktivera grafiskt läge i "{{ns:Category_talk}}" namnrymden',
22 - 'rich_editor_new_window' => 'Öppna det grafiska läget i nytt fönster',
23 - 'tog-riched_start_disabled' => 'Starta det grafiska läget inaktiverat',
24 - 'tog-riched_use_popup' => 'Öppna det grafiska läget i ett popupfönster',
25 - 'tog-riched_use_toggle' => 'Använd växla mellan wikitext och det grafiska läget (byter textruta mot grafiskt läge)',
26 - 'tog-riched_toggle_remember_state' => 'Kom ihåg senaste val (i den grafiska editorn)',
27 -);
28 -<?php
29 -$messages = array(
30 - 'textrichditor' => 'Grafiskt läge',
31 - 'tog-riched_disable' => 'Inaktivera grafiskt läge',
32 - 'tog-riched_disable_ns_main' => 'Inaktivera grafiskt läge i huvudnamnrymden',
33 - 'tog-riched_disable_ns_talk' => 'Inaktivera grafiskt läge i "{{ns:Talk}}" namnrymden',
34 - 'tog-riched_disable_ns_user' => 'Inaktivera grafiskt läge i "{{ns:User}}" namnrymden',
35 - 'tog-riched_disable_ns_user_talk' => 'Inaktivera grafiskt läge i "{{ns:User_talk}}" namnrymden',
36 - 'tog-riched_disable_ns_project' => 'Inaktivera grafiskt läge i "{{ns:Project}}" namnrymden',
37 - 'tog-riched_disable_ns_project_talk' => 'Inaktivera grafiskt läge i "{{ns:Project_talk}}" namnrymden',
38 - 'tog-riched_disable_ns_image' => 'Inaktivera grafiskt läge i "{{ns:Image}}" namnrymden',
39 - 'tog-riched_disable_ns_image_talk' => 'Inaktivera grafiskt läge i "{{ns:Image_talk}}" namnrymden',
40 - 'tog-riched_disable_ns_mediawiki' => 'Inaktivera grafiskt läge i "{{ns:MediaWiki}}" namnrymden',
41 - 'tog-riched_disable_ns_mediawiki_talk' => 'Inaktivera grafiskt läge i "{{ns:MediaWiki_talk}}" namnrymden',
42 - 'tog-riched_disable_ns_template' => 'Inaktivera grafiskt läge i "{{ns:Template}}" namnrymden',
43 - 'tog-riched_disable_ns_template_talk' => 'Inaktivera grafiskt läge i "{{ns:Template_talk}}" namnrymden',
44 - 'tog-riched_disable_ns_help' => 'Inaktivera grafiskt läge i "{{ns:Help}}" namnrymden',
45 - 'tog-riched_disable_ns_help_talk' => 'Inaktivera grafiskt läge i "{{ns:Help_talk}}" namnrymden',
46 - 'tog-riched_disable_ns_category' => 'Inaktivera grafiskt läge i "{{ns:Category}}" namnrymden',
47 - 'tog-riched_disable_ns_category_talk' => 'Inaktivera grafiskt läge i "{{ns:Category_talk}}" namnrymden',
48 - 'rich_editor_new_window' => 'Öppna det grafiska läget i nytt fönster',
49 - 'tog-riched_start_disabled' => 'Starta det grafiska läget inaktiverat',
50 - 'tog-riched_use_popup' => 'Öppna det grafiska läget i ett popupfönster',
51 - 'tog-riched_use_toggle' => 'Använd växla mellan wikitext och det grafiska läget (byter textruta mot grafiskt läge)',
52 - 'tog-riched_toggle_remember_state' => 'Kom ihåg senaste val (i den grafiska editorn)',
53 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.he.php
@@ -1,26 +0,0 @@
2 -<?php
3 -$messages = array(
4 -'textrichditor' => 'עורך עשיר',
5 -'tog-riched_disable' => 'כבה את העורך העשיר',
6 -'tog-riched_disable_ns_main' => 'כבה את העורך העשיר במרחב השם הראשי',
7 -'tog-riched_disable_ns_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Talk}}"',
8 -'tog-riched_disable_ns_user' => 'כבה את העורך העשיר במרחב השם "{{ns:User}}"',
9 -'tog-riched_disable_ns_user_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:User_talk}}"',
10 -'tog-riched_disable_ns_project' => 'כבה את העורך העשיר במרחב השם "{{ns:Project}}"',
11 -'tog-riched_disable_ns_project_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Project_talk}}"',
12 -'tog-riched_disable_ns_image' => 'כבה את העורך העשיר במרחב השם "{{ns:Image}}"',
13 -'tog-riched_disable_ns_image_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Image_talk}}"',
14 -'tog-riched_disable_ns_mediawiki' => 'כבה את העורך העשיר במרחב השם "{{ns:MediaWiki}}"',
15 -'tog-riched_disable_ns_mediawiki_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:MediaWiki_talk}}"',
16 -'tog-riched_disable_ns_template' => 'כבה את העורך העשיר במרחב השם "{{ns:Template}}"',
17 -'tog-riched_disable_ns_template_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Template_talk}}"',
18 -'tog-riched_disable_ns_help' => 'כבה את העורך העשיר במרחב השם "{{ns:Help}}"',
19 -'tog-riched_disable_ns_help_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Help_talk}}"',
20 -'tog-riched_disable_ns_category' => 'כבה את העורך העשיר במרחב השם "{{ns:Category}}"',
21 -'tog-riched_disable_ns_category_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Category_talk}}"',
22 -'rich_editor_new_window' => 'פתח את העורך העשיר בחלון חדש',
23 -'tog-riched_start_disabled' => 'התחל עם העורך העשיר כבוי',
24 -'tog-riched_use_popup' => 'פתח את העורך העשיר בחלון קופץ',
25 -'tog-riched_use_toggle' => 'השתמש במתג כדי להחליף בין ויקיטקסט והעורך העשיר (החלף את אזור הטקסט עם העורך העשיר)',
26 -'tog-riched_toggle_remember_state' => 'זכור את מצב המתג האחרון',
27 -);
\ No newline at end of file
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.pms.php
@@ -1,22 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 - 'textrichditor' => 'Editor svicio',
6 - 'tog-riched_disable' => 'Disabilité l\'editor svicio',
7 - 'tog-riched_disable_ns_main' => 'Disabilité l\'editor svicio ant lë spassi nominal prinsipal',
8 - 'tog-riched_disable_ns_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Talk}}"',
9 - 'tog-riched_disable_ns_user' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:User}}"',
10 - 'tog-riched_disable_ns_user_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:User_talk}}"',
11 - 'tog-riched_disable_ns_project' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Project}}"',
12 - 'tog-riched_disable_ns_project_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Project_talk}}"',
13 - 'tog-riched_disable_ns_image' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Image}}"',
14 - 'tog-riched_disable_ns_image_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Image_talk}}"',
15 - 'tog-riched_disable_ns_mediawiki' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:MediaWiki}}"',
16 - 'tog-riched_disable_ns_mediawiki_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:MediaWiki_talk}}"',
17 - 'tog-riched_disable_ns_template' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Template}}"',
18 - 'tog-riched_disable_ns_template_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Template_talk}}"',
19 - 'tog-riched_disable_ns_help' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Help}}"',
20 - 'tog-riched_disable_ns_help_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Help_talk}}"',
21 - 'tog-riched_disable_ns_category' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Category}}"',
22 - 'tog-riched_disable_ns_category_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Category_talk}}"',
23 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.fr.php
@@ -1,27 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 - 'textrichditor' => '\'\'Rich Editor\'\'',
6 - 'tog-riched_disable' => 'Désactiver \'\'Rich Editor\'\'',
7 - 'tog-riched_disable_ns_main' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms principal.',
8 - 'tog-riched_disable_ns_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Talk}}\'\'.',
9 - 'tog-riched_disable_ns_user' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:User}}\'\'.',
10 - 'tog-riched_disable_ns_user_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:User_talk}}\'\'.',
11 - 'tog-riched_disable_ns_project' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Project}}\'\'.',
12 - 'tog-riched_disable_ns_project_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Project_talk}}\'\'.',
13 - 'tog-riched_disable_ns_image' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Image}}\'\'.',
14 - 'tog-riched_disable_ns_image_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Image_talk}}\'\'.',
15 - 'tog-riched_disable_ns_mediawiki' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:MediaWiki}}\'\'.',
16 - 'tog-riched_disable_ns_mediawiki_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:MediaWiki_talk}}\'\'.',
17 - 'tog-riched_disable_ns_template' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Template}}\'\'.',
18 - 'tog-riched_disable_ns_template_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Template_talk}}\'\'.',
19 - 'tog-riched_disable_ns_help' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Help}}\'\'.',
20 - 'tog-riched_disable_ns_help_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Help_talk}}\'\'.',
21 - 'tog-riched_disable_ns_category' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Category}}\'\'.',
22 - 'tog-riched_disable_ns_category_talk' => 'Désactiver \'\'Rich Editor\'\' dans l\'espace de noms \'\'{{ns:Category_talk}}\'\'.',
23 - 'rich_editor_new_window' => 'Ouvrir "Rich Editor" dans une nouvelle fenêtre',
24 - 'tog-riched_start_disabled' => 'Démarrer avec le "Rich Editor" désactive',
25 - 'tog-riched_use_popup' => 'Ouvrir "Rich Editor" dans une popup',
26 - 'tog-riched_use_toggle' => 'Donner la possibilité de changer entre l\'éditeur original WikiText et "Rich Editor"',
27 - 'tog-riched_toggle_remember_state' => 'Se souvenir de la dernière selection du éditeur',
28 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.nl.php
@@ -1,22 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 - 'textrichditor' => 'Uitgebreide editor',
6 - 'tog-riched_disable' => 'Uitgebreide editor uitschakelen',
7 - 'tog-riched_disable_ns_main' => 'Uitgebreide editor uitschakelen binnen de hoofdnaamruimte',
8 - 'tog-riched_disable_ns_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Talk}}"',
9 - 'tog-riched_disable_ns_user' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:User}}"',
10 - 'tog-riched_disable_ns_user_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:User_talk}}"',
11 - 'tog-riched_disable_ns_project' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Project}}"',
12 - 'tog-riched_disable_ns_project_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Project_talk}}"',
13 - 'tog-riched_disable_ns_image' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Image}}"',
14 - 'tog-riched_disable_ns_image_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Image_talk}}"',
15 - 'tog-riched_disable_ns_mediawiki' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:MediaWiki}}"',
16 - 'tog-riched_disable_ns_mediawiki_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:MediaWiki_talk}}"',
17 - 'tog-riched_disable_ns_template' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Template}}"',
18 - 'tog-riched_disable_ns_template_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Template_talk}}"',
19 - 'tog-riched_disable_ns_help' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Help}}"',
20 - 'tog-riched_disable_ns_help_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Help_talk}}"',
21 - 'tog-riched_disable_ns_category' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Category}}"',
22 - 'tog-riched_disable_ns_category_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Category_talk}}"',
23 -);
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.zh-tw.php
@@ -1,29 +0,0 @@
2 -<?php
3 -/** Taiwan Chinese (‪中文(台灣)‬)
4 - * @author Roc michael
5 - */
6 -$messages = array(
7 - 'textrichditor' => '視覺化編輯器(Rich Editor)',
8 - 'tog-riched_disable' => '停用視覺化編輯器(rich editor)',
9 - 'tog-riched_disable_ns_main' => '停用主名字空間的視覺化編輯器',
10 - 'tog-riched_disable_ns_talk' => '停用"{{ns:Talk}}"名字空間的視覺化編輯器',
11 - 'tog-riched_disable_ns_user' => '停用"{{ns:User}}"名字空間的視覺化編輯器',
12 - 'tog-riched_disable_ns_user_talk' => '停用"{{ns:User_talk}}"名字空間的視覺化編輯器',
13 - 'tog-riched_disable_ns_project' => '停用"{{ns:Project}}"名字空間的視覺化編輯器',
14 - 'tog-riched_disable_ns_project_talk' => '停用"{{ns:Project_talk}}"名字空間的視覺化編輯器',
15 - 'tog-riched_disable_ns_image' => '停用"{{ns:Image}}"名字空間的視覺化編輯器',
16 - 'tog-riched_disable_ns_image_talk' => '停用"{{ns:Image_talk}}"名字空間的視覺化編輯器',
17 - 'tog-riched_disable_ns_mediawiki' => '停用"{{ns:MediaWiki}}"名字空間的視覺化編輯器',
18 - 'tog-riched_disable_ns_mediawiki_talk' => '停用"{{ns:MediaWiki_talk}}"名字空間的視覺化編輯器',
19 - 'tog-riched_disable_ns_template' => '停用"{{ns:Template}}"名字空間的視覺化編輯器',
20 - 'tog-riched_disable_ns_template_talk' => '停用"{{ns:Template_talk}}"名字空間的視覺化編輯器',
21 - 'tog-riched_disable_ns_help' => '停用"{{ns:Help}}"名字空間的視覺化編輯器',
22 - 'tog-riched_disable_ns_help_talk' => '停用"{{ns:Help_talk}}"名字空間的視覺化編輯器',
23 - 'tog-riched_disable_ns_category' => '停用"{{ns:Category}}"名字空間的視覺化編輯器',
24 - 'tog-riched_disable_ns_category_talk' => '停用"{{ns:Category_talk}}"名字空間的視覺化編輯器',
25 - 'rich_editor_new_window' => '於新視窗內開啟視覺化編輯器(Rich Editor)',
26 - 'tog-riched_start_disabled' => '開始時先停用視覺化編輯器(rich editor)',
27 - 'tog-riched_use_popup' => '於彈出視窗(popup)中使用視覺化編輯器(Rich Editor)',
28 - 'tog-riched_use_toggle' => '在「維基文字」與「視覺化編輯器」之間以開關作切換(以視覺化編輯器取代文字編輯區)',
29 - 'tog-riched_toggle_remember_state' => '記住最後的切換設定',
30 -);
\ No newline at end of file
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.pl.php
@@ -1,27 +0,0 @@
2 -<?php
3 -
4 -$messages = array(
5 -'textrichditor' => 'Rich Editor',
6 -'rich_editor_new_window' => 'Otwórz rich editor w nowym oknie',
7 -'tog-riched_disable' => 'Wyłącz Rich Editora',
8 -'tog-riched_disable_ns_main' => 'Wyłącz Rich Editora wewątrz głównej przestrzeni nazw',
9 -'tog-riched_disable_ns_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Talk}}"',
10 -'tog-riched_disable_ns_user' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:User}}"',
11 -'tog-riched_disable_ns_user_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:User_talk}}"',
12 -'tog-riched_disable_ns_project' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Project}}"',
13 -'tog-riched_disable_ns_project_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Project_talk}}"',
14 -'tog-riched_disable_ns_image' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Image}}"',
15 -'tog-riched_disable_ns_image_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Image_talk}}"',
16 -'tog-riched_disable_ns_mediawiki' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:MediaWiki}}"',
17 -'tog-riched_disable_ns_mediawiki_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:MediaWiki_talk}}"',
18 -'tog-riched_disable_ns_template' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Template}}"',
19 -'tog-riched_disable_ns_template_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Template_talk}}"',
20 -'tog-riched_disable_ns_help' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Help}}"',
21 -'tog-riched_disable_ns_help_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Help_talk}}"',
22 -'tog-riched_disable_ns_category' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Category}}"',
23 -'tog-riched_disable_ns_category_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Category_talk}}"',
24 -'tog-riched_start_disabled' => 'Rich editor domyślnie wyłączony',
25 -'tog-riched_use_popup' => 'Pozwól otwierać Rich Editor w okienku popup',
26 -'tog-riched_use_toggle' => 'Pozwól otwierać Rich Editor na żądanie (zastąpi domyślne pole textarea)',
27 -'tog-riched_toggle_remember_state' => 'Zapamiętuj ostatni stan Rich Editora',
28 -);
Index: trunk/extensions/FCKeditor/FCKeditorParser.body.php
@@ -1,10 +1,9 @@
22 <?php
33
4 -class FCKeditorParser extends FCKeditorParserWrapper
5 -{
 4+class FCKeditorParser extends FCKeditorParserWrapper {
65 public static $fkc_mw_makeImage_options;
76 protected $fck_mw_strtr_span;
8 - protected $fck_mw_strtr_span_counter=1;
 7+ protected $fck_mw_strtr_span_counter = 1;
98 protected $fck_mw_taghook;
109 protected $fck_internal_parse_text;
1110 protected $fck_matches = array();
@@ -20,9 +19,9 @@
2120 '__TOC__',
2221 '__NOTC__',
2322 '__NOCC__',
24 - "__FORCETOC__",
25 - "__NEWSECTIONLINK__",
26 - "__NOGALLERY__",
 23+ '__FORCETOC__',
 24+ '__NEWSECTIONLINK__',
 25+ '__NOGALLERY__',
2726 );
2827
2928 /**
@@ -33,13 +32,12 @@
3433 * @param string $text
3534 * @return string
3635 */
37 - private function fck_addToStrtr($text, $replaceLineBreaks = true) {
38 - $key = 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw';
 36+ private function fck_addToStrtr( $text, $replaceLineBreaks = true ) {
 37+ $key = 'Fckmw' . $this->fck_mw_strtr_span_counter . 'fckmw';
3938 $this->fck_mw_strtr_span_counter++;
40 - if ($replaceLineBreaks) {
41 - $this->fck_mw_strtr_span[$key] = str_replace(array("\r\n", "\n", "\r"),"fckLR",$text);
42 - }
43 - else {
 39+ if( $replaceLineBreaks ) {
 40+ $this->fck_mw_strtr_span[$key] = str_replace( array( "\r\n", "\n", "\r" ), 'fckLR', $text );
 41+ } else {
4442 $this->fck_mw_strtr_span[$key] = $text;
4543 }
4644 return $key;
@@ -52,12 +50,12 @@
5351 * @return string the full name of the link
5452 * @private
5553 */
56 - function maybeDoSubpageLink($target, &$text) {
 54+ function maybeDoSubpageLink( $target, &$text ) {
5755 return $target;
5856 }
5957
6058 /**
61 - * DO NOT Replace special strings like "ISBN xxx" and "RFC xxx" with
 59+ * DO NOT replace special strings like "ISBN xxx" and "RFC xxx" with
6260 * magic external links.
6361 *
6462 * DML
@@ -68,70 +66,65 @@
6967 }
7068
7169 /**
72 - * Callback function for custom tags: feed, ref, references etc.
73 - *
74 - * @param string $str Input
75 - * @param array $argv Arguments
76 - * @return string
77 - */
 70+ * Callback function for custom tags: feed, ref, references etc.
 71+ *
 72+ * @param string $str Input
 73+ * @param array $argv Arguments
 74+ * @return string
 75+ */
7876 function fck_genericTagHook( $str, $argv, $parser ) {
79 - if (in_array($this->fck_mw_taghook, array("ref", "math", "references", "source"))) {
 77+ if( in_array( $this->fck_mw_taghook, array( 'ref', 'math', 'references', 'source' ) ) ) {
8078 $class = $this->fck_mw_taghook;
 79+ } else {
 80+ $class = 'special';
8181 }
82 - else {
83 - $class = "special";
84 - }
8582
86 - if (empty($argv)) {
87 - $ret = "<span class=\"fck_mw_".$class."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\">";
88 - }
89 - else {
90 - $ret = "<span class=\"fck_mw_".$class."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\"";
91 - foreach ($argv as $key=>$value) {
92 - $ret .= " ".$key."=\"".$value."\"";
 83+ if( empty( $argv ) ) {
 84+ $ret = '<span class="fck_mw_' . $class . '" _fck_mw_customtag="true" _fck_mw_tagname="' . $this->fck_mw_taghook . '">';
 85+ } else {
 86+ $ret = '<span class="fck_mw_' . $class . '" _fck_mw_customtag="true" _fck_mw_tagname="' . $this->fck_mw_taghook . '"';
 87+ foreach( $argv as $key => $value ) {
 88+ $ret .= " " . $key . "=\"" . $value . "\"";
9389 }
94 - $ret .=">";
 90+ $ret .= '>';
9591 }
96 - if (is_null($str)) {
97 - $ret = substr($ret, 0, -1) . " />";
 92+ if( is_null( $str ) ) {
 93+ $ret = substr( $ret, 0, -1 ) . ' />';
 94+ } else {
 95+ $ret .= htmlspecialchars( $str );
 96+ $ret .= '</span>';
9897 }
99 - else {
100 - $ret .= htmlspecialchars($str);
101 - $ret .= "</span>";
102 - }
10398
104 - $replacement = $this->fck_addToStrtr($ret);
 99+ $replacement = $this->fck_addToStrtr( $ret );
105100 return $replacement;
106101 }
107102
108103 /**
109 - * Callback function for wiki tags: nowiki, includeonly, noinclude
110 - *
111 - * @param string $tagName tag name, eg. nowiki, math
112 - * @param string $str Input
113 - * @param array $argv Arguments
114 - * @return string
115 - */
116 - function fck_wikiTag( $tagName, $str, $argv = array()) {
117 - if (empty($argv)) {
118 - $ret = "<span class=\"fck_mw_".$tagName."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$tagName."\">";
119 - }
120 - else {
121 - $ret = "<span class=\"fck_mw_".$tagName."\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$tagName."\"";
122 - foreach ($argv as $key=>$value) {
123 - $ret .= " ".$key."=\"".$value."\"";
 104+ * Callback function for wiki tags: nowiki, includeonly, noinclude
 105+ *
 106+ * @param string $tagName tag name, eg. nowiki, math
 107+ * @param string $str Input
 108+ * @param array $argv Arguments
 109+ * @return string
 110+ */
 111+ function fck_wikiTag( $tagName, $str, $argv = array() ) {
 112+ if( empty( $argv ) ) {
 113+ $ret = '<span class="fck_mw_' . $tagName . '" _fck_mw_customtag="true" _fck_mw_tagname="' . $tagName . '">';
 114+ } else {
 115+ $ret = '<span class="fck_mw_' . $tagName . '" _fck_mw_customtag="true" _fck_mw_tagname="' . $tagName . '"';
 116+ foreach( $argv as $key => $value ) {
 117+ $ret .= " " . $key . "=\"" . $value . "\"";
124118 }
125 - $ret .=">";
 119+ $ret .= '>';
126120 }
127 - if (is_null($str)) {
128 - $ret = substr($ret, 0, -1) . " />";
 121+ if( is_null( $str ) ) {
 122+ $ret = substr( $ret, 0, -1 ) . ' />';
 123+ } else {
 124+ $ret .= htmlspecialchars( $str );
 125+ $ret .= '</span>';
129126 }
130 - else {
131 - $ret .= htmlspecialchars($str);
132 - $ret .= "</span>";
133 - }
134127
135 - $replacement = $this->fck_addToStrtr($ret);
 128+ $replacement = $this->fck_addToStrtr( $ret );
136129
137130 return $replacement;
138131 }
@@ -153,11 +146,11 @@
154147 *
155148 * @private
156149 */
157 - function strip( $text, $state, $stripcomments = false , $dontstrip = array () ) {
 150+ function strip( $text, $state, $stripcomments = false, $dontstrip = array() ) {
158151 global $wgContLang, $wgUseTeX, $wgScriptPath, $wgVersion, $wgHooks, $wgExtensionFunctions;
159152
160153 wfProfileIn( __METHOD__ );
161 - $render = ($this->mOutputType == OT_HTML);
 154+ $render = ( $this->mOutputType == OT_HTML );
162155
163156 $uniq_prefix = $this->mUniqPrefix;
164157 $commentState = new ReplacementArray;
@@ -165,12 +158,12 @@
166159 $generalItems = array();
167160
168161 $elements = array_merge( array( 'nowiki', 'gallery', 'math' ), array_keys( $this->mTagHooks ) );
169 - if ( (isset($wgHooks['ParserFirstCallInit']) && in_array('efSyntaxHighlight_GeSHiSetup', $wgHooks['ParserFirstCallInit']))
170 - || (isset($wgExtensionFunctions) && in_array('efSyntaxHighlight_GeSHiSetup', $wgExtensionFunctions)) ) {
 162+ if ( ( isset( $wgHooks['ParserFirstCallInit']) && in_array( 'efSyntaxHighlight_GeSHiSetup', $wgHooks['ParserFirstCallInit'] ) )
 163+ || ( isset( $wgExtensionFunctions ) && in_array( 'efSyntaxHighlight_GeSHiSetup', $wgExtensionFunctions ) ) ) {
171164 $elements = array_merge( $elements, array( 'source' ) );
172165 }
173 - if ( (isset($wgHooks['ParserFirstCallInit']) && in_array('wfCite', $wgHooks['ParserFirstCallInit']))
174 - || (isset($wgExtensionFunctions) && in_array('wfCite', $wgExtensionFunctions)) ) {
 166+ if ( ( isset( $wgHooks['ParserFirstCallInit'] ) && in_array( 'wfCite', $wgHooks['ParserFirstCallInit'] ) )
 167+ || ( isset( $wgExtensionFunctions ) && in_array( 'wfCite', $wgExtensionFunctions ) ) ) {
175168 $elements = array_merge( $elements, array( 'ref', 'references' ) );
176169 }
177170 global $wgRawHtml;
@@ -179,17 +172,17 @@
180173 }
181174
182175 # Removing $dontstrip tags from $elements list (currently only 'gallery', fixing bug 2700)
183 - foreach ( $elements AS $k => $v ) {
184 - if ( !in_array ( $v , $dontstrip ) ) continue;
185 - unset ( $elements[$k] );
 176+ foreach( $elements as $k => $v ) {
 177+ if( !in_array( $v, $dontstrip ) )
 178+ continue;
 179+ unset( $elements[$k] );
186180 }
187181
188 - $elements = array_unique($elements);
 182+ $elements = array_unique( $elements );
189183 $matches = array();
190 - if (version_compare("1.12", $wgVersion, ">")) {
 184+ if( version_compare( "1.12", $wgVersion, ">" ) ) {
191185 $text = Parser::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix );
192 - }
193 - else {
 186+ } else {
194187 $text = self::extractTagsAndParams( $elements, $text, $matches, $uniq_prefix );
195188 }
196189
@@ -197,7 +190,7 @@
198191 list( $element, $content, $params, $tag ) = $data;
199192 if( $render ) {
200193 $tagName = strtolower( $element );
201 - wfProfileIn( __METHOD__."-render-$tagName" );
 194+ wfProfileIn( __METHOD__ . "-render-$tagName" );
202195 switch( $tagName ) {
203196 case '!--':
204197 // Comment
@@ -210,42 +203,42 @@
211204 }
212205 break;
213206 case 'references':
214 - $output = $this->fck_wikiTag('references', $content, $params);
 207+ $output = $this->fck_wikiTag( 'references', $content, $params );
215208 break;
216209 case 'ref':
217 - $output = $this->fck_wikiTag('ref', $content, $params);
 210+ $output = $this->fck_wikiTag( 'ref', $content, $params );
218211 break;
219212 case 'source':
220 - $output = $this->fck_wikiTag('source', $content, $params);
 213+ $output = $this->fck_wikiTag( 'source', $content, $params );
221214 break;
222215 case 'html':
223216 if( $wgRawHtml ) {
224 - $output = $this->fck_wikiTag('html', $content, $params);
 217+ $output = $this->fck_wikiTag( 'html', $content, $params );
225218 }
226219 break;
227220 case 'nowiki':
228 - $output = $this->fck_wikiTag('nowiki', $content, $params); //required by FCKeditor
 221+ $output = $this->fck_wikiTag( 'nowiki', $content, $params ); // required by FCKeditor
229222 break;
230223 case 'math':
231 - if($wgUseTeX){ //normal render
 224+ if( $wgUseTeX ){ //normal render
232225 $output = $wgContLang->armourMath( MathRenderer::renderMath( $content ) );
233 - }else //show fakeimage
 226+ } else // show fakeimage
234227 $output = '<img _fckfakelement="true" class="FCK__MWMath" _fck_mw_math="'.$content.'" src="'.$wgScriptPath.'/skins/common/images/button_math.png" />';
235228 break;
236229 case 'gallery':
237 - $output = $this->fck_wikiTag('gallery', $content, $params); //required by FCKeditor
 230+ $output = $this->fck_wikiTag( 'gallery', $content, $params ); // required by FCKeditor
238231 //$output = $this->renderImageGallery( $content, $params );
239232 break;
240233 default:
241234 if( isset( $this->mTagHooks[$tagName] ) ) {
242 - $this->fck_mw_taghook = $tagName; //required by FCKeditor
 235+ $this->fck_mw_taghook = $tagName; // required by FCKeditor
243236 $output = call_user_func_array( $this->mTagHooks[$tagName],
244237 array( $content, $params, $this ) );
245238 } else {
246239 throw new MWException( "Invalid call hook $element" );
247240 }
248241 }
249 - wfProfileOut( __METHOD__."-render-$tagName" );
 242+ wfProfileOut( __METHOD__ . "-render-$tagName" );
250243 } else {
251244 // Just stripping tags; keep the source
252245 $output = $tag;
@@ -282,7 +275,8 @@
283276 return $text;
284277 }
285278
286 - /** Replace HTML comments with unique text using fck_addToStrtr function
 279+ /**
 280+ * Replace HTML comments with unique text using fck_addToStrtr function
287281 *
288282 * @private
289283 * @param string $text
@@ -290,9 +284,9 @@
291285 */
292286 private function fck_replaceHTMLcomments( $text ) {
293287 wfProfileIn( __METHOD__ );
294 - while (($start = strpos($text, '<!--')) !== false) {
295 - $end = strpos($text, '-->', $start + 4);
296 - if ($end === false) {
 288+ while( ( $start = strpos( $text, '<!--' ) ) !== false ) {
 289+ $end = strpos( $text, '-->', $start + 4 );
 290+ if( $end === false ) {
297291 # Unterminated comment; bail out
298292 break;
299293 }
@@ -301,24 +295,23 @@
302296
303297 # Trim space and newline if the comment is both
304298 # preceded and followed by a newline
305 - $spaceStart = max($start - 1, 0);
 299+ $spaceStart = max( $start - 1, 0 );
306300 $spaceLen = $end - $spaceStart;
307 - while (substr($text, $spaceStart, 1) === ' ' && $spaceStart > 0) {
 301+ while( substr( $text, $spaceStart, 1 ) === ' ' && $spaceStart > 0 ) {
308302 $spaceStart--;
309303 $spaceLen++;
310304 }
311 - while (substr($text, $spaceStart + $spaceLen, 1) === ' ')
312 - $spaceLen++;
313 - if (substr($text, $spaceStart, 1) === "\n" and substr($text, $spaceStart + $spaceLen, 1) === "\n") {
 305+ while( substr( $text, $spaceStart + $spaceLen, 1 ) === ' ' )
 306+ $spaceLen++;
 307+ if( substr( $text, $spaceStart, 1 ) === "\n" and substr( $text, $spaceStart + $spaceLen, 1 ) === "\n" ) {
314308 # Remove the comment, leading and trailing
315309 # spaces, and leave only one newline.
316 - $replacement = $this->fck_addToStrtr(substr($text, $spaceStart, $spaceLen+1), false);
317 - $text = substr_replace($text, $replacement."\n", $spaceStart, $spaceLen + 1);
318 - }
319 - else {
 310+ $replacement = $this->fck_addToStrtr( substr( $text, $spaceStart, $spaceLen + 1 ), false );
 311+ $text = substr_replace( $text, $replacement . "\n", $spaceStart, $spaceLen + 1 );
 312+ } else {
320313 # Remove just the comment.
321 - $replacement = $this->fck_addToStrtr(substr($text, $start, $end - $start), false);
322 - $text = substr_replace($text, $replacement, $start, $end - $start);
 314+ $replacement = $this->fck_addToStrtr( substr( $text, $start, $end - $start ), false );
 315+ $text = substr_replace( $text, $replacement, $start, $end - $start );
323316 }
324317 }
325318 wfProfileOut( __METHOD__ );
@@ -327,17 +320,17 @@
328321 }
329322
330323 function replaceInternalLinks( $text ) {
331 - $text = preg_replace("/\[\[([^|\[\]]*?)\]\]/", "[[$1|RTENOTITLE]]", $text); //#2223: [[()]] => [[%1|RTENOTITLE]]
332 - $text = preg_replace("/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text); //change ':' => 'RTECOLON' in links
333 - $text = parent::replaceInternalLinks($text);
334 - $text = preg_replace("/\|RTENOTITLE\]\]/", "]]", $text); // remove unused RTENOTITLE
 324+ $text = preg_replace( "/\[\[([^|\[\]]*?)\]\]/", "[[$1|RTENOTITLE]]", $text ); // #2223: [[()]] => [[%1|RTENOTITLE]]
 325+ $text = preg_replace( "/\[\[:(.*?)\]\]/", "[[RTECOLON$1]]", $text ); // change ':' => 'RTECOLON' in links
 326+ $text = parent::replaceInternalLinks( $text );
 327+ $text = preg_replace( "/\|RTENOTITLE\]\]/", "]]", $text ); // remove unused RTENOTITLE
335328
336329 return $text;
337330 }
338331
339 - function makeImage( $nt, $options ) {
 332+ function makeImage( $nt, $options, $holders = false ) {
340333 FCKeditorParser::$fkc_mw_makeImage_options = $options;
341 - return parent::makeImage( $nt, $options );
 334+ return parent::makeImage( $nt, $options, $holders );
342335 }
343336
344337 /**
@@ -352,121 +345,124 @@
353346 */
354347 private function fck_replaceTemplates( $text ) {
355348
356 - $callback = array('{' =>
357 - array(
358 - 'end'=>'}',
359 - 'cb' => array(
360 - 2=>array('FCKeditorParser', 'fck_leaveTemplatesAlone'),
361 - 3=>array('FCKeditorParser', 'fck_leaveTemplatesAlone'),
362 - ),
363 - 'min' =>2,
364 - 'max' =>3,
365 - )
 349+ $callback = array(
 350+ '{' => array(
 351+ 'end'=>'}',
 352+ 'cb' => array(
 353+ 2 => array( 'FCKeditorParser', 'fck_leaveTemplatesAlone' ),
 354+ 3 => array( 'FCKeditorParser', 'fck_leaveTemplatesAlone' ),
 355+ ),
 356+ 'min' => 2,
 357+ 'max' => 3,
 358+ )
366359 );
367360
368 - $text = $this->replace_callback($text, $callback);
 361+ $text = $this->replace_callback( $text, $callback );
369362
370363 $tags = array();
371 - $offset=0;
 364+ $offset = 0;
372365 $textTmp = $text;
373 - while (false !== ($pos = strpos($textTmp, "<!--FCK_SKIP_START-->")))
374 - {
 366+ while( false !== ( $pos = strpos( $textTmp, '<!--FCK_SKIP_START-->' ) ) ){
375367 $tags[abs($pos + $offset)] = 1;
376 - $textTmp = substr($textTmp, $pos+21);
 368+ $textTmp = substr( $textTmp, $pos + 21 );
377369 $offset += $pos + 21;
378370 }
379371
380 - $offset=0;
 372+ $offset = 0;
381373 $textTmp = $text;
382 - while (false !== ($pos = strpos($textTmp, "<!--FCK_SKIP_END-->")))
383 - {
 374+ while( false !== ( $pos = strpos( $textTmp, '<!--FCK_SKIP_END-->' ) ) ){
384375 $tags[abs($pos + $offset)] = -1;
385 - $textTmp = substr($textTmp, $pos+19);
 376+ $textTmp = substr( $textTmp, $pos + 19 );
386377 $offset += $pos + 19;
387378 }
388379
389 - if (!empty($tags)) {
390 - ksort($tags);
 380+ if( !empty( $tags ) ) {
 381+ ksort( $tags );
391382
392 - $strtr = array("<!--FCK_SKIP_START-->" => "", "<!--FCK_SKIP_END-->" => "");
 383+ $strtr = array( '<!--FCK_SKIP_START-->' => '', '<!--FCK_SKIP_END-->' => '' );
393384
394 - $sum=0;
395 - $lastSum=0;
396 - $finalString = "";
397 - $stringToParse = "";
 385+ $sum = 0;
 386+ $lastSum = 0;
 387+ $finalString = '';
 388+ $stringToParse = '';
398389 $startingPos = 0;
399 - $inner = "";
 390+ $inner = '';
400391 $strtr_span = array();
401 - foreach ($tags as $pos=>$type) {
 392+ foreach( $tags as $pos=>$type) {
402393 $sum += $type;
403 - if (!$pos) {
 394+ if( !$pos ) {
404395 $opened = 0;
405396 $closed = 0;
 397+ } else {
 398+ $opened = substr_count( $text, '[', 0, $pos ); // count [
 399+ $closed = substr_count( $text, ']', 0, $pos ); // count ]
406400 }
407 - else {
408 - $opened = substr_count($text, '[', 0, $pos); //count [
409 - $closed = substr_count($text, ']', 0, $pos); //count ]
410 - }
411 - if ($sum == 1 && $lastSum == 0) {
412 - $stringToParse .= strtr(substr($text, $startingPos, $pos - $startingPos), $strtr);
 401+ if( $sum == 1 && $lastSum == 0 ) {
 402+ $stringToParse .= strtr( substr( $text, $startingPos, $pos - $startingPos ), $strtr );
413403 $startingPos = $pos;
414 - }
415 - else if ($sum == 0) {
416 - $stringToParse .= 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw';
417 - $inner = htmlspecialchars(strtr(substr($text, $startingPos, $pos - $startingPos + 19), $strtr));
418 - $this->fck_mw_strtr_span['href="Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw"'] = 'href="'.$inner.'"';
419 - if($opened <= $closed) { // {{template}} is NOT in [] or [[]]
420 - $this->fck_mw_strtr_span['Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw'] = '<span class="fck_mw_template">'.str_replace(array("\r\n", "\n", "\r"),"fckLR",$inner).'</span>';
421 - }else{
422 - $this->fck_mw_strtr_span['Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw'] = str_replace(array("\r\n", "\n", "\r"),"fckLR",$inner);
 404+ } else if( $sum == 0 ) {
 405+ $stringToParse .= 'Fckmw' . $this->fck_mw_strtr_span_counter . 'fckmw';
 406+ $inner = htmlspecialchars( strtr( substr( $text, $startingPos, $pos - $startingPos + 19 ), $strtr ) );
 407+ $this->fck_mw_strtr_span['href="Fckmw' . $this->fck_mw_strtr_span_counter . 'fckmw"'] = 'href="' . $inner . '"';
 408+ if( $opened <= $closed ) { // {{template}} is NOT in [] or [[]]
 409+ $this->fck_mw_strtr_span['Fckmw' . $this->fck_mw_strtr_span_counter . 'fckmw'] = '<span class="fck_mw_template">' . str_replace( array( "\r\n", "\n", "\r" ), 'fckLR', $inner ) . '</span>';
 410+ } else {
 411+ $this->fck_mw_strtr_span['Fckmw' . $this->fck_mw_strtr_span_counter . 'fckmw'] = str_replace( array( "\r\n", "\n", "\r" ), 'fckLR', $inner );
423412 }
424413 $startingPos = $pos + 19;
425414 $this->fck_mw_strtr_span_counter++;
426415 }
427416 $lastSum = $sum;
428417 }
429 - $stringToParse .= substr($text, $startingPos);
 418+ $stringToParse .= substr( $text, $startingPos );
430419 $text = &$stringToParse;
431420 }
432421
433422 return $text;
434423 }
435424
436 - function internalParse ( $text ) {
437 -
 425+ function internalParse( $text ) {
438426 $this->fck_internal_parse_text =& $text;
439427
440 - //these three tags should remain unchanged
441 - $text = StringUtils::delimiterReplaceCallback( '<includeonly>', '</includeonly>', array($this, 'fck_includeonly'), $text );
442 - $text = StringUtils::delimiterReplaceCallback( '<noinclude>', '</noinclude>', array($this, 'fck_noinclude'), $text );
443 - $text = StringUtils::delimiterReplaceCallback( '<onlyinclude>', '</onlyinclude>', array($this, 'fck_onlyinclude'), $text );
 428+ // these three tags should remain unchanged
 429+ $text = StringUtils::delimiterReplaceCallback( '<includeonly>', '</includeonly>', array( $this, 'fck_includeonly' ), $text );
 430+ $text = StringUtils::delimiterReplaceCallback( '<noinclude>', '</noinclude>', array( $this, 'fck_noinclude' ), $text );
 431+ $text = StringUtils::delimiterReplaceCallback( '<onlyinclude>', '</onlyinclude>', array( $this, 'fck_onlyinclude' ), $text );
444432
445 - //html comments shouldn't be stripped
 433+ // HTML comments shouldn't be stripped
446434 $text = $this->fck_replaceHTMLcomments( $text );
447 - //as well as templates
 435+ // as well as templates
448436 $text = $this->fck_replaceTemplates( $text );
449437
450 - $finalString = parent::internalParse($text);
 438+ $finalString = parent::internalParse( $text );
451439
452440 return $finalString;
453441 }
 442+
454443 function fck_includeonly( $matches ) {
455 - return $this->fck_wikiTag('includeonly', $matches[1]);
 444+ return $this->fck_wikiTag( 'includeonly', $matches[1] );
456445 }
 446+
457447 function fck_noinclude( $matches ) {
458 - return $this->fck_wikiTag('noinclude', $matches[1]);
 448+ return $this->fck_wikiTag( 'noinclude', $matches[1] );
459449 }
 450+
460451 function fck_onlyinclude( $matches ) {
461 - return $this->fck_wikiTag('onlyinclude', $matches[1]);
 452+ return $this->fck_wikiTag( 'onlyinclude', $matches[1] );
462453 }
 454+
463455 function fck_leaveTemplatesAlone( $matches ) {
464 - return "<!--FCK_SKIP_START-->".$matches['text']."<!--FCK_SKIP_END-->";
 456+ return '<!--FCK_SKIP_START-->' . $matches['text'] . '<!--FCK_SKIP_END-->';
465457 }
466 - function formatHeadings( $text, $isMain=true ) {
 458+
 459+ function formatHeadings( $text, $isMain = true ) {
467460 return $text;
468461 }
 462+
469463 function replaceFreeExternalLinks( $text ) { return $text; }
470 - function stripNoGallery(&$text) {}
 464+
 465+ function stripNoGallery( &$text ) {}
 466+
471467 function stripToc( $text ) {
472468 //$prefix = '<span class="fck_mw_magic">';
473469 //$suffix = '</span>';
@@ -474,7 +470,7 @@
475471 $suffix = '';
476472
477473 $strtr = array();
478 - foreach ($this->FCKeditorMagicWords as $word) {
 474+ foreach( $this->FCKeditorMagicWords as $word ) {
479475 $strtr[$word] = $prefix . $word . $suffix;
480476 }
481477
@@ -485,54 +481,53 @@
486482 return $text;
487483 }
488484
489 - function parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) {
490 - $text = preg_replace("/^#REDIRECT/", "<!--FCK_REDIRECT-->", $text);
491 - $parserOutput = parent::parse($text, $title, $options, $linestart , $clearState , $revid );
 485+ function parse( $text, Title $title, ParserOptions $options, $linestart = true, $clearState = true, $revid = null ) {
 486+ $text = preg_replace( "/^#REDIRECT/", '<!--FCK_REDIRECT-->', $text );
 487+ $parserOutput = parent::parse( $text, $title, $options, $linestart, $clearState, $revid );
492488
493489 $categories = $parserOutput->getCategories();
494 - if ($categories) {
495 - $appendString = "";
496 - foreach ($categories as $cat=>$val) {
 490+ if( $categories ) {
 491+ $appendString = '';
 492+ foreach( $categories as $cat => $val ) {
497493 $args = '';
498494 if( $val == 'RTENOTITLE' ){
499 - $args .= '_fcknotitle="true" ';
 495+ $args .= '_fcknotitle="true" ';
500496 $val = $cat;
501497 }
502 - if ($val != $title->mTextform) {
503 - $appendString .= "<a ".$args."href=\"Category:" . $cat ."\">" . $val ."</a> ";
 498+ if( $val != $title->mTextform ) {
 499+ $appendString .= '<a ' . $args . 'href="Category:' . $cat . '">' . $val . '</a> ';
 500+ } else {
 501+ $appendString .= '<a ' . $args . 'href="Category:' . $cat . '">Category:' . $cat . '</a> ';
504502 }
505 - else {
506 - $appendString .= "<a ".$args."href=\"Category:" . $cat ."\">Category:" . $cat ."</a> ";
507 - }
508503 }
509 - $parserOutput->setText($parserOutput->getText() . $appendString);
 504+ $parserOutput->setText( $parserOutput->getText() . $appendString );
510505 }
511506
512 - if (!empty($this->fck_mw_strtr_span)) {
 507+ if( !empty( $this->fck_mw_strtr_span ) ) {
513508 global $leaveRawTemplates;
514 - if (!empty($leaveRawTemplates)) {
515 - foreach ($leaveRawTemplates as $l) {
516 - $this->fck_mw_strtr_span[$l] = substr($this->fck_mw_strtr_span[$l], 30, -7);
 509+ if( !empty( $leaveRawTemplates ) ) {
 510+ foreach( $leaveRawTemplates as $l ) {
 511+ $this->fck_mw_strtr_span[$l] = substr( $this->fck_mw_strtr_span[$l], 30, -7 );
517512 }
518513 }
519 - $text = strtr($parserOutput->getText(), $this->fck_mw_strtr_span);
520 - $parserOutput->setText(strtr($text, $this->fck_mw_strtr_span));
 514+ $text = strtr( $parserOutput->getText(), $this->fck_mw_strtr_span );
 515+ $parserOutput->setText( strtr( $text, $this->fck_mw_strtr_span ) );
521516 }
522 - if (!empty($this->fck_matches)) {
523 - $text = $parserOutput->getText() ;
524 - foreach ($this->fck_matches as $key => $m) {
525 - $text = str_replace( $key, $m[3], $text);
 517+ if( !empty( $this->fck_matches ) ) {
 518+ $text = $parserOutput->getText();
 519+ foreach( $this->fck_matches as $key => $m ) {
 520+ $text = str_replace( $key, $m[3], $text );
526521 }
527 - $parserOutput->setText($text);
 522+ $parserOutput->setText( $text );
528523 }
529524
530 - if (!empty($parserOutput->mLanguageLinks)) {
531 - foreach ($parserOutput->mLanguageLinks as $l) {
532 - $parserOutput->setText($parserOutput->getText() . "\n" . "<a href=\"".$l."\">".$l."</a>") ;
 525+ if( !empty( $parserOutput->mLanguageLinks ) ) {
 526+ foreach( $parserOutput->mLanguageLinks as $l ) {
 527+ $parserOutput->setText( $parserOutput->getText() . "\n" . '<a href="' . $l . '">' . $l . '</a>' );
533528 }
534529 }
535530
536 - $parserOutput->setText(str_replace("<!--FCK_REDIRECT-->", "#REDIRECT", $parserOutput->getText()));
 531+ $parserOutput->setText( str_replace( '<!--FCK_REDIRECT-->', '#REDIRECT', $parserOutput->getText() ) );
537532
538533 return $parserOutput;
539534 }
@@ -544,13 +539,11 @@
545540 * @return string the lists rendered as HTML
546541 */
547542 function doBlockLevels( $text, $linestart ) {
548 - $fname = 'Parser::doBlockLevels';
549 - wfProfileIn( $fname );
 543+ wfProfileIn( __METHOD__ );
550544
551545 # Parsing through the text line by line. The main thing
552546 # happening here is handling of block-level elements p, pre,
553547 # and making lists from lines starting with * # : etc.
554 - #
555548 $textLines = explode( "\n", $text );
556549
557550 $lastPrefix = $output = '';
@@ -573,7 +566,7 @@
574567 # eh?
575568 $pref2 = str_replace( ';', ':', $pref );
576569 $t = substr( $oLine, $prefixLength );
577 - $this->mInPre = !empty($preOpenMatch);
 570+ $this->mInPre = !empty( $preOpenMatch );
578571 } else {
579572 # Don't interpret any other prefixes in preformatted text
580573 $prefixLength = 0;
@@ -593,7 +586,7 @@
594587 # So we check for : in the remainder text to split up the
595588 # title and definition, without b0rking links.
596589 $term = $t2 = '';
597 - if ($this->findColonNoLinks($t, $term, $t2) !== false) {
 590+ if( $this->findColonNoLinks( $t, $term, $t2 ) !== false ) {
598591 $t = $t2;
599592 $output .= $term . $this->nextItem( ':' );
600593 }
@@ -616,7 +609,7 @@
617610
618611 if ( ';' == $char ) {
619612 # FIXME: This is dupe of code above
620 - if ($this->findColonNoLinks($t, $term, $t2) !== false) {
 613+ if( $this->findColonNoLinks( $t, $term, $t2 ) !== false ) {
621614 $t = $t2;
622615 $output .= $term . $this->nextItem( ':' );
623616 }
@@ -626,13 +619,13 @@
627620 $lastPrefix = $pref2;
628621 }
629622 if( 0 == $prefixLength ) {
630 - wfProfileIn( "$fname-paragraph" );
 623+ wfProfileIn( __METHOD__ . '-paragraph' );
631624 # No prefix (not in list)--go to paragraph mode
632625 // XXX: use a stack for nestable elements like span, table and div
633 - $openmatch = preg_match('/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
 626+ $openmatch = preg_match( '/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
634627 $closematch = preg_match(
635628 '/(?:<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
636 - '<td|<th|<\\/?div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix.'-pre|<\\/li|<\\/ul|<\\/ol|<\\/?center)/iS', $t );
 629+ '<td|<th|<\\/?div|<hr|<\\/pre|<\\/p|' . $this->mUniqPrefix . '-pre|<\\/li|<\\/ul|<\\/ol|<\\/?center)/iS', $t );
637630 if ( $openmatch or $closematch ) {
638631 $paragraphStack = false;
639632 # TODO bug 5718: paragraph closed
@@ -646,19 +639,19 @@
647640 $inBlockElem = true;
648641 }
649642 } else if ( !$inBlockElem && !$this->mInPre ) {
650 - if ( ' ' == $t{0} and ( $this->mLastSection == 'pre' or trim($t) != '' ) ) {
 643+ if ( ' ' == $t{0} and ( $this->mLastSection == 'pre' or trim( $t ) != '' ) ) {
651644 // pre
652 - if ($this->mLastSection != 'pre') {
 645+ if( $this->mLastSection != 'pre' ) {
653646 $paragraphStack = false;
654 - $output .= $this->closeParagraph().'<pre class="_fck_mw_lspace">';
 647+ $output .= $this->closeParagraph() . '<pre class="_fck_mw_lspace">';
655648 $this->mLastSection = 'pre';
656649 }
657650 $t = substr( $t, 1 );
658651 } else {
659652 // paragraph
660 - if ( '' == trim($t) ) {
 653+ if ( '' == trim( $t ) ) {
661654 if ( $paragraphStack ) {
662 - $output .= $paragraphStack.'<br />';
 655+ $output .= $paragraphStack . '<br />';
663656 $paragraphStack = false;
664657 $this->mLastSection = 'p';
665658 } else {
@@ -682,14 +675,14 @@
683676 }
684677 }
685678 }
686 - wfProfileOut( "$fname-paragraph" );
 679+ wfProfileOut( __METHOD__ . '-paragraph' );
687680 }
688681 // somewhere above we forget to get out of pre block (bug 785)
689 - if($preCloseMatch && $this->mInPre) {
 682+ if( $preCloseMatch && $this->mInPre ) {
690683 $this->mInPre = false;
691684 }
692 - if ($paragraphStack === false) {
693 - $output .= $t."\n";
 685+ if( $paragraphStack === false ) {
 686+ $output .= $t . "\n";
694687 }
695688 }
696689 while ( $prefixLength ) {
@@ -701,7 +694,7 @@
702695 $this->mLastSection = '';
703696 }
704697
705 - wfProfileOut( $fname );
 698+ wfProfileOut( __METHOD__ );
706699 return $output;
707700 }
708701 }
Index: trunk/extensions/FCKeditor/FCKeditorParserWrapper.body.php
@@ -0,0 +1,213 @@
 2+<?php
 3+/**
 4+ * Used by MW 1.12+
 5+ */
 6+class FCKeditorParserWrapper extends Parser {
 7+ function __construct() {
 8+ global $wgParser;
 9+
 10+ parent::__construct();
 11+
 12+ $wgParser->firstCallInit();
 13+ foreach( $wgParser->getTags() as $h ) {
 14+ if( !in_array( $h, array( 'pre' ) ) ) {
 15+ $this->setHook( $h, array( $this, 'fck_genericTagHook' ) );
 16+ }
 17+ }
 18+ }
 19+
 20+ function replaceInternalLinks( $s ) {
 21+ return parent::replaceInternalLinks( $s );
 22+ }
 23+
 24+ function makeImage( $title, $options, $holders = false ) {
 25+ return parent::makeImage( $title, $options, $holders );
 26+ }
 27+
 28+ function internalParse( $text ) {
 29+ return parent::internalParse( $text );
 30+ }
 31+
 32+ function parse( $text, Title $title, ParserOptions $options, $linestart = true, $clearState = true, $revid = null ) {
 33+ return parent::parse( $text, $title, $options, $linestart, $clearState, $revid );
 34+ }
 35+
 36+ /**
 37+ * parse any parentheses in format ((title|part|part))
 38+ * and call callbacks to get a replacement text for any found piece
 39+ *
 40+ * @param string $text The text to parse
 41+ * @param array $callbacks rules in form:
 42+ * '{' => array( # opening parentheses
 43+ * 'end' => '}', # closing parentheses
 44+ * 'cb' => array(
 45+ * 2 => callback, # replacement callback to call if {{..}} is found
 46+ * 3 => callback # replacement callback to call if {{{..}}} is found
 47+ * )
 48+ * )
 49+ * 'min' => 2, # Minimum parenthesis count in cb
 50+ * 'max' => 3, # Maximum parenthesis count in cb
 51+ */
 52+ /*private*/ function replace_callback( $text, $callbacks ) {
 53+ wfProfileIn( __METHOD__ );
 54+ $openingBraceStack = array(); # this array will hold a stack of parentheses which are not closed yet
 55+ $lastOpeningBrace = -1; # last not closed parentheses
 56+
 57+ $validOpeningBraces = implode( '', array_keys( $callbacks ) );
 58+
 59+ $i = 0;
 60+ while ( $i < strlen( $text ) ) {
 61+ # Find next opening brace, closing brace or pipe
 62+ if ( $lastOpeningBrace == -1 ) {
 63+ $currentClosing = '';
 64+ $search = $validOpeningBraces;
 65+ } else {
 66+ $currentClosing = $openingBraceStack[$lastOpeningBrace]['braceEnd'];
 67+ $search = $validOpeningBraces . '|' . $currentClosing;
 68+ }
 69+ $rule = null;
 70+ $i += strcspn( $text, $search, $i );
 71+ if ( $i < strlen( $text ) ) {
 72+ if ( $text[$i] == '|' ) {
 73+ $found = 'pipe';
 74+ } elseif ( $text[$i] == $currentClosing ) {
 75+ $found = 'close';
 76+ } elseif ( isset( $callbacks[$text[$i]] ) ) {
 77+ $found = 'open';
 78+ $rule = $callbacks[$text[$i]];
 79+ } else {
 80+ # Some versions of PHP have a strcspn which stops on null characters
 81+ # Ignore and continue
 82+ ++$i;
 83+ continue;
 84+ }
 85+ } else {
 86+ # All done
 87+ break;
 88+ }
 89+
 90+ if ( $found == 'open' ) {
 91+ # found opening brace, let's add it to parentheses stack
 92+ $piece = array(
 93+ 'brace' => $text[$i],
 94+ 'braceEnd' => $rule['end'],
 95+ 'title' => '',
 96+ 'parts' => null
 97+ );
 98+
 99+ # count opening brace characters
 100+ $piece['count'] = strspn( $text, $piece['brace'], $i );
 101+ $piece['startAt'] = $piece['partStart'] = $i + $piece['count'];
 102+ $i += $piece['count'];
 103+
 104+ # we need to add to stack only if opening brace count is enough for one of the rules
 105+ if ( $piece['count'] >= $rule['min'] ) {
 106+ $lastOpeningBrace ++;
 107+ $openingBraceStack[$lastOpeningBrace] = $piece;
 108+ }
 109+ } elseif ( $found == 'close' ) {
 110+ # lets check if it is enough characters for closing brace
 111+ $maxCount = $openingBraceStack[$lastOpeningBrace]['count'];
 112+ $count = strspn( $text, $text[$i], $i, $maxCount );
 113+
 114+ # check for maximum matching characters (if there are 5 closing
 115+ # characters, we will probably need only 3 - depending on the rules)
 116+ $matchingCount = 0;
 117+ $matchingCallback = null;
 118+ $cbType = $callbacks[$openingBraceStack[$lastOpeningBrace]['brace']];
 119+ if ( $count > $cbType['max'] ) {
 120+ # The specified maximum exists in the callback array, unless the caller
 121+ # has made an error
 122+ $matchingCount = $cbType['max'];
 123+ } else {
 124+ # Count is less than the maximum
 125+ # Skip any gaps in the callback array to find the true largest match
 126+ # Need to use array_key_exists not isset because the callback can be null
 127+ $matchingCount = $count;
 128+ while ( $matchingCount > 0 && !array_key_exists( $matchingCount, $cbType['cb'] ) ) {
 129+ --$matchingCount;
 130+ }
 131+ }
 132+
 133+ if( $matchingCount <= 0 ) {
 134+ $i += $count;
 135+ continue;
 136+ }
 137+ $matchingCallback = $cbType['cb'][$matchingCount];
 138+
 139+ # let's set a title or last part (if '|' was found)
 140+ if( null === $openingBraceStack[$lastOpeningBrace]['parts'] ) {
 141+ $openingBraceStack[$lastOpeningBrace]['title'] =
 142+ substr($text, $openingBraceStack[$lastOpeningBrace]['partStart'],
 143+ $i - $openingBraceStack[$lastOpeningBrace]['partStart']);
 144+ } else {
 145+ $openingBraceStack[$lastOpeningBrace]['parts'][] =
 146+ substr($text, $openingBraceStack[$lastOpeningBrace]['partStart'],
 147+ $i - $openingBraceStack[$lastOpeningBrace]['partStart']);
 148+ }
 149+
 150+ $pieceStart = $openingBraceStack[$lastOpeningBrace]['startAt'] - $matchingCount;
 151+ $pieceEnd = $i + $matchingCount;
 152+
 153+ if( is_callable( $matchingCallback ) ) {
 154+ $cbArgs = array(
 155+ 'text' => substr( $text, $pieceStart, $pieceEnd - $pieceStart ),
 156+ 'title' => trim( $openingBraceStack[$lastOpeningBrace]['title'] ),
 157+ 'parts' => $openingBraceStack[$lastOpeningBrace]['parts'],
 158+ 'lineStart' => ( ( $pieceStart > 0 ) && ( $text[$pieceStart-1] == "\n" ) ),
 159+ );
 160+ # finally we can call a user callback and replace piece of text
 161+ $replaceWith = call_user_func( $matchingCallback, $cbArgs );
 162+ $text = substr( $text, 0, $pieceStart ) . $replaceWith . substr( $text, $pieceEnd );
 163+ $i = $pieceStart + strlen( $replaceWith );
 164+ } else {
 165+ # null value for callback means that parentheses should be parsed, but not replaced
 166+ $i += $matchingCount;
 167+ }
 168+
 169+ # reset last opening parentheses, but keep it in case there are unused characters
 170+ $piece = array(
 171+ 'brace' => $openingBraceStack[$lastOpeningBrace]['brace'],
 172+ 'braceEnd' => $openingBraceStack[$lastOpeningBrace]['braceEnd'],
 173+ 'count' => $openingBraceStack[$lastOpeningBrace]['count'],
 174+ 'title' => '',
 175+ 'parts' => null,
 176+ 'startAt' => $openingBraceStack[$lastOpeningBrace]['startAt']
 177+ );
 178+ $openingBraceStack[$lastOpeningBrace--] = null;
 179+
 180+ if( $matchingCount < $piece['count'] ) {
 181+ $piece['count'] -= $matchingCount;
 182+ $piece['startAt'] -= $matchingCount;
 183+ $piece['partStart'] = $piece['startAt'];
 184+ # do we still qualify for any callback with remaining count?
 185+ $currentCbList = $callbacks[$piece['brace']]['cb'];
 186+ while ( $piece['count'] ) {
 187+ if ( array_key_exists( $piece['count'], $currentCbList ) ) {
 188+ $lastOpeningBrace++;
 189+ $openingBraceStack[$lastOpeningBrace] = $piece;
 190+ break;
 191+ }
 192+ --$piece['count'];
 193+ }
 194+ }
 195+ } elseif ( $found == 'pipe' ) {
 196+ # let's set a title if it is a first separator, or next part otherwise
 197+ if( null === $openingBraceStack[$lastOpeningBrace]['parts'] ) {
 198+ $openingBraceStack[$lastOpeningBrace]['title'] =
 199+ substr($text, $openingBraceStack[$lastOpeningBrace]['partStart'],
 200+ $i - $openingBraceStack[$lastOpeningBrace]['partStart']);
 201+ $openingBraceStack[$lastOpeningBrace]['parts'] = array();
 202+ } else {
 203+ $openingBraceStack[$lastOpeningBrace]['parts'][] =
 204+ substr($text, $openingBraceStack[$lastOpeningBrace]['partStart'],
 205+ $i - $openingBraceStack[$lastOpeningBrace]['partStart']);
 206+ }
 207+ $openingBraceStack[$lastOpeningBrace]['partStart'] = ++$i;
 208+ }
 209+ }
 210+
 211+ wfProfileOut( __METHOD__ );
 212+ return $text;
 213+ }
 214+}
\ No newline at end of file
Property changes on: trunk/extensions/FCKeditor/FCKeditorParserWrapper.body.php
___________________________________________________________________
Added: svn:eol-style
1215 + native
Index: trunk/extensions/FCKeditor/fckeditor_config.js
@@ -4,7 +4,7 @@
55
66 // When using the modified image dialog you must set this variable. It must
77 // correspond to $wgScriptPath in LocalSettings.php.
8 -FCKConfig.mwScriptPath = '' ;
 8+FCKConfig.mwScriptPath = '';
99
1010 // Setup the editor toolbar.
1111 FCKConfig.ToolbarSets['Wiki'] = [
@@ -21,17 +21,18 @@
2222 ['Link','Unlink','Anchor'],
2323 // ['TextColor','BGColor'],
2424 ['FitWindow','-','About']
25 -] ;
 25+];
2626
2727 // Load the extension plugins.
28 -FCKConfig.PluginsPath = FCKConfig.EditorPath + '../plugins/' ;
29 -FCKConfig.Plugins.Add( 'mediawiki', 'en,he,pl') ;
 28+FCKConfig.PluginsPath = FCKConfig.EditorPath + '../plugins/';
 29+// Available translations
 30+FCKConfig.Plugins.Add( 'mediawiki', 'en,fi,he,ko,pl,sv,zh-tw' );
3031
31 -FCKConfig.ForcePasteAsPlainText = true ;
32 -FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre' ;
 32+FCKConfig.ForcePasteAsPlainText = true;
 33+FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre';
3334
34 -FCKConfig.AutoDetectLanguage = true ;
35 -FCKConfig.DefaultLanguage = 'en' ;
 35+FCKConfig.AutoDetectLanguage = true;
 36+FCKConfig.DefaultLanguage = 'en';
3637
3738 FCKConfig.WikiSignature = '--~~~~';
3839
@@ -123,4 +124,4 @@
124125 width: 66px; \
125126 height: 15px; \
126127 } \
127 -' ;
 128+';
Index: trunk/extensions/FCKeditor/README.txt
@@ -1,7 +1,6 @@
22 == Installation ==
33
4 -This integration is mainly done by a dedicated MediaWiki extension. But, to better integration with MediaWiki, some of its code had to be "hacked", detailed instruction may be found here:
5 -http://mediawiki.fckeditor.net/index.php/FCKeditor_integration_guide
 4+This integration is done by a dedicated MediaWiki extension. See http://www.mediawiki.org/wiki/Extension:FCKeditor_(Official) for details.
65
76 == About the project ==
87
@@ -15,7 +14,7 @@
1615
1716 == Integration status ==
1817
19 -We have created the first working prototype for this integration. It is still in the first stages, but shows the potential of it, and it�s actually fully usable. In any case, use it on production web sites at your own risk.
 18+We have created the first working prototype for this integration. It is still in the first stages, but shows the potential of it, and it’s actually fully usable. In any case, use it on production web sites at your own risk.
2019
2120 The following features are currently available:
2221 * Rich editing: instead of writing inside a plain text area, using Wikitext markup for the text * structure and formatting, you can use visual tools, which reflect the final output.
Index: trunk/extensions/FCKeditor/FCKeditor.body.php
@@ -3,7 +3,7 @@
44 * Options for FCKeditor
55 * [start with FCKeditor]
66 */
7 -define("RTE_VISIBLE", 1);
 7+define('RTE_VISIBLE', 1);
88 /**
99 * Options for FCKeditor
1010 * [show toggle link]
@@ -18,7 +18,7 @@
1919 class FCKeditor_MediaWiki {
2020 public $showFCKEditor;
2121 private $count = array();
22 - private $wgFCKBypassText = "";
 22+ private $wgFCKBypassText = '';
2323 private $debug = 0;
2424 private $excludedNamespaces;
2525 private $oldTextBox1;
@@ -41,94 +41,80 @@
4242 'riched_disable_ns_category_talk',
4343 );
4444
45 - static $messagesLoaded = false;
46 -
47 - function __call($m, $a) {
 45+ function __call( $m, $a ) {
4846 print "\n#### " . $m . "\n";
49 - if (!isset($this->count[$m])) {
 47+ if( !isset( $this->count[$m] ) ) {
5048 $this->count[$m] = 0;
5149 }
5250 $this->count[$m]++;
5351 return true;
5452 }
5553
56 - function onMonoBookTemplateToolboxEnd() {
57 - if ($this->debug) {
58 - print_r($this->count);
59 - }
60 - }
61 -
 54+ /**
 55+ * Gets the namespaces where FCKeditor should be disabled
 56+ * First check is done against user preferences, second is done against the global variable $wgFCKEditorExcludedNamespaces
 57+ */
6258 private function getExcludedNamespaces() {
63 - global $wgUser,$wgDefaultUserOptions, $wgFCKEditorExcludedNamespaces;
 59+ global $wgUser, $wgDefaultUserOptions, $wgFCKEditorExcludedNamespaces;
6460
65 - if ( is_null( $this->excludedNamespaces ) ) {
 61+ if( is_null( $this->excludedNamespaces ) ) {
6662 $this->excludedNamespaces = array();
67 - foreach ( self::$nsToggles as $toggle ) {
68 - $default = isset($wgDefaultUserOptions[$toggle]) ? $wgDefaultUserOptions[$toggle] : "";
69 - if ( $wgUser->getOption( $toggle, $default) ) {
70 - $this->excludedNamespaces[] = constant(strtoupper(str_replace("riched_disable_", "", $toggle)));
 63+ foreach( self::$nsToggles as $toggle ) {
 64+ $default = isset( $wgDefaultUserOptions[$toggle] ) ? $wgDefaultUserOptions[$toggle] : '';
 65+ if( $wgUser->getOption( $toggle, $default ) ) {
 66+ $this->excludedNamespaces[] = constant( strtoupper( str_replace( 'riched_disable_', '', $toggle ) ) );
7167 }
7268 }
7369 /*
7470 If this site's LocalSettings.php defines Namespaces that shouldn't use the FCKEditor (in the #wgFCKexcludedNamespaces array), those excluded
7571 namespaces should be combined with those excluded in the user's preferences.
7672 */
77 - if (!empty($wgFCKEditorExcludedNamespaces) && is_array($wgFCKEditorExcludedNamespaces)) {
78 - $this->excludedNamespaces = array_merge($wgFCKEditorExcludedNamespaces, $this->excludedNamespaces);
 73+ if( !empty( $wgFCKEditorExcludedNamespaces ) && is_array( $wgFCKEditorExcludedNamespaces ) ) {
 74+ $this->excludedNamespaces = array_merge( $wgFCKEditorExcludedNamespaces, $this->excludedNamespaces );
7975 }
8076 }
8177
8278 return $this->excludedNamespaces;
8379 }
8480
85 - public function onLanguageGetMagic(&$magicWords, $langCode) {
 81+ public static function onLanguageGetMagic( &$magicWords, $langCode ) {
8682 $magicWords['NORICHEDITOR'] = array( 0, '__NORICHEDITOR__' );
8783
8884 return true;
8985 }
9086
91 - public function onParserBeforeInternalParse(&$parser, &$text, &$strip_state) {
 87+ public static function onParserBeforeInternalParse( &$parser, &$text, &$strip_state ) {
9288 MagicWord::get( 'NORICHEDITOR' )->matchAndRemove( $text );
9389
9490 return true;
9591 }
9692
97 - public function onEditPageShowEditFormFields($pageEditor, $wgOut) {
98 - global $wgUser, $wgFCKEditorIsCompatible, $wgTitle, $wgVersion;
 93+ public function onEditPageShowEditFormFields( $pageEditor, $wgOut ) {
 94+ global $wgUser, $wgFCKEditorIsCompatible, $wgTitle;
9995
10096 /*
10197 If FCKeditor extension is enabled, BUT it shouldn't appear (because it's disabled by user, we have incompatible browser etc.)
10298 We must do this trick to show the original text as WikiText instead of HTML when conflict occurs
10399 */
104 - if ( (!$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' ) || !$wgFCKEditorIsCompatible) ||
105 - in_array($wgTitle->getNamespace(), $this->getExcludedNamespaces()) || !($this->showFCKEditor & RTE_VISIBLE) ||
106 - false !== strpos($pageEditor->textbox1, "__NORICHEDITOR__")
 100+ if ( ( !$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' ) || !$wgFCKEditorIsCompatible ) ||
 101+ in_array( $wgTitle->getNamespace(), $this->getExcludedNamespaces() ) || !( $this->showFCKEditor & RTE_VISIBLE ) ||
 102+ false !== strpos( $pageEditor->textbox1, '__NORICHEDITOR__' )
107103 ) {
108 - if ($pageEditor->isConflict) {
 104+ if( $pageEditor->isConflict ) {
109105 $pageEditor->textbox1 = $pageEditor->getWikiContent();
110106 }
111107 }
112 - /*
113 - If FCKeditor extension is enabled, and it should appear
114 - We must do this trick to show HTML instead of the original text when conflict occurs
115 - This hack is only needed for MW 1.11 and below
116 - */
117 - else if (version_compare("1.12", $wgVersion, ">")) {
118 - if ($pageEditor->isConflict) {
119 - $options = new FCKeditorParserOptions();
120 - $options->setTidy(true);
121 - $parser = new FCKeditorParser();
122 - $parser->setOutputType(OT_HTML);
123 - $pa = $parser->parse($pageEditor->textbox1, $pageEditor->mTitle, $options);
124 - $pageEditor->textbox1 = $pa->mText;
125 - }
126 - }
127108
128109 return true;
129110 }
130111
131 - public function onEditPageBeforeConflictDiff($pageEditor, $wgOut) {
132 - global $fckPageEditor, $wgRequest;
 112+ /**
 113+ * @param $pageEditor EditPage instance
 114+ * @param $out OutputPage instance
 115+ * @return true
 116+ */
 117+ public static function onEditPageBeforeConflictDiff( $pageEditor, $out ) {
 118+ global $wgRequest;
133119
134120 /*
135121 Show WikiText instead of HTML when there is a conflict
@@ -140,79 +126,36 @@
141127 return true;
142128 }
143129
144 - public function onParserBeforeStrip(&$parser, &$text, &$stripState) {
 130+ public static function onParserBeforeStrip( &$parser, &$text, &$stripState ) {
145131 $text = $parser->strip( $text, $stripState );
146132 return true;
147133 }
148134
149 - public function onSanitizerAfterFixTagAttributes($text, $element, &$attribs) {
150 - $text = preg_match_all("/Fckmw\d+fckmw/", $text, $matches);
 135+ public static function onSanitizerAfterFixTagAttributes( $text, $element, &$attribs ) {
 136+ $text = preg_match_all( "/Fckmw\d+fckmw/", $text, $matches );
151137
152 - if (!empty($matches[0][0])) {
 138+ if( !empty( $matches[0][0] ) ) {
153139 global $leaveRawTemplates;
154 - if (!isset($leaveRawTemplates)) {
 140+ if( !isset( $leaveRawTemplates ) ) {
155141 $leaveRawTemplates = array();
156142 }
157 - $leaveRawTemplates = array_merge($leaveRawTemplates, $matches[0]);
158 - $attribs = array_merge($attribs, $matches[0]);
 143+ $leaveRawTemplates = array_merge( $leaveRawTemplates, $matches[0] );
 144+ $attribs = array_merge( $attribs, $matches[0] );
159145 }
160146
161147 return true;
162148 }
163149
164 - public function registerHooks() {
165 - global $wgHooks, $wgExtensionFunctions, $wgVersion;
166 -
167 - $wgHooks['UserToggles'][] = array($this, 'onUserToggles');
168 - $wgHooks['MessagesPreLoad'][] = array($this, 'onMessagesPreLoad');
169 - $wgHooks['ParserAfterTidy'][] = array($this, 'onParserAfterTidy');
170 - $wgHooks['EditPage::showEditForm:initial'][] = array($this, 'onEditPageShowEditFormInitial');
171 - $wgHooks['EditPage::showEditForm:fields'][] = array($this, 'onEditPageShowEditFormFields');
172 - $wgHooks['EditPageBeforePreviewText'][] = array($this, 'onEditPageBeforePreviewText');
173 - if (version_compare("1.14alpha", $wgVersion, "<=")) {
174 - $wgHooks['ParserBeforeStrip'][] = array($this, 'onParserBeforeStrip');
175 - }
176 - $wgHooks['EditPagePreviewTextEnd'][] = array($this, 'onEditPagePreviewTextEnd');
177 - $wgHooks['CustomEditor'][] = array($this, 'onCustomEditor');
178 - $wgHooks['LanguageGetMagic'][] = array($this, "onLanguageGetMagic");
179 - $wgHooks['ParserBeforeInternalParse'][] = array($this, "onParserBeforeInternalParse");
180 - $wgHooks['EditPageBeforeConflictDiff'][] = array($this, 'onEditPageBeforeConflictDiff');
181 - $wgHooks['SanitizerAfterFixTagAttributes'][] = array($this, 'onSanitizerAfterFixTagAttributes');
182 -
183 - if ($this->debug) {
184 - /*
185 - This is just an array of all available hooks, useful for debugging and learning
186 - Add here all new hooks
187 - */
188 - $opcje = array('ArticleSave',
189 - 'ArticleInsertComplete', 'ArticleSaveComplete', 'TitleMoveComplete', 'ArticleProtect', 'ArticleProtectComplete', 'ArticleDelete', 'ArticleDeleteComplete', 'AlternateEdit', 'ArticleFromTitle', 'ArticleAfterFetchContent',
190 - 'ArticlePageDataBefore', 'ArticlePageDataAfter', 'ParserBeforeStrip', 'ParserAfterStrip', 'ParserBeforeInternalParse', 'InternalParseBeforeLinks', 'ParserBeforeTidy', 'ParserAfterTidy', 'ParserClearState', 'ParserGetVariableValueSwitch',
191 - 'ParserGetVariableValueTs', 'ParserGetVariableValueVarCache', 'OutputPageBeforeHTML', 'OutputPageParserOutput', 'CategoryPageView', 'PageRenderingHash', 'ArticleViewHeader', 'ArticleViewRedirect', 'editSectionLinkForOther', 'editSectionLink',
192 - 'AutoAuthenticate', 'UserLoginComplete', 'UserLogout', 'UserLogoutComplete', 'userCan', 'WatchArticle', 'WatchArticleComplete', 'UnwatchArticle', 'UnwatchArticleComplete', 'MarkPatrolled',
193 - 'MarkPatrolledComplete', 'EmailUser', 'EmailUserComplete', 'UploadVerification', 'UploadComplete', 'SpecialMovepageAfterMove', 'SpecialSearchNogomatch', 'ArticleEditUpdateNewTalk', 'UserRetrieveNewTalks', 'UserClearNewTalkNotification',
194 - 'ArticlePurge', 'SpecialPageGetRedirect', 'SpecialPageExecuteBeforeHeader', 'SpecialPageExecuteBeforePage', 'SpecialPageExecuteAfterPage', 'SpecialVersionExtensionTypes', 'SpecialPage_initList', 'UploadForm:initial', 'UploadForm:BeforeProcessing', 'AddNewAccount',
195 - 'AbortNewAccount', 'BlockIp', 'BlockIpComplete', 'UserRights', 'GetBlockedStatus', 'LogPageActionText', 'LogPageLogHeader', 'LogPageLogName', 'LogPageValidTypes', 'BeforePageDisplay',
196 - 'MonoBookTemplateToolboxEnd', 'PersonalUrls', 'SkinTemplateContentActions', 'SkinTemplateTabs', 'SkinTemplatePreventOtherActiveTabs', 'SkinTemplateSetupPageCss', 'SkinTemplateBuildContentActionUrlsAfterSpecialPage', 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink', 'UserCreateForm', 'UserLoginForm',
197 - 'ArticleEditUpdatesDeleteFromRecentchanges', 'EditFilter', 'EditPage::showEditForm:initial', 'GetInternalURL', 'GetLocalURL', 'GetFullURL', 'LanguageGetMagic', 'MagicWordMagicWords', 'MagicWordwgVariableIDs', 'MessagesPreLoad',
198 - 'ParserTestParser', 'SpecialContributionsBeforeMainOutput', 'UnknownAction', 'wgQueryPages', 'DisplayOldSubtitle', 'LoadAllMessages', 'RecentChange_save', 'UserToggles', 'BadImage', 'DiffViewHeader',
199 - 'EditFormPreloadText', 'EmailConfirmed', 'FetchChangesList', 'MathAfterTexvc', 'SiteNoticeAfter', 'SiteNoticeBefore');
200 -
201 - foreach ($opcje as $o) {
202 - $wgHooks[$o][] = array($this, str_replace(":", "_", $o));
203 - }
204 - }
205 - }
206 -
207 - public function onCustomEditor(&$article, &$user) {
 150+ public function onCustomEditor( &$article, &$user ) {
208151 global $wgRequest, $mediaWiki;
209152
210 - $action = $mediaWiki->getVal('Action');
 153+ $action = $mediaWiki->getVal( 'Action' );
211154
212155 $internal = $wgRequest->getVal( 'internaledit' );
213156 $external = $wgRequest->getVal( 'externaledit' );
214157 $section = $wgRequest->getVal( 'section' );
215158 $oldid = $wgRequest->getVal( 'oldid' );
216 - if( !$mediaWiki->getVal( 'UseExternalEditor' ) || $action=='submit' || $internal ||
 159+ if( !$mediaWiki->getVal( 'UseExternalEditor' ) || $action == 'submit' || $internal ||
217160 $section || $oldid || ( !$user->getOption( 'externaleditor' ) && !$external ) ) {
218161 $editor = new FCKeditorEditPage( $article );
219162 $editor->submit();
@@ -225,10 +168,10 @@
226169 return false;
227170 }
228171
229 - public function onEditPageBeforePreviewText(&$editPage, $previewOnOpen) {
 172+ public function onEditPageBeforePreviewText( &$editPage, $previewOnOpen ) {
230173 global $wgUser, $wgRequest;
231174
232 - if ($wgUser->getOption( 'showtoolbar' ) && !$wgUser->getOption( 'riched_disable' ) && !$previewOnOpen ) {
 175+ if( $wgUser->getOption( 'showtoolbar' ) && !$wgUser->getOption( 'riched_disable' ) && !$previewOnOpen ) {
233176 $this->oldTextBox1 = $editPage->textbox1;
234177 $editPage->importFormData( $wgRequest );
235178 }
@@ -236,52 +179,113 @@
237180 return true;
238181 }
239182
240 - public function onEditPagePreviewTextEnd(&$editPage, $previewOnOpen) {
 183+ public function onEditPagePreviewTextEnd( &$editPage, $previewOnOpen ) {
241184 global $wgUser;
242185
243 - if ($wgUser->getOption( 'showtoolbar' ) && !$wgUser->getOption( 'riched_disable' ) && !$previewOnOpen ) {
 186+ if( $wgUser->getOption( 'showtoolbar' ) && !$wgUser->getOption( 'riched_disable' ) && !$previewOnOpen ) {
244187 $editPage->textbox1 = $this->oldTextBox1;
245188 }
246189
247190 return true;
248191 }
249192
250 - public function onParserAfterTidy(&$parser, &$text) {
 193+ public function onParserAfterTidy( &$parser, &$text ) {
251194 global $wgUseTeX, $wgUser, $wgTitle, $wgFCKEditorIsCompatible;
252195
253 - if (!$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' ) || !$wgFCKEditorIsCompatible) {
 196+ # Don't initialize for users that have chosen to disable the toolbar, rich editor or that do not have a FCKeditor-compatible browser
 197+ if( !$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' ) || !$wgFCKEditorIsCompatible ) {
254198 return true;
255199 }
256200
257 - if (is_object($wgTitle) && in_array($wgTitle->getNamespace(), $this->getExcludedNamespaces())) {
 201+ # Are we editing a page that's in an excluded namespace? If so, bail out.
 202+ if( is_object( $wgTitle ) && in_array( $wgTitle->getNamespace(), $this->getExcludedNamespaces() ) ) {
258203 return true;
259204 }
260205
261 - if ($wgUseTeX) {
262 - //it may add much overload on page with huge amount of math content...
263 - $text = preg_replace('/<img class="tex" alt="([^"]*)"/m', '<img _fckfakelement="true" _fck_mw_math="$1"', $text);
264 - $text = preg_replace("/<img class='tex' src=\"([^\"]*)\" alt=\"([^\"]*)\"/m", '<img src="$1" _fckfakelement="true" _fck_mw_math="$2"', $text);
 206+ if( $wgUseTeX ) {
 207+ // it may add much overload on page with huge amount of math content...
 208+ $text = preg_replace( '/<img class="tex" alt="([^"]*)"/m', '<img _fckfakelement="true" _fck_mw_math="$1"', $text );
 209+ $text = preg_replace( "/<img class='tex' src=\"([^\"]*)\" alt=\"([^\"]*)\"/m", '<img src="$1" _fckfakelement="true" _fck_mw_math="$2"', $text );
265210 }
266211
267212 return true;
268213 }
269214
270 - public function onMessagesPreLoad() {
271 - global $wgMessageCache, $wgUser, $wgContLanguageCode;
 215+ /**
 216+ * Adds some new JS global variables
 217+ * @param $vars Array: array of JS global variables
 218+ * @return true
 219+ */
 220+ public static function onMakeGlobalVariablesScript( $vars ){
 221+ global $wgFCKEditorDir, $wgFCKEditorExtDir, $wgFCKEditorToolbarSet, $wgFCKEditorHeight;
272222
273 - if ( !self::$messagesLoaded ) {
274 - $lang = $wgUser->getOption( 'language', $wgContLanguageCode );
275 - $i18nfile = dirname( __FILE__ ) . DIRECTORY_SEPARATOR .'FCKeditor.i18n.' . $lang . '.php';
 223+ $vars['wgFCKEditorDir'] = $wgFCKEditorDir;
 224+ $vars['wgFCKEditorExtDir'] = $wgFCKEditorExtDir;
 225+ $vars['wgFCKEditorToolbarSet'] = $wgFCKEditorToolbarSet;
 226+ $vars['wgFCKEditorHeight'] = $wgFCKEditorHeight;
276227
277 - if ( file_exists( $i18nfile ) ) {
278 - require( $i18nfile );
279 - } else {
280 - $lang = 'en';
281 - require( dirname( __FILE__ ) . DIRECTORY_SEPARATOR .'FCKeditor.i18n.en.php' );
282 - }
 228+ return true;
 229+ }
283230
284 - $wgMessageCache->addMessages( $messages, $lang );
285 - self::$messagesLoaded = true;
 231+ /**
 232+ * Adds new toggles into Special:Preferences
 233+ * @param $user User object
 234+ * @param $preferences Preferences object
 235+ * @return true
 236+ */
 237+ public static function onGetPreferences( $user, &$preferences ){
 238+ global $wgDefaultUserOptions;
 239+ wfLoadExtensionMessages( 'FCKeditor' );
 240+
 241+ $preferences['riched_disable'] = array(
 242+ 'type' => 'toggle',
 243+ 'section' => 'editing',
 244+ 'label-message' => 'tog-riched_disable',
 245+ );
 246+
 247+ $preferences['riched_start_disabled'] = array(
 248+ 'type' => 'toggle',
 249+ 'section' => 'editing',
 250+ 'label-message' => 'tog-riched_start_disabled',
 251+ );
 252+
 253+ $preferences['riched_use_popup'] = array(
 254+ 'type' => 'toggle',
 255+ 'section' => 'editing',
 256+ 'label-message' => 'tog-riched_use_popup',
 257+ );
 258+
 259+ $preferences['riched_use_toggle'] = array(
 260+ 'type' => 'toggle',
 261+ 'section' => 'editing',
 262+ 'label-message' => 'tog-riched_use_toggle',
 263+ );
 264+
 265+ $preferences['riched_toggle_remember_state'] = array(
 266+ 'type' => 'toggle',
 267+ 'section' => 'editing',
 268+ 'label-message' => 'tog-riched_toggle_remember_state',
 269+ );
 270+
 271+ // Show default options in Special:Preferences
 272+ if( !array_key_exists( 'riched_disable', $user->mOptions ) && !empty( $wgDefaultUserOptions['riched_disable'] ) )
 273+ $user->setOption( 'riched_disable', $wgDefaultUserOptions['riched_disable'] );
 274+ if( !array_key_exists( 'riched_start_disabled', $user->mOptions ) && !empty( $wgDefaultUserOptions['riched_start_disabled'] ) )
 275+ $user->setOption( 'riched_start_disabled', $wgDefaultUserOptions['riched_start_disabled'] );
 276+ if( !array_key_exists( 'riched_use_popup', $user->mOptions ) && !empty( $wgDefaultUserOptions['riched_use_popup'] ) )
 277+ $user->setOption( 'riched_use_popup', $wgDefaultUserOptions['riched_use_popup'] );
 278+ if( !array_key_exists( 'riched_use_toggle', $user->mOptions ) && !empty( $wgDefaultUserOptions['riched_use_toggle'] ) )
 279+ $user->setOption( 'riched_use_toggle', $wgDefaultUserOptions['riched_use_toggle'] );
 280+ if( !array_key_exists( 'riched_toggle_remember_state', $user->mOptions ) && !empty( $wgDefaultUserOptions['riched_toggle_remember_state'] ) )
 281+ $user->setOption( 'riched_toggle_remember_state', $wgDefaultUserOptions['riched_toggle_remember_state'] );
 282+
 283+ // Add the "disable rich editor on namespace X" toggles too
 284+ foreach( self::$nsToggles as $newToggle ){
 285+ $preferences[$newToggle] = array(
 286+ 'type' => 'toggle',
 287+ 'section' => 'editing',
 288+ 'label-message' => 'tog-' . $newToggle
 289+ );
286290 }
287291
288292 return true;
@@ -290,78 +294,75 @@
291295 /**
292296 * Add FCK script
293297 *
294 - * @param unknown_type $q
295 - * @return unknown
 298+ * @param $form EditPage object
 299+ * @return true
296300 */
297301 public function onEditPageShowEditFormInitial( $form ) {
298 - global $wgOut, $wgTitle, $wgScriptPath, $wgContLang;
299 - global $wgFCKEditorToolbarSet, $wgFCKEditorIsCompatible;
300 - global $wgFCKEditorExtDir, $wgFCKEditorDir, $wgFCKEditorHeight, $wgUser;
301 - global $wgStylePath, $wgStyleVersion, $wgDefaultSkin, $wgExtensionFunctions;
302 - global $wgFCKWikiTextBeforeParse;
303 - global $wgHooks, $wgDefaultUserOptions;
 302+ global $wgOut, $wgTitle, $wgScriptPath, $wgContLang, $wgUser;
 303+ global $wgStylePath, $wgStyleVersion, $wgDefaultSkin, $wgExtensionFunctions, $wgHooks, $wgDefaultUserOptions;
 304+ global $wgFCKWikiTextBeforeParse, $wgFCKEditorIsCompatible;
 305+ global $wgFCKEditorExtDir, $wgFCKEditorDir, $wgFCKEditorHeight, $wgFCKEditorToolbarSet;
304306
305 - if (!isset($this->showFCKEditor))
306 - {
 307+ if( !isset( $this->showFCKEditor ) ){
307308 $this->showFCKEditor = 0;
308 - if ( !$wgUser->getOption( 'riched_start_disabled',$wgDefaultUserOptions['riched_start_disabled'] ) ) {
 309+ if ( !$wgUser->getOption( 'riched_start_disabled', $wgDefaultUserOptions['riched_start_disabled'] ) ) {
309310 $this->showFCKEditor += RTE_VISIBLE;
310311 }
311 - if ( $wgUser->getOption( 'riched_use_popup',$wgDefaultUserOptions['riched_use_popup'] ) ) {
 312+ if ( $wgUser->getOption( 'riched_use_popup', $wgDefaultUserOptions['riched_use_popup'] ) ) {
312313 $this->showFCKEditor += RTE_POPUP;
313314 }
314 - if ( $wgUser->getOption( 'riched_use_toggle',$wgDefaultUserOptions['riched_use_toggle'] ) ) {
 315+ if ( $wgUser->getOption( 'riched_use_toggle', $wgDefaultUserOptions['riched_use_toggle'] ) ) {
315316 $this->showFCKEditor += RTE_TOGGLE_LINK;
316317 }
317318 }
318319
319 - if( (!empty($_SESSION['showMyFCKeditor'])) && ($wgUser->getOption( 'riched_toggle_remember_state',$wgDefaultUserOptions['riched_toggle_remember_state'] )))
320 - {
321 - //clear RTE_VISIBLE flag
322 - $this->showFCKEditor &= ~RTE_VISIBLE ;
323 - //get flag from session
324 - $this->showFCKEditor |= $_SESSION['showMyFCKeditor'] ;
 320+ if( ( !empty( $_SESSION['showMyFCKeditor'] ) ) && ( $wgUser->getOption( 'riched_toggle_remember_state', $wgDefaultUserOptions['riched_toggle_remember_state'] ) ) ){
 321+ // Clear RTE_VISIBLE flag
 322+ $this->showFCKEditor &= ~RTE_VISIBLE;
 323+ // Get flag from session
 324+ $this->showFCKEditor |= $_SESSION['showMyFCKeditor'];
325325 }
326326
327 - if (!$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable', !empty( $wgDefaultUserOptions['riched_disable'] ) ? $wgDefaultUserOptions['riched_disable'] : false ) || !$wgFCKEditorIsCompatible) {
 327+ # Don't initialize if we have disabled the toolbar or FCkeditor or have a non-compatible browser
 328+ if( !$wgUser->getOption( 'showtoolbar' ) ||
 329+ $wgUser->getOption( 'riched_disable', !empty( $wgDefaultUserOptions['riched_disable'] ) ? $wgDefaultUserOptions['riched_disable'] : false )
 330+ || !$wgFCKEditorIsCompatible ) {
328331 return true;
329332 }
330333
331 - if (in_array($wgTitle->getNamespace(), $this->getExcludedNamespaces())) {
 334+ # Don't do anything if we're in an excluded namespace
 335+ if( in_array( $wgTitle->getNamespace(), $this->getExcludedNamespaces() ) ) {
332336 return true;
333337 }
334338
335 - if (false !== strpos($form->textbox1, "__NORICHEDITOR__")) {
 339+ # Make sure that there's no __NORICHEDITOR__ in the text either
 340+ if( false !== strpos( $form->textbox1, '__NORICHEDITOR__' ) ) {
336341 return true;
337342 }
338343
339344 $wgFCKWikiTextBeforeParse = $form->textbox1;
340 - if ($this->showFCKEditor & RTE_VISIBLE)
341 - {
 345+ if( $this->showFCKEditor & RTE_VISIBLE ){
342346 $options = new FCKeditorParserOptions();
343 - $options->setTidy(true);
 347+ $options->setTidy( true );
344348 $parser = new FCKeditorParser();
345 - $parser->setOutputType(OT_HTML);
346 - $form->textbox1 = str_replace("<!-- Tidy found serious XHTML errors -->", "", $parser->parse($form->textbox1, $wgTitle, $options)->getText());
 349+ $parser->setOutputType( OT_HTML );
 350+ $form->textbox1 = str_replace( '<!-- Tidy found serious XHTML errors -->', '', $parser->parse( $form->textbox1, $wgTitle, $options )->getText() );
347351 }
348352
349353 $printsheet = htmlspecialchars( "$wgStylePath/common/wikiprintable.css?$wgStyleVersion" );
350354
351 - //CSS trick, we need to get user CSS stylesheets somehow... it must be done in a different way!
 355+ // CSS trick, we need to get user CSS stylesheets somehow... it must be done in a different way!
352356 $skin = $wgUser->getSkin();
353357 $skin->loggedin = $wgUser->isLoggedIn();
354358 $skin->mTitle =& $wgTitle;
355 - $skin->initPage($wgOut);
356 - //$skin->skinname = 'monobook';
 359+ $skin->initPage( $wgOut );
357360 $skin->userpage = $wgUser->getUserPage()->getPrefixedText();
358 - if (method_exists($skin, "setupUserCss")) {
359 - $skin->setupUserCss($wgOut);
360 - }
 361+ $skin->setupUserCss( $wgOut );
361362
362 - if (!empty($skin->usercss) && preg_match_all('/@import "([^"]+)";/', $skin->usercss, $matches)) {
 363+ if( !empty( $skin->usercss ) && preg_match_all( '/@import "([^"]+)";/', $skin->usercss, $matches ) ) {
363364 $userStyles = $matches[1];
364365 }
365 - //End of CSS trick
 366+ // End of CSS trick
366367
367368 $script = <<<HEREDOC
368369 <script type="text/javascript" src="$wgScriptPath/$wgFCKEditorDir/fckeditor.js"></script>
@@ -376,60 +377,63 @@
377378 HEREDOC;
378379
379380 $script .= '<script type="text/javascript"> ';
380 - if (!empty($userStyles)) {
381 - $script .= 'sEditorAreaCSS += ",'.implode(',', $userStyles).'";';
 381+ if( !empty( $userStyles ) ) {
 382+ $script .= 'sEditorAreaCSS += ",' . implode( ',', $userStyles ) . '";';
382383 }
383384
 385+ # Show references only if Cite extension has been installed
384386 $showRef = false;
385 - if ( (isset($wgHooks['ParserFirstCallInit']) && in_array('wfCite',$wgHooks['ParserFirstCallInit'])) || (isset($wgExtensionFunctions) && in_array('wfCite',$wgExtensionFunctions)) ) {
 387+ if( ( isset( $wgHooks['ParserFirstCallInit'] ) && in_array( 'wfCite', $wgHooks['ParserFirstCallInit'] ) ) ||
 388+ ( isset( $wgExtensionFunctions ) && in_array( 'wfCite', $wgExtensionFunctions ) ) ) {
386389 $showRef = true;
387390 }
388391
389392 $showSource = false;
390 - if ( (isset ($wgHooks['ParserFirstCallInit']) && in_array('efSyntaxHighlight_GeSHiSetup', $wgHooks['ParserFirstCallInit']))
391 - || (isset ($wgExtensionFunctions) && in_array('efSyntaxHighlight_GeSHiSetup', $wgExtensionFunctions)) ) {
 393+ if ( ( isset( $wgHooks['ParserFirstCallInit']) && in_array( 'efSyntaxHighlight_GeSHiSetup', $wgHooks['ParserFirstCallInit'] ) )
 394+ || ( isset( $wgExtensionFunctions ) && in_array( 'efSyntaxHighlight_GeSHiSetup', $wgExtensionFunctions ) ) ) {
392395 $showSource = true;
393396 }
394397
 398+ wfLoadExtensionMessages( 'FCKeditor' );
395399 $script .= '
396 -var showFCKEditor = '. $this->showFCKEditor .';
397 -var popup = false; //pointer to popup document
 400+var showFCKEditor = ' . $this->showFCKEditor . ';
 401+var popup = false; // pointer to popup document
398402 var firstLoad = true;
399 -var editorMsgOn = "'. wfMsg( 'textrichditor' ) .'";
400 -var editorMsgOff = "'. wfMsg( 'tog-riched_disable' ) .'";
401 -var editorLink = "'. (($this->showFCKEditor & RTE_VISIBLE)? wfMsg( 'tog-riched_disable' ): wfMsg( 'textrichditor' )) .'";
402 -var saveSetting = '. ($wgUser->getOption( 'riched_toggle_remember_state',$wgDefaultUserOptions['riched_toggle_remember_state'] ) ? 1 : 0) .';
403 -var RTE_VISIBLE = '.RTE_VISIBLE.';
404 -var RTE_TOGGLE_LINK = '.RTE_TOGGLE_LINK.';
405 -var RTE_POPUP = '.RTE_POPUP.';
 403+var editorMsgOn = "' . wfMsg( 'textrichditor' ) . '";
 404+var editorMsgOff = "' . wfMsg( 'tog-riched_disable' ) . '";
 405+var editorLink = "' . ( ( $this->showFCKEditor & RTE_VISIBLE ) ? wfMsg( 'tog-riched_disable' ) : wfMsg( 'textrichditor' ) ) . '";
 406+var saveSetting = ' . ( $wgUser->getOption( 'riched_toggle_remember_state', $wgDefaultUserOptions['riched_toggle_remember_state'] ) ? 1 : 0 ) . ';
 407+var RTE_VISIBLE = ' . RTE_VISIBLE . ';
 408+var RTE_TOGGLE_LINK = ' . RTE_TOGGLE_LINK . ';
 409+var RTE_POPUP = ' . RTE_POPUP . ';
406410
407411
408 -var oFCKeditor = new FCKeditor( "wpTextbox1" ) ;
 412+var oFCKeditor = new FCKeditor( "wpTextbox1" );
409413
410 -//Set config
411 -oFCKeditor.BasePath = "'.$wgScriptPath.'/'.$wgFCKEditorDir.'/" ;
412 -oFCKeditor.Config["CustomConfigurationsPath"] = "'.$wgScriptPath.'/'.$wgFCKEditorExtDir.'/fckeditor_config.js" ;';
413 - if ($wgContLang->isRTL()) {
414 - $script .= 'oFCKeditor.Config["EditorAreaCSS"] = "'.$wgScriptPath.'/'.$wgFCKEditorExtDir.'/css/fckeditor.css,'.$wgScriptPath.'/'.$wgFCKEditorExtDir.'/css/fckeditor-rtl.css" ;';
 414+// Set config
 415+oFCKeditor.BasePath = wgScriptPath + "/" + wgFCKEditorDir;
 416+oFCKeditor.Config["CustomConfigurationsPath"] = wgScriptPath + "/" + wgFCKEditorExtDir + "/fckeditor_config.js";';
 417+ // Load fckeditor-rtl.css for right-to-left languages, but only fckeditor.css for other languages
 418+ if( $wgContLang->isRTL() ) {
 419+ $script .= 'oFCKeditor.Config["EditorAreaCSS"] = wgScriptPath + "/" + wgFCKEditorExtDir + "/css/fckeditor.css, wgScriptPath + "/" + wgFCKEditorExtDir + "/css/fckeditor-rtl.css";';
 420+ } else {
 421+ $script .= 'oFCKeditor.Config["EditorAreaCSS"] = wgScriptPath + "/" + wgFCKEditorExtDir + "/css/fckeditor.css";';
415422 }
416 - else {
417 - $script .= 'oFCKeditor.Config["EditorAreaCSS"] = "'.$wgScriptPath.'/'.$wgFCKEditorExtDir.'/css/fckeditor.css" ;';
418 - }
419423 $script .= '
420 -oFCKeditor.ToolbarSet = "'. $wgFCKEditorToolbarSet .'" ;
 424+oFCKeditor.ToolbarSet = wgFCKEditorToolbarSet;
421425 oFCKeditor.ready = true;
422 -oFCKeditor.Config["showreferences"] = '.(($showRef)?'true':'false').';
423 -oFCKeditor.Config["showsource"] = '.(($showSource)?'true':'false').';
 426+oFCKeditor.Config["showreferences"] = ' . ( ( $showRef ) ? 'true' : 'false' ) . ';
 427+oFCKeditor.Config["showsource"] = ' . ( ( $showSource ) ? 'true' : 'false' ) . ';
424428 ';
425429 $script .= '</script>';
426430
427 - $newWinMsg = wfMsg('rich_editor_new_window');
 431+ $newWinMsg = wfMsg( 'rich_editor_new_window' );
428432 $script .= <<<HEREDOC
429433 <script type="text/javascript">
430434
431435 //IE hack to call func from popup
432436 function FCK_sajax(func_name, args, target) {
433 - sajax_request_type = 'POST' ;
 437+ sajax_request_type = 'POST';
434438 sajax_do_call(func_name, args, function (x) {
435439 // I know this is function, not object
436440 target(x);
@@ -437,218 +441,186 @@
438442 );
439443 }
440444
441 -function onLoadFCKeditor()
442 -{
443 - if (!(showFCKEditor & RTE_VISIBLE))
 445+function onLoadFCKeditor(){
 446+ if( !( showFCKEditor & RTE_VISIBLE ) )
444447 showFCKEditor += RTE_VISIBLE;
445448 firstLoad = false;
446 - realTextarea = document.getElementById('wpTextbox1');
447 - if ( realTextarea )
448 - {
449 - var height = $wgFCKEditorHeight ;
 449+ realTextarea = document.getElementById( 'wpTextbox1' );
 450+ if ( realTextarea ){
 451+ var height = wgFCKEditorHeight;
450452 realTextarea.style.display = 'none';
451 - if ( height == 0 )
452 - {
 453+ if ( height == 0 ){
453454 // Get the window (inner) size.
454 - var height = window.innerHeight || ( document.documentElement && document.documentElement.clientHeight ) || 550 ;
 455+ var height = window.innerHeight || ( document.documentElement && document.documentElement.clientHeight ) || 550;
455456
456457 // Reduce the height to the offset of the toolbar.
457 - var offset = document.getElementById('wikiPreview') || document.getElementById('toolbar') ;
458 - while ( offset )
459 - {
460 - height -= offset.offsetTop ;
461 - offset = offset.offsetParent ;
 458+ var offset = document.getElementById( 'wikiPreview' ) || document.getElementById( 'toolbar' );
 459+ while ( offset ){
 460+ height -= offset.offsetTop;
 461+ offset = offset.offsetParent;
462462 }
463463
464464 // Add a small space to be left in the bottom.
465 - height -= 20 ;
 465+ height -= 20;
466466 }
467467
468468 // Enforce a minimum height.
469 - height = ( !height || height < 300 ) ? 300 : height ;
 469+ height = ( !height || height < 300 ) ? 300 : height;
470470
471471 // Create the editor instance and replace the textarea.
472 - oFCKeditor.Height = height ;
473 - oFCKeditor.ReplaceTextarea() ;
 472+ oFCKeditor.Height = height;
 473+ oFCKeditor.ReplaceTextarea();
474474
475475 // Hide the default toolbar.
476 - document.getElementById('toolbar').style.display = 'none' ;
477 - // do things with CharInsert for example
 476+ document.getElementById( 'toolbar' ).style.display = 'none';
478477
479 - var edittools_markup = document.getElementById ('editpage-specialchars') ;
480 - if (edittools_markup) {
481 - edittools_markup.style.display = 'none' ;
 478+ // do things with CharInsert for example
 479+ var edittools_markup = document.getElementById( 'editpage-specialchars' );
 480+ if( edittools_markup ) {
 481+ edittools_markup.style.display = 'none';
482482 }
483 - FCKeditorInsertTags = function (tagOpen, tagClose, sampleText, oDoc)
484 - {
 483+ FCKeditorInsertTags = function( tagOpen, tagClose, sampleText, oDoc ){
485484 var txtarea;
486485
487 - if ( !(typeof(oDoc.FCK) == "undefined") && !(typeof(oDoc.FCK.EditingArea) == "undefined") )
488 - {
489 - txtarea = oDoc.FCK.EditingArea.Textarea ;
490 - }
491 - else if (oDoc.editform)
492 - {
 486+ if ( !( typeof(oDoc.FCK) == "undefined" ) && !( typeof(oDoc.FCK.EditingArea) == "undefined" ) ){
 487+ txtarea = oDoc.FCK.EditingArea.Textarea;
 488+ } else if( oDoc.editform ){
493489 // if we have FCK enabled, behave differently...
494 - if ( showFCKEditor & RTE_VISIBLE )
495 - {
496 - SRCiframe = oDoc.getElementById ('wpTextbox1___Frame') ;
497 - if ( SRCiframe )
498 - {
499 - if (window.frames[SRCiframe])
500 - SRCdoc = window.frames[SRCiframe].oDoc ;
 490+ if ( showFCKEditor & RTE_VISIBLE ){
 491+ SRCiframe = oDoc.getElementById( 'wpTextbox1___Frame' );
 492+ if ( SRCiframe ){
 493+ if( window.frames[SRCiframe] )
 494+ SRCdoc = window.frames[SRCiframe].oDoc;
501495 else
502 - SRCdoc = SRCiframe.contentDocument ;
 496+ SRCdoc = SRCiframe.contentDocument;
503497
504 - var SRCarea = SRCdoc.getElementById ('xEditingArea').firstChild ;
 498+ var SRCarea = SRCdoc.getElementById( 'xEditingArea' ).firstChild;
505499
506 - if (SRCarea)
507 - txtarea = SRCarea ;
 500+ if( SRCarea )
 501+ txtarea = SRCarea;
508502 else
509 - return false ;
 503+ return false;
510504
 505+ } else {
 506+ return false;
511507 }
512 - else
513 - {
514 - return false ;
515 - }
 508+ } else {
 509+ txtarea = oDoc.editform.wpTextbox1;
516510 }
517 - else
518 - {
519 - txtarea = oDoc.editform.wpTextbox1 ;
520 - }
521 - }
522 - else
523 - {
 511+ } else {
524512 // some alternate form? take the first one we can find
525 - var areas = oDoc.getElementsByTagName( 'textarea' ) ;
526 - txtarea = areas[0] ;
 513+ var areas = oDoc.getElementsByTagName( 'textarea' );
 514+ txtarea = areas[0];
527515 }
528516
529 - var selText, isSample = false ;
 517+ var selText, isSample = false;
530518
531 - if ( oDoc.selection && oDoc.selection.createRange )
532 - { // IE/Opera
 519+ if ( oDoc.selection && oDoc.selection.createRange ){ // IE/Opera
533520
534 - //save window scroll position
 521+ // save window scroll position
535522 if ( oDoc.documentElement && oDoc.documentElement.scrollTop )
536 - var winScroll = oDoc.documentElement.scrollTop ;
 523+ var winScroll = oDoc.documentElement.scrollTop;
537524 else if ( oDoc.body )
538 - var winScroll = oDoc.body.scrollTop ;
 525+ var winScroll = oDoc.body.scrollTop;
539526
540 - //get current selection
541 - txtarea.focus() ;
542 - var range = oDoc.selection.createRange() ;
543 - selText = range.text ;
544 - //insert tags
 527+ // get current selection
 528+ txtarea.focus();
 529+ var range = oDoc.selection.createRange();
 530+ selText = range.text;
 531+ // insert tags
545532 checkSelected();
546 - range.text = tagOpen + selText + tagClose ;
547 - //mark sample text as selected
548 - if ( isSample && range.moveStart )
549 - {
550 - if (window.opera)
551 - tagClose = tagClose.replace(/\\n/g,'') ; //check it out one more time
552 - range.moveStart('character', - tagClose.length - selText.length) ;
553 - range.moveEnd('character', - tagClose.length) ;
 533+ range.text = tagOpen + selText + tagClose;
 534+ // mark sample text as selected
 535+ if ( isSample && range.moveStart ){
 536+ if( window.opera )
 537+ tagClose = tagClose.replace(/\\n/g,''); // check it out one more time
 538+ range.moveStart( 'character', - tagClose.length - selText.length );
 539+ range.moveEnd( 'character', - tagClose.length );
554540 }
555541 range.select();
556 - //restore window scroll position
 542+ // restore window scroll position
557543 if ( oDoc.documentElement && oDoc.documentElement.scrollTop )
558 - oDoc.documentElement.scrollTop = winScroll ;
 544+ oDoc.documentElement.scrollTop = winScroll;
559545 else if ( oDoc.body )
560 - oDoc.body.scrollTop = winScroll ;
 546+ oDoc.body.scrollTop = winScroll;
561547
562 - }
563 - else if ( txtarea.selectionStart || txtarea.selectionStart == '0' )
564 - { // Mozilla
 548+ } else if ( txtarea.selectionStart || txtarea.selectionStart == '0' ){ // Mozilla
565549
566 - //save textarea scroll position
567 - var textScroll = txtarea.scrollTop ;
568 - //get current selection
569 - txtarea.focus() ;
570 - var startPos = txtarea.selectionStart ;
571 - var endPos = txtarea.selectionEnd ;
572 - selText = txtarea.value.substring( startPos, endPos ) ;
 550+ // save textarea scroll position
 551+ var textScroll = txtarea.scrollTop;
 552+ // get current selection
 553+ txtarea.focus();
 554+ var startPos = txtarea.selectionStart;
 555+ var endPos = txtarea.selectionEnd;
 556+ selText = txtarea.value.substring( startPos, endPos );
573557
574 - //insert tags
575 - if (!selText)
576 - {
577 - selText = sampleText ;
578 - isSample = true ;
 558+ // insert tags
 559+ if( !selText ){
 560+ selText = sampleText;
 561+ isSample = true;
 562+ } else if( selText.charAt(selText.length - 1) == ' ' ){ //exclude ending space char
 563+ selText = selText.substring(0, selText.length - 1);
 564+ tagClose += ' ';
579565 }
580 - else if (selText.charAt(selText.length - 1) == ' ')
581 - { //exclude ending space char
582 - selText = selText.substring(0, selText.length - 1) ;
583 - tagClose += ' ' ;
584 - }
585566 txtarea.value = txtarea.value.substring(0, startPos) + tagOpen + selText + tagClose +
586 - txtarea.value.substring(endPos, txtarea.value.length) ;
587 - //set new selection
588 - if (isSample)
589 - {
590 - txtarea.selectionStart = startPos + tagOpen.length ;
591 - txtarea.selectionEnd = startPos + tagOpen.length + selText.length ;
592 - }
593 - else
594 - {
595 - txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length ;
 567+ txtarea.value.substring(endPos, txtarea.value.length);
 568+ // set new selection
 569+ if( isSample ){
 570+ txtarea.selectionStart = startPos + tagOpen.length;
 571+ txtarea.selectionEnd = startPos + tagOpen.length + selText.length;
 572+ } else {
 573+ txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length;
596574 txtarea.selectionEnd = txtarea.selectionStart;
597575 }
598 - //restore textarea scroll position
 576+ // restore textarea scroll position
599577 txtarea.scrollTop = textScroll;
600578 }
601579 }
602580 }
603581 }
604 -function checkSelected()
605 -{
606 - if (!selText) {
 582+function checkSelected(){
 583+ if( !selText ) {
607584 selText = sampleText;
608585 isSample = true;
609 - } else if (selText.charAt(selText.length - 1) == ' ') { //exclude ending space char
 586+ } else if( selText.charAt(selText.length - 1) == ' ' ) { //exclude ending space char
610587 selText = selText.substring(0, selText.length - 1);
611588 tagClose += ' '
612589 }
613590 }
614 -function initEditor()
615 -{
616 - var toolbar = document.getElementById('toolbar') ;
617 - //show popup or toogle link
618 - if (showFCKEditor & (RTE_POPUP|RTE_TOGGLE_LINK)){
619 - //add new toolbar before wiki toolbar
620 - var fckTools = document.createElement('div');
 591+function initEditor(){
 592+ var toolbar = document.getElementById( 'toolbar' );
 593+ // show popup or toogle link
 594+ if( showFCKEditor & ( RTE_POPUP|RTE_TOGGLE_LINK ) ){
 595+ // add new toolbar before wiki toolbar
 596+ var fckTools = document.createElement( 'div' );
621597 fckTools.setAttribute('id', 'fckTools');
622598 toolbar.parentNode.insertBefore( fckTools, toolbar );
623599
624 - var SRCtextarea = document.getElementById( "wpTextbox1" ) ;
625 - if (showFCKEditor & RTE_VISIBLE) SRCtextarea.style.display = "none";
 600+ var SRCtextarea = document.getElementById( 'wpTextbox1' );
 601+ if( showFCKEditor & RTE_VISIBLE ) SRCtextarea.style.display = 'none';
626602 }
627603
628 - if (showFCKEditor & RTE_TOGGLE_LINK)
629 - {
 604+ if( showFCKEditor & RTE_TOGGLE_LINK ){
630605 fckTools.innerHTML='[<a class="fckToogle" id="toggle_wpTextbox1" href="javascript:void(0)" onclick="ToggleFCKEditor(\'toggle\',\'wpTextbox1\')">'+ editorLink +'</a>] ';
631606 }
632 - if (showFCKEditor & RTE_POPUP)
633 - {
 607+ if( showFCKEditor & RTE_POPUP ){
634608 var style = (showFCKEditor & RTE_VISIBLE) ? 'style="display:none"' : "";
635609 fckTools.innerHTML+='<span ' + style + ' id="popup_wpTextbox1">[<a class="fckPopup" href="javascript:void(0)" onclick="ToggleFCKEditor(\'popup\',\'wpTextbox1\')">{$newWinMsg}</a>]</span>';
636610 }
637611
638 - if (showFCKEditor & RTE_VISIBLE)
639 - {
640 - if ( toolbar ) //insert wiki buttons
641 - {
 612+ if( showFCKEditor & RTE_VISIBLE ){
 613+ if ( toolbar ){ // insert wiki buttons
642614 // Remove the mwSetupToolbar onload hook to avoid a JavaScript error with FF.
643615 if ( window.removeEventListener )
644 - window.removeEventListener( 'load', mwSetupToolbar, false ) ;
 616+ window.removeEventListener( 'load', mwSetupToolbar, false );
645617 else if ( window.detachEvent )
646 - window.detachEvent( 'onload', mwSetupToolbar ) ;
647 - mwSetupToolbar = function() { return false ; } ;
 618+ window.detachEvent( 'onload', mwSetupToolbar );
 619+ mwSetupToolbar = function(){ return false ; };
648620
649 - for (var i = 0; i < mwEditButtons.length; i++) {
 621+ for( var i = 0; i < mwEditButtons.length; i++ ) {
650622 mwInsertEditButton(toolbar, mwEditButtons[i]);
651623 }
652 - for (var i = 0; i < mwCustomEditButtons.length; i++) {
 624+ for( var i = 0; i < mwCustomEditButtons.length; i++ ) {
653625 mwInsertEditButton(toolbar, mwCustomEditButtons[i]);
654626 }
655627 }
@@ -660,86 +632,78 @@
661633
662634 HEREDOC;
663635
664 -if ($this->showFCKEditor & (RTE_TOGGLE_LINK | RTE_POPUP) ){
665 - //add toogle link and handler
 636+if( $this->showFCKEditor & ( RTE_TOGGLE_LINK | RTE_POPUP ) ){
 637+ // add toggle link and handler
666638 $script .= <<<HEREDOC
667639
668 -function ToggleFCKEditor(mode, objId)
669 -{
670 - var SRCtextarea = document.getElementById( objId ) ;
671 - if(mode == 'popup'){
672 - if (( showFCKEditor & RTE_VISIBLE) && ( FCKeditorAPI )) //if FCKeditor is up-to-date
673 - {
 640+function ToggleFCKEditor( mode, objId ){
 641+ var SRCtextarea = document.getElementById( objId );
 642+ if( mode == 'popup' ){
 643+ if ( ( showFCKEditor & RTE_VISIBLE ) && ( FCKeditorAPI ) ) { // if FCKeditor is up-to-date
674644 var oEditorIns = FCKeditorAPI.GetInstance( objId );
675645 var text = oEditorIns.GetData( oEditorIns.Config.FormatSource );
676 - SRCtextarea.value = text; //copy text to textarea
 646+ SRCtextarea.value = text; // copy text to textarea
677647 }
678 - FCKeditor_OpenPopup('oFCKeditor',objId);
 648+ FCKeditor_OpenPopup('oFCKeditor', objId);
679649 return true;
680650 }
681651
682 - var oToggleLink = document.getElementById('toggle_'+ objId );
683 - var oPopupLink = document.getElementById('popup_'+ objId );
 652+ var oToggleLink = document.getElementById( 'toggle_' + objId );
 653+ var oPopupLink = document.getElementById( 'popup_' + objId );
684654
685 - if ( firstLoad )
686 - {
 655+ if ( firstLoad ){
687656 // firstLoad = true => FCKeditor start invisible
688 - if (oToggleLink) oToggleLink.innerHTML = "Loading...";
689 - sajax_request_type = 'POST' ;
 657+ if( oToggleLink ) oToggleLink.innerHTML = 'Loading...';
 658+ sajax_request_type = 'POST';
690659 oFCKeditor.ready = false;
691 - sajax_do_call('wfSajaxWikiToHTML', [SRCtextarea.value], function ( result ){
692 - if ( firstLoad ) //still
693 - {
694 - SRCtextarea.value = result.responseText; //insert parsed text
 660+ sajax_do_call('wfSajaxWikiToHTML', [SRCtextarea.value], function( result ){
 661+ if ( firstLoad ){ //still
 662+ SRCtextarea.value = result.responseText; // insert parsed text
695663 onLoadFCKeditor();
696 - if (oToggleLink) oToggleLink.innerHTML = editorMsgOff;
 664+ if( oToggleLink ) oToggleLink.innerHTML = editorMsgOff;
697665 oFCKeditor.ready = true;
698666 }
699667 });
700668 return true;
701669 }
702670
703 - if (!oFCKeditor.ready) return false; //sajax_do_call in action
704 - if (!FCKeditorAPI) return false; //not loaded yet
 671+ if( !oFCKeditor.ready ) return false; // sajax_do_call in action
 672+ if( !FCKeditorAPI ) return false; // not loaded yet
705673 var oEditorIns = FCKeditorAPI.GetInstance( objId );
706 - var oEditorIframe = document.getElementById( objId+'___Frame' );
707 - var FCKtoolbar = document.getElementById('toolbar');
 674+ var oEditorIframe = document.getElementById( objId + '___Frame' );
 675+ var FCKtoolbar = document.getElementById( 'toolbar' );
708676 var bIsWysiwyg = ( oEditorIns.EditMode == FCK_EDITMODE_WYSIWYG );
709677
710678 //FCKeditor visible -> hidden
711 - if ( showFCKEditor & RTE_VISIBLE)
712 - {
 679+ if ( showFCKEditor & RTE_VISIBLE ){
713680 var text = oEditorIns.GetData( oEditorIns.Config.FormatSource );
714681 SRCtextarea.value = text;
715 - if ( bIsWysiwyg ) oEditorIns.SwitchEditMode(); //switch to plain
 682+ if ( bIsWysiwyg ) oEditorIns.SwitchEditMode(); // switch to plain
716683 var text = oEditorIns.GetData( oEditorIns.Config.FormatSource );
717 - //copy from FCKeditor to textarea
 684+ // copy from FCKeditor to textarea
718685 SRCtextarea.value = text;
719 - if (saveSetting)
720 - {
721 - sajax_request_type = 'GET' ;
722 - sajax_do_call( 'wfSajaxToggleFCKeditor', ['hide'], function(){} ) ; //remember closing in session
 686+ if( saveSetting ){
 687+ sajax_request_type = 'GET';
 688+ sajax_do_call( 'wfSajaxToggleFCKeditor', ['hide'], function(){} ); //remember closing in session
723689 }
724 - if (oToggleLink) oToggleLink.innerHTML = editorMsgOn;
725 - if (oPopupLink) oPopupLink.style.display = '';
 690+ if( oToggleLink ) oToggleLink.innerHTML = editorMsgOn;
 691+ if( oPopupLink ) oPopupLink.style.display = '';
726692 showFCKEditor -= RTE_VISIBLE;
727693 oEditorIframe.style.display = 'none';
728694 FCKtoolbar.style.display = '';
729695 SRCtextarea.style.display = '';
730 - }
731 - //FCKeditor hidden -> visible
732 - else
733 - {
734 - if ( bIsWysiwyg ) oEditorIns.SwitchEditMode(); //switch to plain
 696+ } else {
 697+ // FCKeditor hidden -> visible
 698+ if ( bIsWysiwyg ) oEditorIns.SwitchEditMode(); // switch to plain
735699 SRCtextarea.style.display = 'none';
736 - //copy from textarea to FCKeditor
737 - oEditorIns.EditingArea.Textarea.value = SRCtextarea.value
 700+ // copy from textarea to FCKeditor
 701+ oEditorIns.EditingArea.Textarea.value = SRCtextarea.value;
738702 FCKtoolbar.style.display = 'none';
739703 oEditorIframe.style.display = '';
740 - if ( !bIsWysiwyg ) oEditorIns.SwitchEditMode(); //switch to WYSIWYG
 704+ if ( !bIsWysiwyg ) oEditorIns.SwitchEditMode(); // switch to WYSIWYG
741705 showFCKEditor += RTE_VISIBLE; // showFCKEditor+=RTE_VISIBLE
742 - if (oToggleLink) oToggleLink.innerHTML = editorMsgOff;
743 - if (oPopupLink) oPopupLink.style.display = 'none';
 706+ if( oToggleLink ) oToggleLink.innerHTML = editorMsgOff;
 707+ if( oPopupLink ) oPopupLink.style.display = 'none';
744708 }
745709 return true;
746710 }
@@ -747,46 +711,22 @@
748712 HEREDOC;
749713 }
750714
751 -if($this->showFCKEditor & RTE_POPUP){
 715+if( $this->showFCKEditor & RTE_POPUP ){
752716 $script .= <<<HEREDOC
753717
754 -function FCKeditor_OpenPopup(jsID, textareaID)
755 -{
756 - popupUrl = '${wgFCKEditorExtDir}/FCKeditor.popup.html';
 718+function FCKeditor_OpenPopup(jsID, textareaID){
 719+ popupUrl = wgFCKEditorExtDir + '/FCKeditor.popup.html';
757720 popupUrl = popupUrl + '?var='+ jsID + '&el=' + textareaID;
758721 window.open(popupUrl, null, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=1,dependent=yes');
759722 return 0;
760723 }
761724 HEREDOC;
762725 }
763 -$script .= "</script>";
 726+$script .= '</script>';
764727
765 - $wgOut->addScript($script);
 728+ $wgOut->addScript( $script );
766729
767730 return true;
768731 }
769732
770 - public function onUserToggles( &$extraToggles ) {
771 - global $wgUser,$wgDefaultUserOptions;
772 - $extraToggles[] = 'riched_disable';
773 - $extraToggles[] = 'riched_start_disabled';
774 - $extraToggles[] = 'riched_use_popup';
775 - $extraToggles[] = 'riched_use_toggle';
776 - $extraToggles[] = 'riched_toggle_remember_state';
777 -
778 - //Show default options in Special:Preferences
779 - if( !array_key_exists( "riched_disable", $wgUser->mOptions ) && !empty($wgDefaultUserOptions['riched_disable']) )
780 - $wgUser->setOption("riched_disable", $wgDefaultUserOptions['riched_disable']);
781 - if( !array_key_exists( "riched_start_disabled", $wgUser->mOptions ) && !empty($wgDefaultUserOptions['riched_start_disabled']) )
782 - $wgUser->setOption("riched_start_disabled",$wgDefaultUserOptions['riched_start_disabled']);
783 - if( !array_key_exists( "riched_use_popup", $wgUser->mOptions ) && !empty($wgDefaultUserOptions['riched_use_popup']) )
784 - $wgUser->setOption("riched_use_popup",$wgDefaultUserOptions['riched_use_popup']);
785 - if( !array_key_exists( "riched_use_toggle", $wgUser->mOptions ) && !empty($wgDefaultUserOptions['riched_use_toggle']) )
786 - $wgUser->setOption("riched_use_toggle",$wgDefaultUserOptions['riched_use_toggle']);
787 - if( !array_key_exists( "riched_toggle_remember_state", $wgUser->mOptions ) && !empty($wgDefaultUserOptions['riched_toggle_remember_state']) )
788 - $wgUser->setOption("riched_toggle_remember_state",$wgDefaultUserOptions['riched_toggle_remember_state']);
789 -
790 - $extraToggles = array_merge($extraToggles, self::$nsToggles);
791 - return true;
792 - }
793733 }
Index: trunk/extensions/FCKeditor/FCKeditor.i18n.php
@@ -0,0 +1,501 @@
 2+<?php
 3+/**
 4+ * Internationalization file for FCKeditor extension.
 5+ *
 6+ * @file
 7+ * @ingroup Extensions
 8+ */
 9+
 10+$messages = array();
 11+
 12+/** English */
 13+$messages['en'] = array(
 14+ 'textrichditor' => 'Rich Editor',
 15+ 'tog-riched_disable' => 'Disable rich editor',
 16+ 'tog-riched_disable_ns_main' => 'Disable rich editor within the main namespace',
 17+ 'tog-riched_disable_ns_talk' => 'Disable rich editor within the "{{ns:Talk}}" namespace',
 18+ 'tog-riched_disable_ns_user' => 'Disable rich editor within the "{{ns:User}}" namespace',
 19+ 'tog-riched_disable_ns_user_talk' => 'Disable rich editor within the "{{ns:User_talk}}" namespace',
 20+ 'tog-riched_disable_ns_project' => 'Disable rich editor within the "{{ns:Project}}" namespace',
 21+ 'tog-riched_disable_ns_project_talk' => 'Disable rich editor within the "{{ns:Project_talk}}" namespace',
 22+ 'tog-riched_disable_ns_image' => 'Disable rich editor within the "{{ns:Image}}" namespace',
 23+ 'tog-riched_disable_ns_image_talk' => 'Disable rich editor within the "{{ns:Image_talk}}" namespace',
 24+ 'tog-riched_disable_ns_mediawiki' => 'Disable rich editor within the "{{ns:MediaWiki}}" namespace',
 25+ 'tog-riched_disable_ns_mediawiki_talk' => 'Disable rich editor within the "{{ns:MediaWiki_talk}}" namespace',
 26+ 'tog-riched_disable_ns_template' => 'Disable rich editor within the "{{ns:Template}}" namespace',
 27+ 'tog-riched_disable_ns_template_talk' => 'Disable rich editor within the "{{ns:Template_talk}}" namespace',
 28+ 'tog-riched_disable_ns_help' => 'Disable rich editor within the "{{ns:Help}}" namespace',
 29+ 'tog-riched_disable_ns_help_talk' => 'Disable rich editor within the "{{ns:Help_talk}}" namespace',
 30+ 'tog-riched_disable_ns_category' => 'Disable rich editor within the "{{ns:Category}}" namespace',
 31+ 'tog-riched_disable_ns_category_talk' => 'Disable rich editor within the "{{ns:Category_talk}}" namespace',
 32+ 'rich_editor_new_window' => 'Open Rich editor in new window',
 33+ 'tog-riched_start_disabled' => 'Start with rich editor disabled',
 34+ 'tog-riched_use_popup' => 'Open rich editor in a popup',
 35+ 'tog-riched_use_toggle' => 'Use toggle to switch between wikitext and rich editor (replace textarea with rich editor)',
 36+ 'tog-riched_toggle_remember_state' => 'Remember last toggle state',
 37+);
 38+
 39+/** Arabic (العربية) */
 40+$messages['ar'] = array(
 41+ 'textrichditor' => 'محرر متقدم',
 42+ 'tog-riched_disable' => 'عطل المحرر المتقدم',
 43+ 'tog-riched_disable_ns_main' => 'عطل المحرر المتقدم في النطاق الرئيسي',
 44+ 'tog-riched_disable_ns_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Talk}}"',
 45+ 'tog-riched_disable_ns_user' => 'عطل المحرر المتقدم في نطاق "{{ns:User}}"',
 46+ 'tog-riched_disable_ns_user_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:User_talk}}"',
 47+ 'tog-riched_disable_ns_project' => 'عطل المحرر المتقدم في نطاق "{{ns:Project}}"',
 48+ 'tog-riched_disable_ns_project_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Project_talk}}"',
 49+ 'tog-riched_disable_ns_image' => 'عطل المحرر المتقدم في نطاق "{{ns:Image}}"',
 50+ 'tog-riched_disable_ns_image_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Image_talk}}"',
 51+ 'tog-riched_disable_ns_mediawiki' => 'عطل المحرر المتقدم في نطاق "{{ns:MediaWiki}}"',
 52+ 'tog-riched_disable_ns_mediawiki_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:MediaWiki_talk}}"',
 53+ 'tog-riched_disable_ns_template' => 'عطل المحرر المتقدم في نطاق "{{ns:Template}}"',
 54+ 'tog-riched_disable_ns_template_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Template_talk}}"',
 55+ 'tog-riched_disable_ns_help' => 'عطل المحرر المتقدم في نطاق "{{ns:Help}}"',
 56+ 'tog-riched_disable_ns_help_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Help_talk}}"',
 57+ 'tog-riched_disable_ns_category' => 'عطل المحرر المتقدم في نطاق "{{ns:Category}}"',
 58+ 'tog-riched_disable_ns_category_talk' => 'عطل المحرر المتقدم في نطاق "{{ns:Category_talk}}"',
 59+);
 60+
 61+/** German (Deutsch) */
 62+$messages['de'] = array(
 63+ 'textrichditor' => 'Rich Editor',
 64+ 'tog-riched_disable' => 'Rich editor deaktivieren',
 65+ 'tog-riched_disable_ns_main' => 'Rich editor deaktivieren im Haupt-Namensraum',
 66+ 'tog-riched_disable_ns_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Talk}}" ',
 67+ 'tog-riched_disable_ns_user' => 'Rich editor deaktivieren im Namensraum "{{ns:User}}" ',
 68+ 'tog-riched_disable_ns_user_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:User_talk}}" ',
 69+ 'tog-riched_disable_ns_project' => 'Rich editor deaktivieren im Namensraum "{{ns:Project}}" ',
 70+ 'tog-riched_disable_ns_project_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Project_talk}}" ',
 71+ 'tog-riched_disable_ns_image' => 'Rich editor deaktivieren im Namensraum "{{ns:Image}}" ',
 72+ 'tog-riched_disable_ns_image_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Image_talk}}" ',
 73+ 'tog-riched_disable_ns_mediawiki' => 'Rich editor deaktivieren im Namensraum "{{ns:MediaWiki}}" ',
 74+ 'tog-riched_disable_ns_mediawiki_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:MediaWiki_talk}}" ',
 75+ 'tog-riched_disable_ns_template' => 'Rich editor deaktivieren im Namensraum "{{ns:Template}}" ',
 76+ 'tog-riched_disable_ns_template_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Template_talk}}" ',
 77+ 'tog-riched_disable_ns_help' => 'Rich editor deaktivieren im Namensraum "{{ns:Help}}" ',
 78+ 'tog-riched_disable_ns_help_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Help_talk}}" ',
 79+ 'tog-riched_disable_ns_category' => 'Rich editor deaktivieren im Namensraum "{{ns:Category}}" ',
 80+ 'tog-riched_disable_ns_category_talk' => 'Rich editor deaktivieren im Namensraum "{{ns:Category_talk}}" ',
 81+);
 82+
 83+/** Spanish (Español) */
 84+$messages['es'] = array(
 85+ 'textrichditor' => 'Editor enriquecido',
 86+ 'tog-riched_disable' => 'Desactivar editor enriquecido',
 87+ 'tog-riched_disable_ns_main' => 'Desactivar editor enriquecido en el espacio de nombres principal',
 88+ 'tog-riched_disable_ns_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Talk}}"',
 89+ 'tog-riched_disable_ns_user' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:User}}"',
 90+ 'tog-riched_disable_ns_user_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:User_talk}}"',
 91+ 'tog-riched_disable_ns_project' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Project}}"',
 92+ 'tog-riched_disable_ns_project_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Project_talk}}"',
 93+ 'tog-riched_disable_ns_image' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Image}}"',
 94+ 'tog-riched_disable_ns_image_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Image_talk}}"',
 95+ 'tog-riched_disable_ns_mediawiki' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:MediaWiki}}"',
 96+ 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:MediaWiki_talk}}"',
 97+ 'tog-riched_disable_ns_template' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Template}}"',
 98+ 'tog-riched_disable_ns_template_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Template_talk}}"',
 99+ 'tog-riched_disable_ns_help' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Help}}"',
 100+ 'tog-riched_disable_ns_help_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Help_talk}}"',
 101+ 'tog-riched_disable_ns_category' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Category}}"',
 102+ 'tog-riched_disable_ns_category_talk' => 'Desactivar editor enriquecido en el espacio de nombres "{{ns:Category_talk}}"',
 103+ 'rich_editor_new_window' => 'Abrir el editor enriquecido en una nueva ventana',
 104+ 'tog-riched_start_disabled' => 'Empezar con el editor enriquecido desactivado',
 105+ 'tog-riched_use_popup' => 'Abrir editor enriquecido en un popup',
 106+ 'tog-riched_use_toggle' => 'Utilizar un selector para cambiar entre wikitext y editor enriquecido',
 107+ 'tog-riched_toggle_remember_state' => 'Recordar la última selección del editor',
 108+);
 109+
 110+/** Finnish (Suomi)
 111+ * @author Jack Phoenix <jack@countervandalism.net>
 112+ */
 113+$messages['fi'] = array(
 114+ 'textrichditor' => 'Rikas editori',
 115+ 'tog-riched_disable' => 'Ota rikas editori pois käytöstä',
 116+ 'tog-riched_disable_ns_main' => 'Ota rikas editori pois käytöstä päänimiavaruudessa',
 117+ 'tog-riched_disable_ns_talk' => 'Ota rikas editori pois käytöstä "{{ns:Talk}}" -nimiavaruudessa',
 118+ 'tog-riched_disable_ns_user' => 'Ota rikas editori pois käytöstä "{{ns:User}}" -nimiavaruudessa',
 119+ 'tog-riched_disable_ns_user_talk' => 'Ota rikas editori pois käytöstä "{{ns:User_talk}}" -nimiavaruudessa',
 120+ 'tog-riched_disable_ns_project' => 'Ota rikas editori pois käytöstä "{{ns:Project}}" -nimiavaruudessa',
 121+ 'tog-riched_disable_ns_project_talk' => 'Ota rikas editori pois käytöstä "{{ns:Project_talk}}" -nimiavaruudessa',
 122+ 'tog-riched_disable_ns_image' => 'Ota rikas editori pois käytöstä "{{ns:Image}}" -nimiavaruudessa',
 123+ 'tog-riched_disable_ns_image_talk' => 'Ota rikas editori pois käytöstä "{{ns:Image_talk}}" -nimiavaruudessa',
 124+ 'tog-riched_disable_ns_mediawiki' => 'Ota rikas editori pois käytöstä "{{ns:MediaWiki}}" -nimiavaruudessa',
 125+ 'tog-riched_disable_ns_mediawiki_talk' => 'Ota rikas editori pois käytöstä "{{ns:MediaWiki_talk}}" -nimiavaruudessa',
 126+ 'tog-riched_disable_ns_template' => 'Ota rikas editori pois käytöstä "{{ns:Template}}" -nimiavaruudessa',
 127+ 'tog-riched_disable_ns_template_talk' => 'Ota rikas editori pois käytöstä "{{ns:Template_talk}}" -nimiavaruudessa',
 128+ 'tog-riched_disable_ns_help' => 'Ota rikas editori pois käytöstä "{{ns:Help}}" -nimiavaruudessa',
 129+ 'tog-riched_disable_ns_help_talk' => 'Ota rikas editori pois käytöstä "{{ns:Help_talk}}" -nimiavaruudessa',
 130+ 'tog-riched_disable_ns_category' => 'Ota rikas editori pois käytöstä "{{ns:Category}}" -nimiavaruudessa',
 131+ 'tog-riched_disable_ns_category_talk' => 'Ota rikas editori pois käytöstä "{{ns:Category_talk}}" -nimiavaruudessa',
 132+ 'rich_editor_new_window' => 'Avaa rikas editori uudessa ikkunassa',
 133+ 'tog-riched_start_disabled' => 'Aloita niin, että rikas editori on oletuksena pois käytöstä',
 134+ 'tog-riched_use_popup' => 'Avaa rikas editori popup-ikkunassa',
 135+ 'tog-riched_use_toggle' => 'Käytä nappulaa vaihtaaksesi wikitekstin ja rikkaan editorin välillä (korvaa tekstialue rikkaalla editorilla)',
 136+ 'tog-riched_toggle_remember_state' => 'Muista viimeisin nappulan asento',
 137+);
 138+
 139+/** Persian (فارسی) */
 140+$messages['fa'] = array(
 141+ 'textrichditor' => 'ويرايشگر پيشرفته',
 142+ 'tog-riched_disable' => 'غيرفعال کردن ويرايشگر پيشرفته',
 143+ 'tog-riched_disable_ns_main' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام اصلي',
 144+ 'tog-riched_disable_ns_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Talk}}"',
 145+ 'tog-riched_disable_ns_user' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:User}}"',
 146+ 'tog-riched_disable_ns_user_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:User_talk}}"',
 147+ 'tog-riched_disable_ns_project' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Project}}"',
 148+ 'tog-riched_disable_ns_project_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Project_talk}}"',
 149+ 'tog-riched_disable_ns_image' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Image}}"',
 150+ 'tog-riched_disable_ns_image_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Image_talk}}"',
 151+ 'tog-riched_disable_ns_mediawiki' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:MediaWiki}}"',
 152+ 'tog-riched_disable_ns_mediawiki_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:MediaWiki_talk}}"',
 153+ 'tog-riched_disable_ns_template' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Template}}"',
 154+ 'tog-riched_disable_ns_template_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Template_talk}}"',
 155+ 'tog-riched_disable_ns_help' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Help}}"',
 156+ 'tog-riched_disable_ns_help_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Help_talk}}"',
 157+ 'tog-riched_disable_ns_category' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Category}}"',
 158+ 'tog-riched_disable_ns_category_talk' => 'غيرفعال کردن ويرايشگر پيشرفته در فضاي نام "{{ns:Category_talk}}"',
 159+);
 160+
 161+/** French (Français) */
 162+$messages['fr'] = array(
 163+ 'textrichditor' => "''Rich Editor''",
 164+ 'tog-riched_disable' => "Désactiver ''Rich Editor''",
 165+ 'tog-riched_disable_ns_main' => "Désactiver ''Rich Editor'' dans l'espace de noms principal.",
 166+ 'tog-riched_disable_ns_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Talk}}''.",
 167+ 'tog-riched_disable_ns_user' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:User}}''.",
 168+ 'tog-riched_disable_ns_user_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:User_talk}}''.",
 169+ 'tog-riched_disable_ns_project' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Project}}''.",
 170+ 'tog-riched_disable_ns_project_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Project_talk}}''.",
 171+ 'tog-riched_disable_ns_image' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Image}}''.",
 172+ 'tog-riched_disable_ns_image_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Image_talk}}''.",
 173+ 'tog-riched_disable_ns_mediawiki' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:MediaWiki}}''.",
 174+ 'tog-riched_disable_ns_mediawiki_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:MediaWiki_talk}}''.",
 175+ 'tog-riched_disable_ns_template' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Template}}''.",
 176+ 'tog-riched_disable_ns_template_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Template_talk}}''.",
 177+ 'tog-riched_disable_ns_help' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Help}}''.",
 178+ 'tog-riched_disable_ns_help_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Help_talk}}''.",
 179+ 'tog-riched_disable_ns_category' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Category}}''.",
 180+ 'tog-riched_disable_ns_category_talk' => "Désactiver ''Rich Editor'' dans l'espace de noms ''{{ns:Category_talk}}''.",
 181+ 'rich_editor_new_window' => 'Ouvrir "Rich Editor" dans une nouvelle fenêtre',
 182+ 'tog-riched_start_disabled' => 'Démarrer avec le "Rich Editor" désactive',
 183+ 'tog-riched_use_popup' => 'Ouvrir "Rich Editor" dans une popup',
 184+ 'tog-riched_use_toggle' => 'Donner la possibilité de changer entre l\'éditeur original WikiText et "Rich Editor"',
 185+ 'tog-riched_toggle_remember_state' => 'Se souvenir de la dernière selection du éditeur',
 186+);
 187+
 188+/** Galician (Galego) */
 189+$messages['gl'] = array(
 190+ 'textrichditor' => 'Editor Rico',
 191+ 'tog-riched_disable' => 'Desactivar o editor rico',
 192+ 'tog-riched_disable_ns_main' => 'Desactivar o editor rico no espazo de nomes principal',
 193+ 'tog-riched_disable_ns_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Talk}}"',
 194+ 'tog-riched_disable_ns_user' => 'Desactivar o editor rico no espazo de nomes "{{ns:User}}"',
 195+ 'tog-riched_disable_ns_user_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:User_Talk}}"',
 196+ 'tog-riched_disable_ns_project' => 'Desactivar o editor rico no espazo de nomes "{{ns:Project}}"',
 197+ 'tog-riched_disable_ns_project_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Project_Talk}}"',
 198+ 'tog-riched_disable_ns_image' => 'Desactivar o editor rico no espazo de nomes "{{ns:Image}}"',
 199+ 'tog-riched_disable_ns_image_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Image_talk}}"',
 200+ 'tog-riched_disable_ns_mediawiki' => 'Desactivar o editor rico no espazo de nomes "{{ns:MediaWiki}}"',
 201+ 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:MediaWiki_talk}}"',
 202+ 'tog-riched_disable_ns_template' => 'Desactivar o editor rico no espazo de nomes "{{ns:Template}}"',
 203+ 'tog-riched_disable_ns_template_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Template_talk}}"',
 204+ 'tog-riched_disable_ns_help' => 'Desactivar o editor rico no espazo de nomes "{{ns:Help}}"',
 205+ 'tog-riched_disable_ns_help_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Help_talk}}"',
 206+ 'tog-riched_disable_ns_category' => 'Desactivar o editor rico no espazo de nomes "{{ns:Category}}"',
 207+ 'tog-riched_disable_ns_category_talk' => 'Desactivar o editor rico no espazo de nomes "{{ns:Category_talk}}"',
 208+ 'rich_editor_new_window' => 'Abrir editor enriquecido nunha nova ventana',
 209+ 'tog-riched_start_disabled' => 'Comenzar con o editor enriquecido desactivado',
 210+ 'tog-riched_use_popup' => 'Abrir o editor enriquecido nun popup',
 211+ 'tog-riched_use_toggle' => 'Utilizar un selector para cambiar entre wikitext e o editor enriquecido',
 212+ 'tog-riched_toggle_remember_state' => 'Recordar a última selección do editor',
 213+);
 214+
 215+/** Hebrew (עברית) */
 216+$messages['he'] = array(
 217+ 'textrichditor' => 'עורך עשיר',
 218+ 'tog-riched_disable' => 'כבה את העורך העשיר',
 219+ 'tog-riched_disable_ns_main' => 'כבה את העורך העשיר במרחב השם הראשי',
 220+ 'tog-riched_disable_ns_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Talk}}"',
 221+ 'tog-riched_disable_ns_user' => 'כבה את העורך העשיר במרחב השם "{{ns:User}}"',
 222+ 'tog-riched_disable_ns_user_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:User_talk}}"',
 223+ 'tog-riched_disable_ns_project' => 'כבה את העורך העשיר במרחב השם "{{ns:Project}}"',
 224+ 'tog-riched_disable_ns_project_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Project_talk}}"',
 225+ 'tog-riched_disable_ns_image' => 'כבה את העורך העשיר במרחב השם "{{ns:Image}}"',
 226+ 'tog-riched_disable_ns_image_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Image_talk}}"',
 227+ 'tog-riched_disable_ns_mediawiki' => 'כבה את העורך העשיר במרחב השם "{{ns:MediaWiki}}"',
 228+ 'tog-riched_disable_ns_mediawiki_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:MediaWiki_talk}}"',
 229+ 'tog-riched_disable_ns_template' => 'כבה את העורך העשיר במרחב השם "{{ns:Template}}"',
 230+ 'tog-riched_disable_ns_template_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Template_talk}}"',
 231+ 'tog-riched_disable_ns_help' => 'כבה את העורך העשיר במרחב השם "{{ns:Help}}"',
 232+ 'tog-riched_disable_ns_help_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Help_talk}}"',
 233+ 'tog-riched_disable_ns_category' => 'כבה את העורך העשיר במרחב השם "{{ns:Category}}"',
 234+ 'tog-riched_disable_ns_category_talk' => 'כבה את העורך העשיר במרחב השם "{{ns:Category_talk}}"',
 235+ 'rich_editor_new_window' => 'פתח את העורך העשיר בחלון חדש',
 236+ 'tog-riched_start_disabled' => 'התחל עם העורך העשיר כבוי',
 237+ 'tog-riched_use_popup' => 'פתח את העורך העשיר בחלון קופץ',
 238+ 'tog-riched_use_toggle' => 'השתמש במתג כדי להחליף בין ויקיטקסט והעורך העשיר (החלף את אזור הטקסט עם העורך העשיר)',
 239+ 'tog-riched_toggle_remember_state' => 'זכור את מצב המתג האחרון',
 240+);
 241+
 242+/** Upper Sorbian (Hornjoserbsce) */
 243+$messages['hsb'] = array(
 244+ 'textrichditor' => 'Rich editor',
 245+ 'tog-riched_disable' => 'Rich editor deaktiwizować',
 246+ 'tog-riched_disable_ns_main' => 'Rich editor znutřka hłowneho mjenoweho ruma deaktiwizować',
 247+ 'tog-riched_disable_ns_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Talk}}" deaktiwizować',
 248+ 'tog-riched_disable_ns_user' => 'Rich editor znutřka mjenoweho ruma "{{ns:User}}" deaktiwizować',
 249+ 'tog-riched_disable_ns_user_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:User_talk}}" deaktiwizować',
 250+ 'tog-riched_disable_ns_project' => 'Rich editor znutřka mjenoweho ruma "{{ns:Project}}" deaktiwizować',
 251+ 'tog-riched_disable_ns_project_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Project_talk}}" deaktiwizować',
 252+ 'tog-riched_disable_ns_image' => 'Rich editor znutřka mjenoweho ruma "{{ns:Image}}" deaktiwizować',
 253+ 'tog-riched_disable_ns_image_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Image_talk}}" deaktiwizować',
 254+ 'tog-riched_disable_ns_mediawiki' => 'Rich editor znutřka mjenoweho ruma "{{ns:MediaWiki}}" deaktiwizować',
 255+ 'tog-riched_disable_ns_mediawiki_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:MediaWiki_talk}}" deaktiwizować',
 256+ 'tog-riched_disable_ns_template' => 'Rich editor znutřka mjenoweho ruma "{{ns:Template}}" deaktiwizować',
 257+ 'tog-riched_disable_ns_template_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Template_talk}}" deaktiwizować',
 258+ 'tog-riched_disable_ns_help' => 'Rich editor znutřka mjenoweho ruma "{{ns:Help}}" deaktiwizować',
 259+ 'tog-riched_disable_ns_help_talk' => 'Rich editor znutřka mjenoweho ruma "{{ns:Help_talk}}" deaktiwizować',
 260+ 'tog-riched_disable_ns_category' => 'Rich editor znutřka mjenoweho ruma the "{{ns:Category}}" deaktiwizować',
 261+ 'tog-riched_disable_ns_category_talk' => 'Rich editor znutřka mjenoweho ruma the "{{ns:Category_talk}}" deaktiwizować',
 262+);
 263+
 264+/** Korean (한국어) */
 265+$messages['ko'] = array(
 266+ 'textrichditor' => '리치 에디터',
 267+ 'tog-riched_disable' => '리치 에디터 사용하지 않기',
 268+ 'tog-riched_disable_ns_main' => '주 이름 공간에서 리치 에디어 사용하지 않기',
 269+ 'tog-riched_disable_ns_talk' => '"{{ns:Talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
 270+ 'tog-riched_disable_ns_user' => '"{{ns:User}}" 이름 공간에서 리치 에디어 사용하지 않기',
 271+ 'tog-riched_disable_ns_user_talk' => '"{{ns:User_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
 272+ 'tog-riched_disable_ns_project' => '"{{ns:Project}}" 이름 공간에서 리치 에디어 사용하지 않기',
 273+ 'tog-riched_disable_ns_project_talk' => '"{{ns:Project_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
 274+ 'tog-riched_disable_ns_image' => '"{{ns:Image}}" 이름 공간에서 리치 에디어 사용하지 않기',
 275+ 'tog-riched_disable_ns_image_talk' => '"{{ns:Image_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
 276+ 'tog-riched_disable_ns_mediawiki' => '"{{ns:MediaWiki}}" 이름 공간에서 리치 에디어 사용하지 않기',
 277+ 'tog-riched_disable_ns_mediawiki_talk' => '"{{ns:MediaWiki_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
 278+ 'tog-riched_disable_ns_template' => '"{{ns:Template}}" 이름 공간에서 리치 에디어 사용하지 않기',
 279+ 'tog-riched_disable_ns_template_talk' => '"{{ns:Template_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
 280+ 'tog-riched_disable_ns_help' => '"{{ns:Help}}" 이름 공간에서 리치 에디어 사용하지 않기',
 281+ 'tog-riched_disable_ns_help_talk' => '"{{ns:Help_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
 282+ 'tog-riched_disable_ns_category' => '"{{ns:Category}}" 이름 공간에서 리치 에디어 사용하지 않기',
 283+ 'tog-riched_disable_ns_category_talk' => '"{{ns:Category_talk}}" 이름 공간에서 리치 에디어 사용하지 않기',
 284+ 'rich_editor_new_window' => '새 창에 리치 에디터 열기',
 285+ 'tog-riched_start_disabled' => '리치 에디터를 끈 채로 시작하기',
 286+ 'tog-riched_use_popup' => '팝업 창에 리치 에디터 열기',
 287+ 'tog-riched_use_toggle' => '토글을 이용해 위키텍스트와 리치 에디터를 오가기 (텍스트영역을 리치 에디터로 대체하기)',
 288+ 'tog-riched_toggle_remember_state' => '마지막 토글 상태를 기억하기',
 289+);
 290+
 291+/** Dutch (Nederlands) */
 292+$messages['nl'] = array(
 293+ 'textrichditor' => 'Uitgebreide editor',
 294+ 'tog-riched_disable' => 'Uitgebreide editor uitschakelen',
 295+ 'tog-riched_disable_ns_main' => 'Uitgebreide editor uitschakelen binnen de hoofdnaamruimte',
 296+ 'tog-riched_disable_ns_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Talk}}"',
 297+ 'tog-riched_disable_ns_user' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:User}}"',
 298+ 'tog-riched_disable_ns_user_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:User_talk}}"',
 299+ 'tog-riched_disable_ns_project' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Project}}"',
 300+ 'tog-riched_disable_ns_project_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Project_talk}}"',
 301+ 'tog-riched_disable_ns_image' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Image}}"',
 302+ 'tog-riched_disable_ns_image_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Image_talk}}"',
 303+ 'tog-riched_disable_ns_mediawiki' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:MediaWiki}}"',
 304+ 'tog-riched_disable_ns_mediawiki_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:MediaWiki_talk}}"',
 305+ 'tog-riched_disable_ns_template' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Template}}"',
 306+ 'tog-riched_disable_ns_template_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Template_talk}}"',
 307+ 'tog-riched_disable_ns_help' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Help}}"',
 308+ 'tog-riched_disable_ns_help_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Help_talk}}"',
 309+ 'tog-riched_disable_ns_category' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Category}}"',
 310+ 'tog-riched_disable_ns_category_talk' => 'Uitgebreide editor uitschakelen binnen de naamruimte "{{ns:Category_talk}}"',
 311+);
 312+
 313+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬) */
 314+$messages['no'] = array(
 315+ 'textrichditor' => 'Rik tekstredigering',
 316+ 'tog-riched_disable' => 'Slå av rik tekstredigering',
 317+ 'tog-riched_disable_ns_main' => 'Slå av rik tekstredigering i hovednavnerommet',
 318+ 'tog-riched_disable_ns_talk' => 'Slå av rik tekstredigering i «{{ns:Talk}}»-navnerommet',
 319+ 'tog-riched_disable_ns_user' => 'Slå av rik tekstredigering i «{{ns:User}}»-navnerommet',
 320+ 'tog-riched_disable_ns_user_talk' => 'Slå av rik tekstredigering i «{{ns:User_talk}}»-navnerommet',
 321+ 'tog-riched_disable_ns_project' => 'Slå av rik tekstredigering i «{{ns:Project}}»-navnerommet',
 322+ 'tog-riched_disable_ns_project_talk' => 'Slå av rik tekstredigering i «{{ns:Project_talk}}»-navnerommet',
 323+ 'tog-riched_disable_ns_image' => 'Slå av rik tekstredigering i «{{ns:Image}}»-navnerommet',
 324+ 'tog-riched_disable_ns_image_talk' => 'Slå av rik tekstredigering i «{{ns:Image_talk}}»-navnerommet',
 325+ 'tog-riched_disable_ns_template' => 'Slå av rik tekstredigering i «{{ns:Template}}»-navnerommet',
 326+ 'tog-riched_disable_ns_template_talk' => 'Slå av rik tekstredigering i «{{ns:Template_talk}}»-navnerommet',
 327+ 'tog-riched_disable_ns_help' => 'Slå av rik tekstredigering i «{{ns:Help}}»-navnerommet',
 328+ 'tog-riched_disable_ns_help_talk' => 'Slå av rik tekstredigering i «{{ns:Help_talk}}»-navnerommet',
 329+ 'tog-riched_disable_ns_category' => 'Slå av rik tekstredigering i «{{ns:Category}}»-navnerommet',
 330+ 'tog-riched_disable_ns_category_talk' => 'Slå av rik tekstredigering i «{{ns:Category_talk}}»-navnerommet',
 331+);
 332+
 333+/** Occitan (Occitan) */
 334+$messages['oc'] = array(
 335+ 'textrichditor' => "''Rich Editor''",
 336+ 'tog-riched_disable' => "Desactivar ''Rich Editor''",
 337+ 'tog-riched_disable_ns_main' => "Desactivar ''Rich Editor'' dins l'espaci de noms principal.",
 338+ 'tog-riched_disable_ns_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Talk}}''.",
 339+ 'tog-riched_disable_ns_user' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:User}}''.",
 340+ 'tog-riched_disable_ns_user_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:User_talk}}''.",
 341+ 'tog-riched_disable_ns_project' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Project}}''.",
 342+ 'tog-riched_disable_ns_project_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Project_talk}}''.",
 343+ 'tog-riched_disable_ns_image' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Image}}''.",
 344+ 'tog-riched_disable_ns_image_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Image_talk}}''.",
 345+ 'tog-riched_disable_ns_mediawiki' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Image_talk}}''.",
 346+ 'tog-riched_disable_ns_mediawiki_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:MediaWiki_talk}}''.",
 347+ 'tog-riched_disable_ns_template' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Template}}''.",
 348+ 'tog-riched_disable_ns_template_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Template_talk}}''.",
 349+ 'tog-riched_disable_ns_help' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Help}}''.",
 350+ 'tog-riched_disable_ns_help_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Help_talk}}''.",
 351+ 'tog-riched_disable_ns_category' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Category}}''.",
 352+ 'tog-riched_disable_ns_category_talk' => "Desactivar ''Rich Editor'' dins l'espaci de noms ''{{ns:Category_talk}}''.",
 353+);
 354+
 355+/** Polish (Polski) */
 356+$messages['pl'] = array(
 357+ 'textrichditor' => 'Rich Editor',
 358+ 'rich_editor_new_window' => 'Otwórz rich editor w nowym oknie',
 359+ 'tog-riched_disable' => 'Wyłącz Rich Editora',
 360+ 'tog-riched_disable_ns_main' => 'Wyłącz Rich Editora wewątrz głównej przestrzeni nazw',
 361+ 'tog-riched_disable_ns_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Talk}}"',
 362+ 'tog-riched_disable_ns_user' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:User}}"',
 363+ 'tog-riched_disable_ns_user_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:User_talk}}"',
 364+ 'tog-riched_disable_ns_project' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Project}}"',
 365+ 'tog-riched_disable_ns_project_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Project_talk}}"',
 366+ 'tog-riched_disable_ns_image' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Image}}"',
 367+ 'tog-riched_disable_ns_image_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Image_talk}}"',
 368+ 'tog-riched_disable_ns_mediawiki' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:MediaWiki}}"',
 369+ 'tog-riched_disable_ns_mediawiki_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:MediaWiki_talk}}"',
 370+ 'tog-riched_disable_ns_template' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Template}}"',
 371+ 'tog-riched_disable_ns_template_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Template_talk}}"',
 372+ 'tog-riched_disable_ns_help' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Help}}"',
 373+ 'tog-riched_disable_ns_help_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Help_talk}}"',
 374+ 'tog-riched_disable_ns_category' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Category}}"',
 375+ 'tog-riched_disable_ns_category_talk' => 'Wyłącz Rich Editora wewątrz przestrzeni nazw "{{ns:Category_talk}}"',
 376+ 'tog-riched_start_disabled' => 'Rich editor domyślnie wyłączony',
 377+ 'tog-riched_use_popup' => 'Pozwól otwierać Rich Editor w okienku popup',
 378+ 'tog-riched_use_toggle' => 'Pozwól otwierać Rich Editor na żądanie (zastąpi domyślne pole textarea)',
 379+ 'tog-riched_toggle_remember_state' => 'Zapamiętuj ostatni stan Rich Editora',
 380+);
 381+
 382+/** Piedmontese (Piemontèis) */
 383+$messages['pms'] = array(
 384+ 'textrichditor' => 'Editor svicio',
 385+ 'tog-riched_disable' => "Disabilité l'editor svicio",
 386+ 'tog-riched_disable_ns_main' => "Disabilité l'editor svicio ant lë spassi nominal prinsipal",
 387+ 'tog-riched_disable_ns_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Talk}}"',
 388+ 'tog-riched_disable_ns_user' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:User}}"',
 389+ 'tog-riched_disable_ns_user_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:User_talk}}"',
 390+ 'tog-riched_disable_ns_project' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Project}}"',
 391+ 'tog-riched_disable_ns_project_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Project_talk}}"',
 392+ 'tog-riched_disable_ns_image' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Image}}"',
 393+ 'tog-riched_disable_ns_image_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Image_talk}}"',
 394+ 'tog-riched_disable_ns_mediawiki' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:MediaWiki}}"',
 395+ 'tog-riched_disable_ns_mediawiki_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:MediaWiki_talk}}"',
 396+ 'tog-riched_disable_ns_template' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Template}}"',
 397+ 'tog-riched_disable_ns_template_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Template_talk}}"',
 398+ 'tog-riched_disable_ns_help' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Help}}"',
 399+ 'tog-riched_disable_ns_help_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Help_talk}}"',
 400+ 'tog-riched_disable_ns_category' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Category}}"',
 401+ 'tog-riched_disable_ns_category_talk' => 'Disabilité l\'editor svicio ant lë spassi nominal "{{ns:Category_talk}}"',
 402+);
 403+
 404+/** Portuguese (Português) */
 405+$messages['pt'] = array(
 406+ 'textrichditor' => 'Editor Rico',
 407+ 'tog-riched_disable' => 'Desactivar editor rico',
 408+ 'tog-riched_disable_ns_main' => 'Desactivar editor rico no espaço nominal principal',
 409+ 'tog-riched_disable_ns_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Talk}}"',
 410+ 'tog-riched_disable_ns_user' => 'Desactivar editor rico no espaço nominal "{{ns:User}}"',
 411+ 'tog-riched_disable_ns_user_talk' => 'Desactivar editor rico no espaço nominal "{{ns:User_talk}}"',
 412+ 'tog-riched_disable_ns_project' => 'Desactivar editor rico no espaço nominal "{{ns:Project}}"',
 413+ 'tog-riched_disable_ns_project_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Project_talk}}"',
 414+ 'tog-riched_disable_ns_image' => 'Desactivar editor rico no espaço nominal "{{ns:Image}}"',
 415+ 'tog-riched_disable_ns_image_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Image_talk}}"',
 416+ 'tog-riched_disable_ns_mediawiki' => 'Desactivar editor rico no espaço nominal "{{ns:MediaWiki}}"',
 417+ 'tog-riched_disable_ns_mediawiki_talk' => 'Desactivar editor rico no espaço nominal "{{ns:MediaWiki_talk}}"',
 418+ 'tog-riched_disable_ns_template' => 'Desactivar editor rico no espaço nominal "{{ns:Template}}"',
 419+ 'tog-riched_disable_ns_template_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Template_talk}}"',
 420+ 'tog-riched_disable_ns_help' => 'Desactivar editor rico no espaço nominal "{{ns:Help}}"',
 421+ 'tog-riched_disable_ns_help_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Help_talk}}"',
 422+ 'tog-riched_disable_ns_category' => 'Desactivar editor rico no espaço nominal "{{ns:Category}}"',
 423+ 'tog-riched_disable_ns_category_talk' => 'Desactivar editor rico no espaço nominal "{{ns:Category_talk}}"',
 424+);
 425+
 426+/** Slovak (Slovenčina) */
 427+$messages['sk'] = array(
 428+ 'textrichditor' => 'Editor formátovaného textu',
 429+ 'tog-riched_disable' => 'Vypnúť editor formátovaného textu',
 430+ 'tog-riched_disable_ns_main' => 'Vypnúť editor formátovaného textu v hlavnom mennom priestore',
 431+ 'tog-riched_disable_ns_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Talk}}“',
 432+ 'tog-riched_disable_ns_user' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:User}}“',
 433+ 'tog-riched_disable_ns_user_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:User_talk}}“',
 434+ 'tog-riched_disable_ns_project' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Project}}“',
 435+ 'tog-riched_disable_ns_project_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Project_talk}}“',
 436+ 'tog-riched_disable_ns_image' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Image}}“',
 437+ 'tog-riched_disable_ns_image_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Image_talk}}“',
 438+ 'tog-riched_disable_ns_mediawiki' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:MediaWiki}}“',
 439+ 'tog-riched_disable_ns_mediawiki_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:MediaWiki_talk}}“',
 440+ 'tog-riched_disable_ns_template' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Template}}“',
 441+ 'tog-riched_disable_ns_template_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Template_talk}}“',
 442+ 'tog-riched_disable_ns_help' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Help}}“',
 443+ 'tog-riched_disable_ns_help_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Help_talk}}“',
 444+ 'tog-riched_disable_ns_category' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Category}}“',
 445+ 'tog-riched_disable_ns_category_talk' => 'Vypnúť editor formátovaného textu v mennom priestore „{{ns:Category_talk}}“',
 446+);
 447+
 448+/** Swedish (Svenska) */
 449+$messages['sv'] = array(
 450+ 'textrichditor' => 'Grafiskt läge',
 451+ 'tog-riched_disable' => 'Inaktivera grafiskt läge',
 452+ 'tog-riched_disable_ns_main' => 'Inaktivera grafiskt läge i huvudnamnrymden',
 453+ 'tog-riched_disable_ns_talk' => 'Inaktivera grafiskt läge i "{{ns:Talk}}" namnrymden',
 454+ 'tog-riched_disable_ns_user' => 'Inaktivera grafiskt läge i "{{ns:User}}" namnrymden',
 455+ 'tog-riched_disable_ns_user_talk' => 'Inaktivera grafiskt läge i "{{ns:User_talk}}" namnrymden',
 456+ 'tog-riched_disable_ns_project' => 'Inaktivera grafiskt läge i "{{ns:Project}}" namnrymden',
 457+ 'tog-riched_disable_ns_project_talk' => 'Inaktivera grafiskt läge i "{{ns:Project_talk}}" namnrymden',
 458+ 'tog-riched_disable_ns_image' => 'Inaktivera grafiskt läge i "{{ns:Image}}" namnrymden',
 459+ 'tog-riched_disable_ns_image_talk' => 'Inaktivera grafiskt läge i "{{ns:Image_talk}}" namnrymden',
 460+ 'tog-riched_disable_ns_mediawiki' => 'Inaktivera grafiskt läge i "{{ns:MediaWiki}}" namnrymden',
 461+ 'tog-riched_disable_ns_mediawiki_talk' => 'Inaktivera grafiskt läge i "{{ns:MediaWiki_talk}}" namnrymden',
 462+ 'tog-riched_disable_ns_template' => 'Inaktivera grafiskt läge i "{{ns:Template}}" namnrymden',
 463+ 'tog-riched_disable_ns_template_talk' => 'Inaktivera grafiskt läge i "{{ns:Template_talk}}" namnrymden',
 464+ 'tog-riched_disable_ns_help' => 'Inaktivera grafiskt läge i "{{ns:Help}}" namnrymden',
 465+ 'tog-riched_disable_ns_help_talk' => 'Inaktivera grafiskt läge i "{{ns:Help_talk}}" namnrymden',
 466+ 'tog-riched_disable_ns_category' => 'Inaktivera grafiskt läge i "{{ns:Category}}" namnrymden',
 467+ 'tog-riched_disable_ns_category_talk' => 'Inaktivera grafiskt läge i "{{ns:Category_talk}}" namnrymden',
 468+ 'rich_editor_new_window' => 'Öppna det grafiska läget i nytt fönster',
 469+ 'tog-riched_start_disabled' => 'Starta det grafiska läget inaktiverat',
 470+ 'tog-riched_use_popup' => 'Öppna det grafiska läget i ett popupfönster',
 471+ 'tog-riched_use_toggle' => 'Använd växla mellan wikitext och det grafiska läget (byter textruta mot grafiskt läge)',
 472+ 'tog-riched_toggle_remember_state' => 'Kom ihåg senaste val (i den grafiska editorn)',
 473+);
 474+
 475+/** Taiwan Chinese (‪中文(台灣)‬)
 476+ * @author Roc michael
 477+ */
 478+$messages['zh-tw'] = array(
 479+ 'textrichditor' => '視覺化編輯器(Rich Editor)',
 480+ 'tog-riched_disable' => '停用視覺化編輯器(rich editor)',
 481+ 'tog-riched_disable_ns_main' => '停用主名字空間的視覺化編輯器',
 482+ 'tog-riched_disable_ns_talk' => '停用"{{ns:Talk}}"名字空間的視覺化編輯器',
 483+ 'tog-riched_disable_ns_user' => '停用"{{ns:User}}"名字空間的視覺化編輯器',
 484+ 'tog-riched_disable_ns_user_talk' => '停用"{{ns:User_talk}}"名字空間的視覺化編輯器',
 485+ 'tog-riched_disable_ns_project' => '停用"{{ns:Project}}"名字空間的視覺化編輯器',
 486+ 'tog-riched_disable_ns_project_talk' => '停用"{{ns:Project_talk}}"名字空間的視覺化編輯器',
 487+ 'tog-riched_disable_ns_image' => '停用"{{ns:Image}}"名字空間的視覺化編輯器',
 488+ 'tog-riched_disable_ns_image_talk' => '停用"{{ns:Image_talk}}"名字空間的視覺化編輯器',
 489+ 'tog-riched_disable_ns_mediawiki' => '停用"{{ns:MediaWiki}}"名字空間的視覺化編輯器',
 490+ 'tog-riched_disable_ns_mediawiki_talk' => '停用"{{ns:MediaWiki_talk}}"名字空間的視覺化編輯器',
 491+ 'tog-riched_disable_ns_template' => '停用"{{ns:Template}}"名字空間的視覺化編輯器',
 492+ 'tog-riched_disable_ns_template_talk' => '停用"{{ns:Template_talk}}"名字空間的視覺化編輯器',
 493+ 'tog-riched_disable_ns_help' => '停用"{{ns:Help}}"名字空間的視覺化編輯器',
 494+ 'tog-riched_disable_ns_help_talk' => '停用"{{ns:Help_talk}}"名字空間的視覺化編輯器',
 495+ 'tog-riched_disable_ns_category' => '停用"{{ns:Category}}"名字空間的視覺化編輯器',
 496+ 'tog-riched_disable_ns_category_talk' => '停用"{{ns:Category_talk}}"名字空間的視覺化編輯器',
 497+ 'rich_editor_new_window' => '於新視窗內開啟視覺化編輯器(Rich Editor)',
 498+ 'tog-riched_start_disabled' => '開始時先停用視覺化編輯器(rich editor)',
 499+ 'tog-riched_use_popup' => '於彈出視窗(popup)中使用視覺化編輯器(Rich Editor)',
 500+ 'tog-riched_use_toggle' => '在「維基文字」與「視覺化編輯器」之間以開關作切換(以視覺化編輯器取代文字編輯區)',
 501+ 'tog-riched_toggle_remember_state' => '記住最後的切換設定',
 502+);
\ No newline at end of file
Property changes on: trunk/extensions/FCKeditor/FCKeditor.i18n.php
___________________________________________________________________
Added: svn:eol-style
1503 + native
Index: trunk/extensions/FCKeditor/FCKeditorEditPage.body.php
@@ -29,17 +29,15 @@
3030 }
3131
3232 function getPreviewText() {
33 - if (!$this->isCssJsSubpage) {
 33+ if( !$this->isCssJsSubpage ) {
3434 wfRunHooks( 'EditPageBeforePreviewText', array( &$this, $this->previewOnOpen() ) );
35 - if ($this->previewOnOpen()) {
36 - $result = html_entity_decode(parent::getPreviewText());
37 - }
38 - else {
 35+ if( $this->previewOnOpen() ) {
 36+ $result = html_entity_decode( parent::getPreviewText() );
 37+ } else {
3938 $result = parent::getPreviewText();
4039 }
4140 wfRunHooks( 'EditPagePreviewTextEnd', array( &$this, $this->previewOnOpen() ) );
42 - }
43 - else {
 41+ } else {
4442 $result = parent::getPreviewText();
4543 }
4644 return $result;
@@ -47,16 +45,15 @@
4846
4947 function getContent( $def_text = '' ) {
5048 $t = parent::getContent( $def_text );
51 - if(!$this->isConflict) {
 49+ if( !$this->isConflict ) {
5250 return $t;
5351 }
5452 $options = new FCKeditorParserOptions();
55 - $options->setTidy(true);
 53+ $options->setTidy( true );
5654 $parser = new FCKeditorParser();
57 - $parser->setOutputType(OT_HTML);
58 - $pa = $parser->parse($t, $this->mTitle, $options);
 55+ $parser->setOutputType( OT_HTML );
 56+ $pa = $parser->parse( $t, $this->mTitle, $options );
5957 return $pa->mText;
60 -
6158 }
6259
6360 function getWikiContent(){
@@ -70,12 +67,12 @@
7168 */
7269 function showDiff() {
7370 global $wgFCKWikiTextBeforeParse;
74 - if (isset($wgFCKWikiTextBeforeParse)) {
 71+ if( isset( $wgFCKWikiTextBeforeParse ) ) {
7572 $_textbox1 = $this->textbox1;
7673 $this->textbox1 = $wgFCKWikiTextBeforeParse;
7774 }
78 - $result = parent::showDiff();
79 - if (isset($wgFCKWikiTextBeforeParse)) {
 75+ $result = parent::showDiff();
 76+ if( isset( $wgFCKWikiTextBeforeParse ) ) {
8077 $this->textbox1 = $_textbox1;
8178 }
8279 }
Index: trunk/extensions/FCKeditor/FCKeditor.php
@@ -1,14 +1,15 @@
22 <?php
3 -
4 -# Not a valid entry point, skip unless MEDIAWIKI is defined
5 -if (!defined('MEDIAWIKI')) {
6 - echo <<<HEREDOC
7 -To install FCKeditor extension, put the following line in LocalSettings.php:
8 -require_once( "\$IP/extensions/FCKeditor/FCKeditor.php" );
9 -HEREDOC;
10 - exit( 1 );
11 -}
12 -
 3+/**
 4+ * FCKeditor extension - a WYSIWYG editor for MediaWiki
 5+ *
 6+ * @file
 7+ * @ingroup Extensions
 8+ * @version 1.0
 9+ * @author Frederico Caldeira Knabben
 10+ * @author Wiktor Walc <w.walc(at)fckeditor(dot)net>
 11+ * @copyright Copyright © Frederico Caldeira Knabben, Wiktor Walc, other FCKeditor team members and other contributors
 12+ * @license GNU Lesser General Public License 2.1 or later
 13+ */
1314 /*
1415 This library is free software; you can redistribute it and/or
1516 modify it under the terms of the GNU Lesser General Public
@@ -25,55 +26,34 @@
2627 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
2728 */
2829
29 -require_once $IP . "/includes/GlobalFunctions.php";
30 -require_once $IP . "/includes/EditPage.php";
31 -
32 -if (version_compare("1.14alpha", $wgVersion, "<=")) {
33 - require_once $IP . "/includes/parser/ParserOptions.php";
34 - require_once $IP . "/includes/parser/Parser.php";
35 - require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw14/Parser_OldPP.body.php";
36 - require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw12/FCKeditorParserWrapper.body.php";
 30+# Not a valid entry point, skip unless MEDIAWIKI is defined
 31+if( !defined( 'MEDIAWIKI' ) ) {
 32+ echo <<<HEREDOC
 33+To install FCKeditor extension, put the following line in LocalSettings.php:
 34+require_once( "\$IP/extensions/FCKeditor/FCKeditor.php" );
 35+HEREDOC;
 36+ exit( 1 );
3737 }
38 -else if (version_compare("1.13alpha", $wgVersion, "<=")) {
39 - require_once $IP . "/includes/parser/ParserOptions.php";
40 - require_once $IP . "/includes/parser/Parser_OldPP.php";
41 - require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw12/FCKeditorParserWrapper.body.php";
42 -}
43 -else if (version_compare("1.12", $wgVersion, "<")) {
44 - require_once $IP . "/includes/ParserOptions.php";
45 - require_once $IP . "/includes/Parser_OldPP.php";
46 - require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw12/FCKeditorParserWrapper.body.php";
47 -}
48 -else {
49 - require_once $IP . "/includes/ParserOptions.php";
50 - require_once $IP . "/includes/Parser.php";
51 - require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "mw11/FCKeditorParserWrapper.body.php";
52 -}
5338
54 -require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorParser.body.php";
55 -require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorSajax.body.php";
56 -require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorParserOptions.body.php";
57 -require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorSkin.body.php";
58 -require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditorEditPage.body.php";
59 -require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "FCKeditor.body.php";
60 -require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "fckeditor" . DIRECTORY_SEPARATOR . "fckeditor.php";
 39+# Configuration variables
 40+// Path to this extension
 41+$wgFCKEditorExtDir = 'extensions/FCKeditor';
6142
62 -if (empty ($wgFCKEditorExtDir)) {
63 - $wgFCKEditorExtDir = "extensions/FCKeditor";
64 -}
65 -if (empty ($wgFCKEditorDir)) {
66 - $wgFCKEditorDir = "extensions/FCKeditor/fckeditor";
67 -}
68 -if (empty ($wgFCKEditorToolbarSet)) {
69 - $wgFCKEditorToolbarSet = "Wiki";
70 -}
71 -if (empty ($wgFCKEditorHeight)) {
72 - $wgFCKEditorHeight = "0"; // "0" for automatic ("300" minimum).
73 -}
 43+// Path to the actual editor
 44+$wgFCKEditorDir = 'extensions/FCKeditor/fckeditor/';
 45+
 46+$wgFCKEditorToolbarSet = 'Wiki';
 47+
 48+// '0' for automatic ('300' minimum).
 49+$wgFCKEditorHeight = '0';
 50+
 51+// Array of namespaces that FCKeditor is disabled for. Use constants like NS_MEDIAWIKI here.
 52+$wgFCKEditorExcludedNamespaces = array();
 53+
7454 /**
7555 * Enable use of AJAX features.
7656 */
77 -$wgUseAjax = true;
 57+require_once('FCKeditorSajax.body.php');
7858 $wgAjaxExportList[] = 'wfSajaxSearchImageFCKeditor';
7959 $wgAjaxExportList[] = 'wfSajaxSearchArticleFCKeditor';
8060 $wgAjaxExportList[] = 'wfSajaxSearchCategoryFCKeditor';
@@ -84,22 +64,52 @@
8565 $wgAjaxExportList[] = 'wfSajaxSearchSpecialTagFCKeditor';
8666 $wgAjaxExportList[] = 'wfSajaxToggleFCKeditor';
8767
 68+// Extension credits that will show up on Special:Version
8869 $wgExtensionCredits['other'][] = array(
89 - 'name' => 'FCKeditor',
90 - 'author' => array('FCKeditor.net', 'Wikia'),
91 - 'version' => 'fckeditor/mw-extension $Rev$ 2008',
92 - 'url' => 'http://www.mediawiki.org/wiki/Extension:FCKeditor_%28by_FCKeditor_and_Wikia%29',
93 - 'description' => 'FCKeditor extension for editing wiki pages (WYSIWYG editor)'
 70+ 'path' => __FILE__,
 71+ 'name' => 'FCKeditor',
 72+ 'author' => array( 'Frederico Caldeira Knabben', 'Wiktor Walc', 'others', 'Jack Phoenix' ),
 73+ 'version' => '1.0',
 74+ 'url' => 'http://www.mediawiki.org/wiki/Extension:FCKeditor_(Official)',
 75+ 'description' => 'FCKeditor extension for editing wiki pages (WYSIWYG editor)'
9476 );
9577
96 -$fckeditor = new FCKeditor("fake");
 78+// Autoloadable classes
 79+$dir = dirname( __FILE__ ) . '/';
 80+$wgAutoloadClasses['FCKeditor'] = $dir . 'fckeditor/fckeditor.php';
 81+$wgAutoloadClasses['FCKeditorParser'] = $dir . 'FCKeditorParser.body.php';
 82+$wgAutoloadClasses['FCKeditorParserOptions'] = $dir . 'FCKeditorParserOptions.body.php';
 83+$wgAutoloadClasses['FCKeditorParserWrapper'] = $dir . 'FCKeditorParserWrapper.body.php';
 84+$wgAutoloadClasses['FCKeditorSkin'] = $dir . 'FCKeditorSkin.body.php';
 85+$wgAutoloadClasses['FCKeditorEditPage'] = $dir . 'FCKeditorEditPage.body.php';
 86+$wgAutoloadClasses['FCKeditor_MediaWiki'] = $dir . 'FCKeditor.body.php';
 87+
 88+// Path to internationalization file
 89+$wgExtensionMessagesFiles['FCKeditor'] = $dir . 'FCKeditor.i18n.php';
 90+
 91+// Initialize FCKeditor and the MediaWiki extension
 92+$fckeditor = new FCKeditor('fake');
9793 $wgFCKEditorIsCompatible = $fckeditor->IsCompatible();
9894
9995 $oFCKeditorExtension = new FCKeditor_MediaWiki();
10096
101 -$oFCKeditorExtension->registerHooks();
 97+// Hooked functions
 98+$wgHooks['ParserAfterTidy'][] = array( $oFCKeditorExtension, 'onParserAfterTidy' );
 99+$wgHooks['EditPage::showEditForm:initial'][] = array( $oFCKeditorExtension, 'onEditPageShowEditFormInitial' );
 100+$wgHooks['EditPage::showEditForm:fields'][] = array( $oFCKeditorExtension, 'onEditPageShowEditFormFields' );
 101+$wgHooks['EditPageBeforePreviewText'][] = array( $oFCKeditorExtension, 'onEditPageBeforePreviewText' );
 102+$wgHooks['EditPagePreviewTextEnd'][] = array( $oFCKeditorExtension, 'onEditPagePreviewTextEnd' );
 103+$wgHooks['CustomEditor'][] = array( $oFCKeditorExtension, 'onCustomEditor' );
 104+$wgHooks['LanguageGetMagic'][] = 'FCKeditor_MediaWiki::onLanguageGetMagic';
 105+$wgHooks['ParserBeforeStrip'][] = 'FCKeditor_MediaWiki::onParserBeforeStrip';
 106+$wgHooks['ParserBeforeInternalParse'][] = 'FCKeditor_MediaWiki::onParserBeforeInternalParse';
 107+$wgHooks['EditPageBeforeConflictDiff'][] = 'FCKeditor_MediaWiki::onEditPageBeforeConflictDiff';
 108+$wgHooks['SanitizerAfterFixTagAttributes'][] = 'FCKeditor_MediaWiki::onSanitizerAfterFixTagAttributes';
 109+$wgHooks['MakeGlobalVariablesScript'][] = 'FCKeditor_MediaWiki::onMakeGlobalVariablesScript';
 110+$wgHooks['GetPreferences'][] = 'FCKeditor_MediaWiki::onGetPreferences';
102111
 112+// Defaults for new preferences options
103113 $wgDefaultUserOptions['riched_use_toggle'] = 1;
104114 $wgDefaultUserOptions['riched_start_disabled'] = 1;
105115 $wgDefaultUserOptions['riched_use_popup'] = 1;
106 -$wgDefaultUserOptions['riched_toggle_remember_state'] = 1;
 116+$wgDefaultUserOptions['riched_toggle_remember_state'] = 1;
\ No newline at end of file
Index: trunk/extensions/FCKeditor/FCKeditorSkin.body.php
@@ -20,87 +20,81 @@
2121 function makeImageLinkObj( $nt, $label, $alt, $align = '', $params = array(), $framed = false,
2222 $thumb = false, $manual_thumb = '', $valign = '' ) {
2323 $orginal = $nt->getText();
24 - $img = new Image( $nt );
 24+ $img = new Image( $nt );
2525 $imgName = $img->getName();
2626 $found = $img->getURL();
2727
28 - if (!is_null($alt) && ( $alt == 'RTENOTITLE' )) { //2223
 28+ if( !is_null( $alt ) && ( $alt == 'RTENOTITLE' ) ) { // 2223
2929 $alt = '';
3030 }
3131
32 - if ($found) {
33 - //trick to get real Url for image:
34 - $originalLink = strip_tags(Linker::makeImageLinkObj($nt, $label, $alt, $align , $params , $framed , $thumb , $manual_thumb , $valign ), "<img>");
35 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
36 - $url = strtok($srcPart, '"');
 32+ if( $found ) {
 33+ // trick to get real URL for image:
 34+ $originalLink = strip_tags( Linker::makeImageLinkObj( $nt, $label, $alt, $align, $params, $framed, $thumb, $manual_thumb, $valign ), '<img>' );
 35+ $srcPart = substr( $originalLink, strpos( $originalLink, "src=" ) + 5 );
 36+ $url = strtok( $srcPart, '"' );
3737 }
3838
39 - $ret = "<img ";
 39+ $ret = '<img ';
4040
41 - if ($found) {
 41+ if( $found ) {
4242 $ret .= "src=\"{$url}\" ";
43 - }
44 - else {
 43+ } else {
4544 $ret .= "_fck_mw_valid=\"false"."\" ";
4645 }
4746 $ret .= "_fck_mw_filename=\"{$orginal}\" ";
4847
49 - if ($align) {
50 - $ret .= "_fck_mw_location=\"".strtolower($align)."\" ";
 48+ if( $align ) {
 49+ $ret .= "_fck_mw_location=\"" . strtolower( $align ) . "\" ";
5150 }
52 - if (!empty($params)) {
53 - if (isset($params['width'])) {
54 - $ret .= "_fck_mw_width=\"".$params['width']."\" ";
 51+ if( !empty( $params ) ) {
 52+ if( isset( $params['width'] ) ) {
 53+ $ret .= "_fck_mw_width=\"" . $params['width'] . "\" ";
5554 }
56 - if (isset($params['height'])) {
57 - $ret .= "_fck_mw_height=\"".$params['height']."\" ";
 55+ if( isset( $params['height'] ) ) {
 56+ $ret .= "_fck_mw_height=\"" . $params['height'] . "\" ";
5857 }
5958 }
60 - $class = "";
61 - if ($thumb) {
 59+ $class = '';
 60+ if( $thumb ) {
6261 $ret .= "_fck_mw_type=\"thumb"."\" ";
6362 $class .= "fck_mw_frame";
64 - }
65 - else if ($framed) {
 63+ } else if( $framed ) {
6664 $ret .= "_fck_mw_type=\"frame"."\" ";
6765 $class .= "fck_mw_frame";
6866 }
6967
70 - if ($align == "right") {
71 - $class .= ($class?" ":"") . "fck_mw_right";
 68+ if( $align == 'right' ) {
 69+ $class .= ( $class ? ' ' : '' ) . 'fck_mw_right';
 70+ } else if( $align == 'center' ) {
 71+ $class .= ( $class ? ' ' : '' ) . 'fck_mw_center';
 72+ } else if( $align == 'left' ) {
 73+ $class .= ( $class ? ' ' : '' ) . 'fck_mw_left';
 74+ } else if( $framed || $thumb ) {
 75+ $class .= ( $class ? ' ' : '' ) . 'fck_mw_right';
7276 }
73 - else if($align == "center") {
74 - $class .= ($class?" ":"") . "fck_mw_center";
75 - }
76 - else if($align == "left") {
77 - $class .= ($class?" ":"") . "fck_mw_left";
78 - }
79 - else if($framed || $thumb) {
80 - $class .= ($class?" ":"") . "fck_mw_right";
81 - }
8277
83 - if (!$found) {
84 - $class .= ($class?" ":"") . "fck_mw_notfound";
 78+ if( !$found ) {
 79+ $class .= ( $class ? ' ' : '' ) . 'fck_mw_notfound';
8580 }
8681
87 - if (!is_null($alt) && !empty($alt) && false !== strpos(FCKeditorParser::$fkc_mw_makeImage_options, $alt) && $alt != "Image:" . $orginal) {
88 - $ret .= "alt=\"".htmlspecialchars($alt)."\" ";
89 - }
90 - else {
 82+ if( !is_null( $alt ) && !empty( $alt ) && false !== strpos( FCKeditorParser::$fkc_mw_makeImage_options, $alt ) && $alt != 'Image:' . $orginal ) {
 83+ $ret .= "alt=\"" . htmlspecialchars( $alt ) . "\" ";
 84+ } else {
9185 $ret .= "alt=\"\" ";
9286 }
9387
94 - if ($class) {
 88+ if( $class ) {
9589 $ret .= "class=\"$class\" ";
9690 }
9791
98 - $ret .= "/>";
 92+ $ret .= '/>';
9993
10094 return $ret;
10195 }
10296
10397 /**
104 - * Make an image link in Mediawiki 1.11
 98+ * Make an image link in MediaWiki 1.11
10599 * @param Title $title Title object
106100 * @param File $file File object, or false if it doesn't exist
107101 *
@@ -125,110 +119,103 @@
126120 */
127121 function makeImageLink2( Title $nt, $file, $frameParams = array(), $handlerParams = array() ) {
128122 $orginal = $nt->getText();
129 - $img = new Image( $nt );
 123+ $img = new Image( $nt );
130124 $imgName = $img->getName();
131125 $found = $img->getURL();
132126
133 - if (!empty($frameParams['alt']) && $frameParams['alt'] == 'RTENOTITLE' ){ //2223
 127+ if( !empty( $frameParams['alt'] ) && $frameParams['alt'] == 'RTENOTITLE' ){ // 2223
134128 $frameParams['alt'] = '';
135129 }
136 - if ($found) {
 130+ if( $found ) {
137131 $linker = new Linker();
138 - $originalLink = $linker->makeImageLink2( $nt, $file, $frameParams, $handlerParams);
 132+ $originalLink = $linker->makeImageLink2( $nt, $file, $frameParams, $handlerParams );
139133
140 - if (false !== strpos($originalLink, "src=\"")) {
141 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
142 - $url = strtok($srcPart, '"');
 134+ if( false !== strpos( $originalLink, "src=\"" ) ) {
 135+ $srcPart = substr( $originalLink, strpos( $originalLink, "src=" ) + 5 );
 136+ $url = strtok( $srcPart, '"' );
143137 }
144 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
145 - $url = strtok($srcPart, '"');
 138+ $srcPart = substr( $originalLink, strpos( $originalLink, "src=" ) + 5 );
 139+ $url = strtok( $srcPart, '"' );
146140 }
147141
148142 // Shortcuts
149143 $fp =& $frameParams;
150144 $hp =& $handlerParams;
151145
152 - if (!isset($fp['align'])) {
 146+ if( !isset( $fp['align'] ) ) {
153147 $fp['align'] = '';
154148 }
155149
156 - $ret = "<img ";
 150+ $ret = '<img ';
157151
158 - if ($found) {
 152+ if( $found ) {
159153 $ret .= "src=\"{$url}\" ";
160 - }
161 - else {
 154+ } else {
162155 $ret .= "_fck_mw_valid=\"false"."\" ";
163156 }
164157 $ret .= "_fck_mw_filename=\"{$orginal}\" ";
165158
166 - if ($fp['align']) {
167 - $ret .= "_fck_mw_location=\"".strtolower($fp['align'])."\" ";
 159+ if( $fp['align'] ) {
 160+ $ret .= "_fck_mw_location=\"" . strtolower( $fp['align'] ) . "\" ";
168161 }
169 - if (!empty($hp)) {
170 - if (isset($hp['width'])) {
171 - $ret .= "_fck_mw_width=\"".$hp['width']."\" ";
 162+ if( !empty( $hp ) ) {
 163+ if( isset( $hp['width'] ) ) {
 164+ $ret .= "_fck_mw_width=\"" . $hp['width'] . "\" ";
172165 }
173 - if (isset($hp['height'])) {
174 - $ret .= "_fck_mw_height=\"".$hp['height']."\" ";
 166+ if( isset( $hp['height'] ) ) {
 167+ $ret .= "_fck_mw_height=\"" . $hp['height'] . "\" ";
175168 }
176169 }
177 - $class = "";
178 - if (isset($fp['thumbnail'])) {
179 - $ret .= "_fck_mw_type=\"thumb"."\" ";
180 - $class .= "fck_mw_frame";
 170+ $class = '';
 171+ if( isset( $fp['thumbnail'] ) ) {
 172+ $ret .= "_fck_mw_type=\"thumb" . "\" ";
 173+ $class .= 'fck_mw_frame';
 174+ } else if( isset( $fp['border'] ) ) {
 175+ $ret .= "_fck_mw_type=\"border" . "\" ";
 176+ $class .= 'fck_mw_border';
 177+ } else if( isset( $fp['framed'] ) ) {
 178+ $ret .= "_fck_mw_type=\"frame" . "\" ";
 179+ $class .= 'fck_mw_frame';
181180 }
182 - else if (isset($fp['border'])) {
183 - $ret .= "_fck_mw_type=\"border"."\" ";
184 - $class .= "fck_mw_border";
185 - }
186 - else if (isset($fp['framed'])) {
187 - $ret .= "_fck_mw_type=\"frame"."\" ";
188 - $class .= "fck_mw_frame";
189 - }
190181
191 - if ($fp['align'] == "right") {
192 - $class .= ($class?" ":"") . "fck_mw_right";
 182+ if( $fp['align'] == 'right' ) {
 183+ $class .= ( $class ? ' ': '' ) . 'fck_mw_right';
 184+ } else if( $fp['align'] == 'center' ) {
 185+ $class .= ( $class ? ' ' : '' ) . 'fck_mw_center';
 186+ } else if( $fp['align'] == 'left' ) {
 187+ $class .= ( $class ? ' ': '' ) . 'fck_mw_left';
 188+ } else if( isset( $fp['framed'] ) || isset( $fp['thumbnail'] ) ) {
 189+ $class .= ( $class ? ' ' : '' ) . 'fck_mw_right';
193190 }
194 - else if($fp['align'] == "center") {
195 - $class .= ($class?" ":"") . "fck_mw_center";
196 - }
197 - else if($fp['align'] == "left") {
198 - $class .= ($class?" ":"") . "fck_mw_left";
199 - }
200 - else if(isset($fp['framed']) || isset($fp['thumbnail'])) {
201 - $class .= ($class?" ":"") . "fck_mw_right";
202 - }
203191
204 - if (!$found) {
205 - $class .= ($class?" ":"") . "fck_mw_notfound";
 192+ if( !$found ) {
 193+ $class .= ( $class ? ' ' : '' ) . 'fck_mw_notfound';
206194 }
207195
208 - if (isset($fp['alt']) && !empty($fp['alt']) && $fp['alt'] != "Image:" . $orginal) {
209 - $ret .= "alt=\"".htmlspecialchars($fp['alt'])."\" ";
210 - }
211 - else {
 196+ if( isset( $fp['alt'] ) && !empty( $fp['alt'] ) && $fp['alt'] != 'Image:' . $orginal ) {
 197+ $ret .= "alt=\"" . htmlspecialchars( $fp['alt'] ) . "\" ";
 198+ } else {
212199 $ret .= "alt=\"\" ";
213200 }
214201
215 - if ($class) {
 202+ if( $class ) {
216203 $ret .= "class=\"$class\" ";
217204 }
218205
219 - $ret .= "/>";
 206+ $ret .= '/>';
220207
221208 return $ret;
222209 }
223210
224211 function makeLinkObj( $nt, $text= '', $query = '', $trail = '', $prefix = '' ) {
225 - global $wgUser;
226 -
227212 wfProfileIn( __METHOD__ );
228213 if ( $nt->isExternal() ) {
229214 $args = '';
230215 $u = $nt->getFullURL();
231216 $link = $nt->getPrefixedURL();
232 - if ( '' == $text ) { $text = $nt->getPrefixedText(); }
 217+ if ( '' == $text ) {
 218+ $text = $nt->getPrefixedText();
 219+ }
233220 $style = $this->getInterwikiLinkAttributes( $link, $text, 'extiw' );
234221
235222 $inside = '';
@@ -239,7 +226,7 @@
240227 $trail = $m[2];
241228 }
242229 }
243 - if( $text == 'RTENOTITLE' ) { //2223
 230+ if( $text == 'RTENOTITLE' ) { // 2223
244231 $text = $u = $link;
245232 $args .= '_fcknotitle="true" ';
246233 }
@@ -249,43 +236,40 @@
250237 return $t;
251238 }
252239
253 - return Linker::makeLinkObj($nt, $text, $query, $trail, $prefix);
254 -
 240+ return Linker::makeLinkObj( $nt, $text, $query, $trail, $prefix );
255241 }
256242
257243 function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) {
258 - if($colour != ''){
 244+ if( $colour != '' ){
259245 $style = $this->getInternalLinkAttributesObj( $nt, $text, $colour );
260246 } else $style = '';
261247 return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix, '', $style );
262248 }
263249
264250 function makeKnownLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' , $aprops = '', $style = '' ) {
265 - $fname = 'FCKeditorSkin::makeKnownLinkObj';
266 - wfProfileIn( $fname );
 251+ wfProfileIn( __METHOD__ );
267252
268253 $args = '';
269254 if ( !is_object( $nt ) ) {
270 - wfProfileOut( $fname );
 255+ wfProfileOut( __METHOD__ );
271256 return $text;
272257 }
273258
274 - //$u = $nt->escapeLocalURL( $query );
275 - $u = $nt->getFullText();
276 - //#Updating links tables -> #Updating_links_tables
277 - $u = str_replace("#".$nt->getFragment(), $nt->getFragmentForURL(), $u);
 259+ $u = $nt->getFullText();
 260+ //#Updating links tables -> #Updating_links_tables
 261+ $u = str_replace( "#" . $nt->getFragment(), $nt->getFragmentForURL(), $u );
278262
279263 if ( $nt->getFragment() != '' ) {
280 - if( $nt->getPrefixedDbkey() == '' ) {
 264+ if( $nt->getPrefixedDBkey() == '' ) {
281265 $u = '';
282266 if ( '' == $text ) {
283267 $text = htmlspecialchars( $nt->getFragment() );
284268 }
285269 }
286270
287 - /*
288 - * See tickets 1386 and 1690 before changing anything
289 - */
 271+ /**
 272+ * See tickets 1386 and 1690 before changing anything
 273+ */
290274 if( $nt->getPartialUrl() == '' ) {
291275 $u .= $nt->getFragmentForURL();
292276 }
@@ -294,59 +278,58 @@
295279 $text = htmlspecialchars( $nt->getPrefixedText() );
296280 }
297281
298 - if ($nt->getNamespace() == NS_CATEGORY) {
 282+ if( $nt->getNamespace() == NS_CATEGORY ) {
299283 $u = ':' . $u;
300284 }
301285
302286 list( $inside, $trail ) = Linker::splitTrail( $trail );
303287 $title = "{$prefix}{$text}{$inside}";
304288
305 - $u = preg_replace("/^RTECOLON/", ":", $u); //change 'RTECOLON' => ':'
306 - if( substr($text, 0, 10) == 'RTENOTITLE' ){ //starts with RTENOTITLE
 289+ $u = preg_replace( "/^RTECOLON/", ":", $u ); // change 'RTECOLON' => ':'
 290+ if( substr( $text, 0, 10 ) == 'RTENOTITLE' ){ // starts with RTENOTITLE
307291 $args .= '_fcknotitle="true" ';
308292 $title = $u;
309 - $trail = substr($text, 10).$trail;
 293+ $trail = substr( $text, 10 ) . $trail;
310294 }
311295
312296 $r = "<a {$args}href=\"{$u}\">{$title}</a>{$trail}";
313 - wfProfileOut( $fname );
 297+ wfProfileOut( __METHOD__ );
314298 return $r;
315299 }
316300
317301 function makeBrokenLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
318302 # Fail gracefully
319 - if ( ! isset($nt) ) {
 303+ if ( !isset( $nt ) ) {
320304 # throw new MWException();
321305 return "<!-- ERROR -->{$prefix}{$text}{$trail}";
322306 }
323307 $args = '';
324308
325 - $fname = 'FCKeditorSkin::makeBrokenLinkObj';
326 - wfProfileIn( $fname );
 309+ wfProfileIn( __METHOD__ );
327310
328 - $u = $nt->getFullText();
329 - //#Updating links tables -> #Updating_links_tables
330 - $u = str_replace("#".$nt->getFragment(), $nt->getFragmentForURL(), $u);
 311+ $u = $nt->getFullText();
 312+ //#Updating links tables -> #Updating_links_tables
 313+ $u = str_replace( "#" . $nt->getFragment(), $nt->getFragmentForURL(), $u );
331314
332315 if ( '' == $text ) {
333316 $text = htmlspecialchars( $nt->getPrefixedText() );
334317 }
335 - if ($nt->getNamespace() == NS_CATEGORY) {
 318+ if( $nt->getNamespace() == NS_CATEGORY ) {
336319 $u = ':' . $u;
337320 }
338321
339322 list( $inside, $trail ) = Linker::splitTrail( $trail );
340323 $title = "{$prefix}{$text}{$inside}";
341324
342 - $u = preg_replace("/^RTECOLON/", ":", $u); //change 'RTECOLON' => ':'
343 - if( substr($text, 0, 10) == 'RTENOTITLE' ){ //starts with RTENOTITLE
 325+ $u = preg_replace( "/^RTECOLON/", ":", $u ); // change 'RTECOLON' => ':'
 326+ if( substr( $text, 0, 10 ) == 'RTENOTITLE' ){ // starts with RTENOTITLE
344327 $args .= '_fcknotitle="true" ';
345328 $title = $u;
346 - $trail = substr($text, 10).$trail;
 329+ $trail = substr( $text, 10 ) . $trail;
347330 }
348331 $s = "<a {$args}href=\"{$u}\">{$title}</a>{$trail}";
349332
350 - wfProfileOut( $fname );
 333+ wfProfileOut( __METHOD__ );
351334 return $s;
352335 }
353336
@@ -357,7 +340,7 @@
358341 }
359342 list( $inside, $trail ) = Linker::splitTrail( $trail );
360343 $title = "{$prefix}{$text}";
361 - if( $text == 'RTENOTITLE' ){ //2223
 344+ if( $text == 'RTENOTITLE' ){ // 2223
362345 $args .= '_fcknotitle="true" ';
363346 $title = $nt->mDbkeyform;
364347 }
@@ -371,46 +354,30 @@
372355 * @param $text String: pre-sanitized HTML
373356 * @return string HTML
374357 *
375 - * @public
376358 * @todo Handle invalid or missing images better.
377359 */
378 - function makeMediaLinkObj( $title, $text = '' ) {
 360+ public function makeMediaLinkObj( $title, $text = '' ) {
379361 if( is_null( $title ) ) {
380362 ### HOTFIX. Instead of breaking, return empty string.
381363 return $text;
382364 } else {
383365 $args = '';
384366 $orginal = $title->getPartialURL();
385 - // Mediawiki 1.11
386 - if ( function_exists('wfFindFile') ) {
387 - $img = wfFindFile( $title );
388 - if( $img ) {
389 - $url = $img->getURL();
390 - $class = 'internal';
391 - } else {
392 - $upload = SpecialPage::getTitleFor( 'Upload' );
393 - $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDBKey() ) );
394 - $class = 'new';
395 - }
 367+ $img = wfFindFile( $title );
 368+ if( $img ) {
 369+ $url = $img->getURL();
 370+ $class = 'internal';
 371+ } else {
 372+ $upload = SpecialPage::getTitleFor( 'Upload' );
 373+ $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDBkey() ) );
 374+ $class = 'new';
396375 }
397 - // Mediawiki 1.10
398 - else {
399 - $img = new Image( $title );
400 - if( $img->exists() ) {
401 - $url = $img->getURL();
402 - $class = 'internal';
403 - } else {
404 - $upload = SpecialPage::getTitleFor( 'Upload' );
405 - $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $img->getName() ) );
406 - $class = 'new';
407 - }
408 - }
409376 $alt = htmlspecialchars( $title->getText() );
410377 if( $text == '' ) {
411378 $text = $alt;
412379 }
413 - $orginal = preg_replace("/^RTECOLON/", ":", $orginal); //change 'RTECOLON' => ':'
414 - if( $text == 'RTENOTITLE' ){ //2223
 380+ $orginal = preg_replace( "/^RTECOLON/", ":", $orginal ); // change 'RTECOLON' => ':'
 381+ if( $text == 'RTENOTITLE' ){ // 2223
415382 $args .= '_fcknotitle="true" ';
416383 $text = $orginal;
417384 $alt = $orginal;
@@ -424,23 +391,23 @@
425392 if( $escape ) {
426393 $text = htmlspecialchars( $text );
427394 }
428 - $url = preg_replace("/^RTECOLON/", ":", $url); //change 'RTECOLON' => ':'
429 - if ($linktype == 'autonumber') {
430 - return '<a href="'.$url.'">[n]</a>';
 395+ $url = preg_replace( "/^RTECOLON/", ":", $url ); // change 'RTECOLON' => ':'
 396+ if( $linktype == 'autonumber' ) {
 397+ return '<a href="' . $url . '">[n]</a>';
431398 }
432399 $args = '';
433 - if( $text == 'RTENOTITLE' ){ //2223
 400+ if( $text == 'RTENOTITLE' ){ // 2223
434401 $args .= '_fcknotitle="true" ';
435402 $text = $url;
436403 }
437 - return '<a '.$args.'href="'.$url.'">'.$text.'</a>';
 404+ return '<a ' . $args . 'href="' . $url . '">' . $text . '</a>';
438405 }
439406
440 - function __call( $m, $a) {
 407+ function __call( $m, $a ) {
441408 return call_user_func_array( array( $this->skin, $m ), $a );
442409 }
443410
444411 function __construct( &$skin ) {
445412 $this->skin = $skin;
446413 }
447 -}
 414+}
\ No newline at end of file
Index: trunk/extensions/FCKeditor/plugins/mediawiki/fckplugin.js
@@ -29,158 +29,175 @@
3030 */
3131
3232 // Rename the "Source" buttom to "Wikitext".
33 -FCKToolbarItems.RegisterItem( 'Source', new FCKToolbarButton( 'Source', 'Wikitext', null, FCK_TOOLBARITEM_ICONTEXT, true, true, 1 ) ) ;
 33+FCKToolbarItems.RegisterItem( 'Source', new FCKToolbarButton( 'Source', 'Wikitext', null, FCK_TOOLBARITEM_ICONTEXT, true, true, 1 ) );
3434
3535 // Register our toolbar buttons.
36 -var tbButton = new FCKToolbarButton( 'MW_Template', 'Template', FCKLang.wikiBtnTemplate || 'Insert/Edit Template') ;
37 -tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_template.gif' ;
38 -FCKToolbarItems.RegisterItem( 'MW_Template', tbButton ) ;
 36+var tbButton = new FCKToolbarButton( 'MW_Template', 'Template', FCKLang.wikiBtnTemplate || 'Insert/Edit Template' );
 37+tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_template.gif';
 38+FCKToolbarItems.RegisterItem( 'MW_Template', tbButton );
3939
40 -//Ref button
41 -tbButton = new FCKToolbarButton( 'MW_Ref', 'Ref', FCKLang.wikiBtnReference || 'Insert/Edit Reference' ) ;
42 -tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_ref.gif' ;
43 -FCKToolbarItems.RegisterItem( 'MW_Ref', tbButton ) ;
44 -if ( !FCKConfig.showreferences ) { //hack to disable MW_Ref button
45 - tbButton.Create = function() {return 0;}
46 - tbButton.Disable = function() {return 0;}
47 - tbButton.RefreshState = function() {return 0;}
 40+// Ref button
 41+tbButton = new FCKToolbarButton( 'MW_Ref', 'Ref', FCKLang.wikiBtnReference || 'Insert/Edit Reference' );
 42+tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_ref.gif';
 43+FCKToolbarItems.RegisterItem( 'MW_Ref', tbButton );
 44+if ( !FCKConfig.showreferences ) { // hack to disable MW_Ref button
 45+ tbButton.Create = function(){ return 0; }
 46+ tbButton.Disable = function(){ return 0; }
 47+ tbButton.RefreshState = function(){ return 0; }
4848 }
4949
50 -//References button
51 -var FCKReferences = function( ) { } ;
52 -FCKReferences.prototype.GetState = function() { return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED) } ;
53 -FCKCommands.RegisterCommand( 'MW_References', new FCKReferences() ) ;
54 -tbButton = new FCKToolbarButton( 'MW_References', 'References', FCKLang.wikiBtnReferences || 'Insert <references /> tag', FCK_TOOLBARITEM_ICONTEXT,true, true, 1 );
55 -tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_ref.gif' ;
56 -if ( !FCKConfig.showreferences ) { //hack to disable MW_References button
57 - tbButton.Create = function() {return 0;}
58 - tbButton.Disable = function() {return 0;}
59 - tbButton.RefreshState = function() {return 0;}
 50+// References button
 51+var FCKReferences = function(){};
 52+FCKReferences.prototype.GetState = function(){ return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) };
 53+FCKCommands.RegisterCommand( 'MW_References', new FCKReferences() );
 54+tbButton = new FCKToolbarButton( 'MW_References', 'References', FCKLang.wikiBtnReferences || 'Insert <references /> tag', FCK_TOOLBARITEM_ICONTEXT,true, true, 1 );
 55+tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_ref.gif';
 56+if ( !FCKConfig.showreferences ) { // hack to disable MW_References button
 57+ tbButton.Create = function(){ return 0; }
 58+ tbButton.Disable = function(){ return 0; }
 59+ tbButton.RefreshState = function(){ return 0; }
6060 }
6161
62 -FCKReferences.prototype.Execute = function()
63 -{
 62+FCKReferences.prototype.Execute = function(){
6463 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
65 - return ;
 64+ return;
6665
67 - FCKUndo.SaveUndoStep() ;
 66+ FCKUndo.SaveUndoStep();
6867
69 - var e = FCK.EditorDocument.createElement( 'span' ) ;
70 - e.setAttribute("_fck_mw_customtag", "true");
71 - e.setAttribute("_fck_mw_tagname", "references");
72 - e.className = "fck_mw_references";
 68+ var e = FCK.EditorDocument.createElement( 'span' );
 69+ e.setAttribute( '_fck_mw_customtag', 'true' );
 70+ e.setAttribute( '_fck_mw_tagname', 'references' );
 71+ e.className = 'fck_mw_references';
7372
74 - oFakeImage = FCK.InsertElement( FCKDocumentProcessor_CreateFakeImage( 'FCK__MWReferences', e ) ) ;
 73+ oFakeImage = FCK.InsertElement( FCKDocumentProcessor_CreateFakeImage( 'FCK__MWReferences', e ) );
7574 }
76 -FCKToolbarItems.RegisterItem( 'MW_References', tbButton ) ;
 75+FCKToolbarItems.RegisterItem( 'MW_References', tbButton );
7776
78 -//Signature button
79 -var FCKSignature = function( ) {} ;
80 -FCKSignature.prototype.GetState = function() { return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED) } ;
81 -FCKCommands.RegisterCommand( 'MW_Signature', new FCKSignature() ) ;
82 -tbButton = new FCKToolbarButton( 'MW_Signature', 'Signature', FCKLang.wikiBtnSignature || 'Insert signature', FCK_TOOLBARITEM_ONLYICON,true, true, 1 );
83 -tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_signature.gif' ;
 77+// Signature button
 78+var FCKSignature = function(){};
 79+FCKSignature.prototype.GetState = function(){ return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) };
 80+FCKCommands.RegisterCommand( 'MW_Signature', new FCKSignature() );
 81+tbButton = new FCKToolbarButton( 'MW_Signature', 'Signature', FCKLang.wikiBtnSignature || 'Insert signature', FCK_TOOLBARITEM_ONLYICON,true, true, 1 );
 82+tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_signature.gif';
8483
85 -FCKSignature.prototype.Execute = function()
86 -{
 84+FCKSignature.prototype.Execute = function(){
8785 if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
88 - return ;
 86+ return;
8987
90 - FCKUndo.SaveUndoStep() ;
91 - var e = FCK.EditorDocument.createElement( 'span' ) ;
92 - e.className = "fck_mw_signature";
 88+ FCKUndo.SaveUndoStep();
 89+ var e = FCK.EditorDocument.createElement( 'span' );
 90+ e.className = 'fck_mw_signature';
9391
94 - oFakeImage = FCK.InsertElement( FCKDocumentProcessor_CreateFakeImage( 'FCK__MWSignature', e ) ) ;
 92+ oFakeImage = FCK.InsertElement( FCKDocumentProcessor_CreateFakeImage( 'FCK__MWSignature', e ) );
9593 }
96 -FCKToolbarItems.RegisterItem( 'MW_Signature', tbButton ) ;
 94+FCKToolbarItems.RegisterItem( 'MW_Signature', tbButton );
9795
98 -tbButton = new FCKToolbarButton( 'MW_Math', 'Formula', FCKLang.wikiBtnFormula || 'Insert/Edit Formula' ) ;
99 -tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_math.gif' ;
100 -FCKToolbarItems.RegisterItem( 'MW_Math', tbButton ) ;
 96+tbButton = new FCKToolbarButton( 'MW_Math', 'Formula', FCKLang.wikiBtnFormula || 'Insert/Edit Formula' );
 97+tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_math.gif';
 98+FCKToolbarItems.RegisterItem( 'MW_Math', tbButton );
10199
102 -tbButton = new FCKToolbarButton( 'MW_Source', 'Source', FCKLang.wikiBtnSourceCode || 'Insert/Edit Source Code' ) ;
103 -tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_source.gif' ;
104 -FCKToolbarItems.RegisterItem( 'MW_Source', tbButton ) ;
105 -if ( !FCKConfig.showsource ) { //hack to disable MW_Source button
106 - tbButton.Create = function() {return 0;}
107 - tbButton.Disable = function() {return 0;}
108 - tbButton.RefreshState = function() {return 0;}
 100+tbButton = new FCKToolbarButton( 'MW_Source', 'Source', FCKLang.wikiBtnSourceCode || 'Insert/Edit Source Code' );
 101+tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_source.gif';
 102+FCKToolbarItems.RegisterItem( 'MW_Source', tbButton );
 103+if ( !FCKConfig.showsource ) { // hack to disable MW_Source button
 104+ tbButton.Create = function(){ return 0; }
 105+ tbButton.Disable = function(){ return 0; }
 106+ tbButton.RefreshState = function(){ return 0; }
109107 }
110108
111 -tbButton = new FCKToolbarButton( 'MW_Special', 'Special Tag', FCKLang.wikiBtnSpecial || 'Insert/Edit Special Tag' ) ;
112 -tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_special.gif' ;
113 -FCKToolbarItems.RegisterItem( 'MW_Special', tbButton ) ;
 109+tbButton = new FCKToolbarButton( 'MW_Special', 'Special Tag', FCKLang.wikiBtnSpecial || 'Insert/Edit Special Tag' );
 110+tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_special.gif';
 111+FCKToolbarItems.RegisterItem( 'MW_Special', tbButton );
114112
115 -tbButton = new FCKToolbarButton( 'MW_Category', 'Categories', FCKLang.wikiBtnCategories || 'Insert/Edit categories' ) ;
116 -tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_category.gif' ;
117 -FCKToolbarItems.RegisterItem( 'MW_Category', tbButton ) ;
 113+tbButton = new FCKToolbarButton( 'MW_Category', 'Categories', FCKLang.wikiBtnCategories || 'Insert/Edit categories' );
 114+tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_category.gif';
 115+FCKToolbarItems.RegisterItem( 'MW_Category', tbButton );
118116
119117 // Override some dialogs.
120 -FCKCommands.RegisterCommand( 'MW_Template', new FCKDialogCommand( 'MW_Template', ( FCKLang.wikiCmdTemplate || 'Template Properties' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/template.html', 400, 330 ) ) ;
121 -FCKCommands.RegisterCommand( 'MW_Ref', new FCKDialogCommand( 'MW_Ref', ( FCKLang.wikiCmdReference || 'Reference Properties' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/ref.html', 400, 250 ) ) ;
122 -FCKCommands.RegisterCommand( 'MW_Math', new FCKDialogCommand( 'MW_Math', ( FCKLang.wikiCmdFormula || 'Formula' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/math.html', 400, 300 ) ) ;
123 -FCKCommands.RegisterCommand( 'MW_Special', new FCKDialogCommand( 'MW_Special', ( FCKLang.wikiCmdSpecial || 'Special Tag Properties' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/special.html', 400, 330 ) ) ;
124 -FCKCommands.RegisterCommand( 'MW_Source', new FCKDialogCommand( 'MW_Source', ( FCKLang.wikiCmdSourceCode || 'Source Code Properties' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/source.html', 720, 380 ) ) ;
125 -FCKCommands.RegisterCommand( 'Link', new FCKDialogCommand( 'Link', FCKLang.DlgLnkWindowTitle, FCKConfig.PluginsPath + 'mediawiki/dialogs/link.html', 400, 250 ) ) ;
126 -FCKCommands.RegisterCommand( 'MW_Category', new FCKDialogCommand( 'MW_Category', ( FCKLang.wikiCmdCategories || 'Categories' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/category.html', 400, 500 ) ) ;
127 -FCKCommands.RegisterCommand( 'Image', new FCKDialogCommand( 'Image', FCKLang.DlgImgTitle, FCKConfig.PluginsPath + 'mediawiki/dialogs/image.html', 450, 300 ) ) ;
 118+FCKCommands.RegisterCommand( 'MW_Template', new FCKDialogCommand( 'MW_Template', ( FCKLang.wikiCmdTemplate || 'Template Properties' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/template.html', 400, 330 ) );
 119+FCKCommands.RegisterCommand( 'MW_Ref', new FCKDialogCommand( 'MW_Ref', ( FCKLang.wikiCmdReference || 'Reference Properties' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/ref.html', 400, 250 ) );
 120+FCKCommands.RegisterCommand( 'MW_Math', new FCKDialogCommand( 'MW_Math', ( FCKLang.wikiCmdFormula || 'Formula' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/math.html', 400, 300 ) );
 121+FCKCommands.RegisterCommand( 'MW_Special', new FCKDialogCommand( 'MW_Special', ( FCKLang.wikiCmdSpecial || 'Special Tag Properties' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/special.html', 400, 330 ) );
 122+FCKCommands.RegisterCommand( 'MW_Source', new FCKDialogCommand( 'MW_Source', ( FCKLang.wikiCmdSourceCode || 'Source Code Properties' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/source.html', 720, 380 ) );
 123+FCKCommands.RegisterCommand( 'Link', new FCKDialogCommand( 'Link', FCKLang.DlgLnkWindowTitle, FCKConfig.PluginsPath + 'mediawiki/dialogs/link.html', 400, 250 ) );
 124+FCKCommands.RegisterCommand( 'MW_Category', new FCKDialogCommand( 'MW_Category', ( FCKLang.wikiCmdCategories || 'Categories' ), FCKConfig.PluginsPath + 'mediawiki/dialogs/category.html', 400, 500 ) );
 125+FCKCommands.RegisterCommand( 'Image', new FCKDialogCommand( 'Image', FCKLang.DlgImgTitle, FCKConfig.PluginsPath + 'mediawiki/dialogs/image.html', 450, 300 ) );
128126
129127 FCKToolbarItems.OldGetItem = FCKToolbarItems.GetItem;
130128
131 -FCKToolbarItems.GetItem = function( itemName )
132 -{
133 - var oItem = FCKToolbarItems.LoadedItems[ itemName ] ;
 129+FCKToolbarItems.GetItem = function( itemName ){
 130+ var oItem = FCKToolbarItems.LoadedItems[ itemName ];
134131
135132 if ( oItem )
136 - return oItem ;
 133+ return oItem;
137134
138 - switch ( itemName )
139 - {
140 - case 'Bold' : oItem = new FCKToolbarButton( 'Bold' , FCKLang.Bold, null, null, true, true, 20 ) ; break ;
141 - case 'Italic' : oItem = new FCKToolbarButton( 'Italic' , FCKLang.Italic, null, null, true, true, 21 ) ; break ;
142 - case 'Underline' : oItem = new FCKToolbarButton( 'Underline' , FCKLang.Underline, null, null, true, true, 22 ) ; break ;
143 - case 'StrikeThrough': oItem = new FCKToolbarButton( 'StrikeThrough' , FCKLang.StrikeThrough, null, null, true, true, 23 ) ; break ;
144 - case 'Link' : oItem = new FCKToolbarButton( 'Link' , FCKLang.InsertLinkLbl, FCKLang.InsertLink, null, true, true, 34 ) ; break ;
 135+ switch ( itemName ){
 136+ case 'Bold':
 137+ oItem = new FCKToolbarButton( 'Bold', FCKLang.Bold, null, null, true, true, 20 );
 138+ break;
 139+ case 'Italic':
 140+ oItem = new FCKToolbarButton( 'Italic', FCKLang.Italic, null, null, true, true, 21 );
 141+ break;
 142+ case 'Underline':
 143+ oItem = new FCKToolbarButton( 'Underline', FCKLang.Underline, null, null, true, true, 22 );
 144+ break;
 145+ case 'StrikeThrough':
 146+ oItem = new FCKToolbarButton( 'StrikeThrough', FCKLang.StrikeThrough, null, null, true, true, 23 );
 147+ break;
 148+ case 'Link':
 149+ oItem = new FCKToolbarButton( 'Link', FCKLang.InsertLinkLbl, FCKLang.InsertLink, null, true, true, 34 );
 150+ break;
145151
146152 default:
147153 return FCKToolbarItems.OldGetItem( itemName );
148154 }
149155
150 - FCKToolbarItems.LoadedItems[ itemName ] = oItem ;
 156+ FCKToolbarItems.LoadedItems[ itemName ] = oItem;
151157
152 - return oItem ;
 158+ return oItem;
153159 }
154160
155 -FCKToolbarButton.prototype.Click = function()
156 -{
157 - var oToolbarButton = this._ToolbarButton || this ;
 161+FCKToolbarButton.prototype.Click = function(){
 162+ var oToolbarButton = this._ToolbarButton || this;
158163
159164 // for some buttons, do something else instead...
160 - var CMode = false ;
161 - if ( oToolbarButton.SourceView && (FCK_EDITMODE_SOURCE == FCK.EditMode) )
162 - {
 165+ var CMode = false;
 166+ if ( oToolbarButton.SourceView && ( FCK_EDITMODE_SOURCE == FCK.EditMode ) ){
163167 if ( !window.parent.popup )
164168 var oDoc = window.parent;
165169 else
166170 var oDoc = window.parent.popup;
167171
168 - switch (oToolbarButton.CommandName)
169 - {
170 - case 'Bold' : oDoc.FCKeditorInsertTags ('\'\'\'', '\'\'\'', 'Bold text', document) ; CMode = true ; break ;
171 - case 'Italic' : oDoc.FCKeditorInsertTags ('\'\'', '\'\'', 'Italic text', document) ; CMode = true ; break ;
172 - case 'Underline' : oDoc.FCKeditorInsertTags ('<u>', '</u>', 'Underlined text', document) ; CMode = true ; break ;
173 - case 'StrikeThrough': oDoc.FCKeditorInsertTags ('<strike>', '</strike>', 'Strikethrough text', document) ; CMode = true ; break ;
174 - case 'Link' : oDoc.FCKeditorInsertTags ('[[', ']]', 'Internal link', document) ; CMode = true ; break ;
 172+ switch( oToolbarButton.CommandName ){
 173+ case 'Bold':
 174+ oDoc.FCKeditorInsertTags( '\'\'\'', '\'\'\'', 'Bold text', document );
 175+ CMode = true;
 176+ break;
 177+ case 'Italic':
 178+ oDoc.FCKeditorInsertTags( '\'\'', '\'\'', 'Italic text', document );
 179+ CMode = true;
 180+ break;
 181+ case 'Underline':
 182+ oDoc.FCKeditorInsertTags( '<u>', '</u>', 'Underlined text', document );
 183+ CMode = true;
 184+ break;
 185+ case 'StrikeThrough':
 186+ oDoc.FCKeditorInsertTags( '<strike>', '</strike>', 'Strikethrough text', document );
 187+ CMode = true;
 188+ break;
 189+ case 'Link':
 190+ oDoc.FCKeditorInsertTags ('[[', ']]', 'Internal link', document );
 191+ CMode = true;
 192+ break;
175193 }
176194 }
177195
178196 if ( !CMode )
179 - FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oToolbarButton.CommandName ).Execute() ;
 197+ FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oToolbarButton.CommandName ).Execute();
180198 }
181199
182200 // MediaWiki Wikitext Data Processor implementation.
183 -FCK.DataProcessor =
184 -{
 201+FCK.DataProcessor = {
185202 _inPre : false,
186203 _inLSpace : false,
187204
@@ -192,10 +209,9 @@
193210 * @param {String} data The data to be converted in the
194211 * DataProcessor specific format.
195212 */
196 - ConvertToHtml : function( data )
197 - {
 213+ ConvertToHtml : function( data ){
198214 // Call the original code.
199 - return FCKDataProcessor.prototype.ConvertToHtml.call( this, data ) ;
 215+ return FCKDataProcessor.prototype.ConvertToHtml.call( this, data );
200216 },
201217
202218 /*
@@ -207,17 +223,16 @@
208224 * @param {Boolean} format Indicates that the data must be formatted
209225 * for human reading. Not all Data Processors may provide it.
210226 */
211 - ConvertToDataFormat : function( rootNode, excludeRoot, ignoreIfEmptyParagraph, format )
212 - {
 227+ ConvertToDataFormat : function( rootNode, excludeRoot, ignoreIfEmptyParagraph, format ){
213228 // rootNode is <body>.
214229
215230 // Normalize the document for text node processing (except IE - #1586).
216231 if ( !FCKBrowserInfo.IsIE )
217 - rootNode.normalize() ;
 232+ rootNode.normalize();
218233
219 - var stringBuilder = new Array() ;
220 - this._AppendNode( rootNode, stringBuilder, '' ) ;
221 - return stringBuilder.join( '' ).RTrim().replace(/^\n*/, "") ;
 234+ var stringBuilder = new Array();
 235+ this._AppendNode( rootNode, stringBuilder, '' );
 236+ return stringBuilder.join( '' ).RTrim().replace(/^\n*/, "");
222237 },
223238
224239 /*
@@ -225,9 +240,8 @@
226241 * editor selection position.
227242 * @param {String} html The HTML to be fixed.
228243 */
229 - FixHtml : function( html )
230 - {
231 - return html ;
 244+ FixHtml : function( html ){
 245+ return html;
232246 },
233247
234248 // Collection of element definitions:
@@ -252,87 +266,77 @@
253267 } ,
254268
255269 // This function is based on FCKXHtml._AppendNode.
256 - _AppendNode : function( htmlNode, stringBuilder, prefix )
257 - {
 270+ _AppendNode : function( htmlNode, stringBuilder, prefix ){
258271 if ( !htmlNode )
259 - return ;
 272+ return;
260273
261 - switch ( htmlNode.nodeType )
262 - {
 274+ switch ( htmlNode.nodeType ){
263275 // Element Node.
264276 case 1 :
265277
266278 // Here we found an element that is not the real element, but a
267279 // fake one (like the Flash placeholder image), so we must get the real one.
268280 if ( htmlNode.getAttribute('_fckfakelement') && !htmlNode.getAttribute( '_fck_mw_math' ) )
269 - return this._AppendNode( FCK.GetRealElement( htmlNode ), stringBuilder ) ;
 281+ return this._AppendNode( FCK.GetRealElement( htmlNode ), stringBuilder );
270282
271283 // Mozilla insert custom nodes in the DOM.
272 - if ( FCKBrowserInfo.IsGecko && htmlNode.hasAttribute('_moz_editor_bogus_node') )
273 - return ;
 284+ if ( FCKBrowserInfo.IsGecko && htmlNode.hasAttribute( '_moz_editor_bogus_node' ) )
 285+ return;
274286
275287 // This is for elements that are instrumental to FCKeditor and
276288 // must be removed from the final HTML.
277 - if ( htmlNode.getAttribute('_fcktemp') )
278 - return ;
 289+ if ( htmlNode.getAttribute( '_fcktemp' ) )
 290+ return;
279291
280292 // Get the element name.
281 - var sNodeName = htmlNode.tagName.toLowerCase() ;
 293+ var sNodeName = htmlNode.tagName.toLowerCase();
282294
283 - if ( FCKBrowserInfo.IsIE )
284 - {
 295+ if ( FCKBrowserInfo.IsIE ){
285296 // IE doens't include the scope name in the nodeName. So, add the namespace.
286297 if ( htmlNode.scopeName && htmlNode.scopeName != 'HTML' && htmlNode.scopeName != 'FCK' )
287 - sNodeName = htmlNode.scopeName.toLowerCase() + ':' + sNodeName ;
288 - }
289 - else
290 - {
 298+ sNodeName = htmlNode.scopeName.toLowerCase() + ':' + sNodeName;
 299+ } else {
291300 if ( sNodeName.StartsWith( 'fck:' ) )
292 - sNodeName = sNodeName.Remove( 0,4 ) ;
 301+ sNodeName = sNodeName.Remove( 0, 4 );
293302 }
294303
295304 // Check if the node name is valid, otherwise ignore this tag.
296305 // If the nodeName starts with a slash, it is a orphan closing tag.
297306 // On some strange cases, the nodeName is empty, even if the node exists.
298307 if ( !FCKRegexLib.ElementName.test( sNodeName ) )
299 - return ;
 308+ return;
300309
301 - if ( sNodeName == 'br' && ( this._inPre || this._inLSpace ) )
302 - {
303 - stringBuilder.push( "\n" ) ;
 310+ if ( sNodeName == 'br' && ( this._inPre || this._inLSpace ) ){
 311+ stringBuilder.push( "\n" );
304312 if ( this._inLSpace )
305 - stringBuilder.push( " " ) ;
306 - return ;
 313+ stringBuilder.push( " " );
 314+ return;
307315 }
308316
309317 // Remove the <br> if it is a bogus node.
310318 if ( sNodeName == 'br' && htmlNode.getAttribute( 'type', 2 ) == '_moz' )
311 - return ;
 319+ return;
312320
313321 // The already processed nodes must be marked to avoid then to be duplicated (bad formatted HTML).
314322 // So here, the "mark" is checked... if the element is Ok, then mark it.
315323 if ( htmlNode._fckxhtmljob && htmlNode._fckxhtmljob == FCKXHtml.CurrentJobNum )
316 - return ;
 324+ return;
317325
318 - var basicElement = this._BasicElements[ sNodeName ] ;
319 - if ( basicElement )
320 - {
 326+ var basicElement = this._BasicElements[ sNodeName ];
 327+ if ( basicElement ){
321328 var basic0 = basicElement[0];
322329 var basic1 = basicElement[1];
323330
324 - if ( ( basicElement[0] == "''" || basicElement[0] == "'''" ) && stringBuilder.length > 2 )
325 - {
 331+ if ( ( basicElement[0] == "''" || basicElement[0] == "'''" ) && stringBuilder.length > 2 ){
326332 var pr1 = stringBuilder[stringBuilder.length-1];
327333 var pr2 = stringBuilder[stringBuilder.length-2];
328334
329335 if ( pr1 + pr2 == "'''''") {
330 - if ( basicElement[0] == "''")
331 - {
 336+ if ( basicElement[0] == "''" ){
332337 basic0 = '<i>';
333338 basic1 = '</i>';
334339 }
335 - if ( basicElement[0] == "'''")
336 - {
 340+ if ( basicElement[0] == "'''" ){
337341 basic0 = '<b>';
338342 basic1 = '</b>';
339343 }
@@ -340,17 +344,15 @@
341345 }
342346
343347 if ( basic0 )
344 - stringBuilder.push( basic0 ) ;
 348+ stringBuilder.push( basic0 );
345349
346 - var len = stringBuilder.length ;
 350+ var len = stringBuilder.length;
347351
348 - if ( !basicElement[2] )
349 - {
350 - this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
 352+ if ( !basicElement[2] ){
 353+ this._AppendChildNodes( htmlNode, stringBuilder, prefix );
351354 // only empty element inside, remove it to avoid quotes
352 - if ( ( stringBuilder.length == len || (stringBuilder.length == len + 1 && !stringBuilder[len].length) )
353 - && basicElement[0] && basicElement[0].charAt(0) == "'")
354 - {
 355+ if ( ( stringBuilder.length == len || ( stringBuilder.length == len + 1 && !stringBuilder[len].length ) )
 356+ && basicElement[0] && basicElement[0].charAt(0) == "'" ){
355357 stringBuilder.pop();
356358 stringBuilder.pop();
357359 return;
@@ -358,641 +360,588 @@
359361 }
360362
361363 if ( basic1 )
362 - stringBuilder.push( basic1 ) ;
363 - }
364 - else
365 - {
366 - switch ( sNodeName )
367 - {
 364+ stringBuilder.push( basic1 );
 365+ } else {
 366+ switch ( sNodeName ){
368367 case 'ol' :
369368 case 'ul' :
370 - var isFirstLevel = !htmlNode.parentNode.nodeName.IEquals( 'ul', 'ol', 'li', 'dl', 'dt', 'dd' ) ;
 369+ var isFirstLevel = !htmlNode.parentNode.nodeName.IEquals( 'ul', 'ol', 'li', 'dl', 'dt', 'dd' );
371370
372 - this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
 371+ this._AppendChildNodes( htmlNode, stringBuilder, prefix );
373372
374373 if ( isFirstLevel && stringBuilder[ stringBuilder.length - 1 ] != "\n" ) {
375 - stringBuilder.push( '\n' ) ;
 374+ stringBuilder.push( '\n' );
376375 }
377376
378 - break ;
 377+ break;
379378
380379 case 'li' :
381380
382 - if( stringBuilder.length > 1)
383 - {
384 - var sLastStr = stringBuilder[ stringBuilder.length - 1 ] ;
385 - if ( sLastStr != ";" && sLastStr != ":" && sLastStr != "#" && sLastStr != "*")
386 - stringBuilder.push( '\n' + prefix ) ;
 381+ if( stringBuilder.length > 1 ){
 382+ var sLastStr = stringBuilder[ stringBuilder.length - 1 ];
 383+ if ( sLastStr != ";" && sLastStr != ":" && sLastStr != "#" && sLastStr != "*" )
 384+ stringBuilder.push( '\n' + prefix );
387385 }
388386
389 - var parent = htmlNode.parentNode ;
390 - var listType = "#" ;
 387+ var parent = htmlNode.parentNode;
 388+ var listType = "#";
391389
392 - while ( parent )
393 - {
394 - if ( parent.nodeName.toLowerCase() == 'ul' )
395 - {
396 - listType = "*" ;
397 - break ;
 390+ while ( parent ){
 391+ if ( parent.nodeName.toLowerCase() == 'ul' ){
 392+ listType = "*";
 393+ break;
 394+ } else if ( parent.nodeName.toLowerCase() == 'ol' ){
 395+ listType = "#";
 396+ break;
398397 }
399 - else if ( parent.nodeName.toLowerCase() == 'ol' )
400 - {
401 - listType = "#" ;
402 - break ;
403 - }
404398 else if ( parent.nodeName.toLowerCase() != 'li' )
405 - break ;
 399+ break;
406400
407 - parent = parent.parentNode ;
 401+ parent = parent.parentNode;
408402 }
409403
410 - stringBuilder.push( listType ) ;
411 - this._AppendChildNodes( htmlNode, stringBuilder, prefix + listType ) ;
 404+ stringBuilder.push( listType );
 405+ this._AppendChildNodes( htmlNode, stringBuilder, prefix + listType );
412406
413 - break ;
 407+ break;
414408
415409 case 'a' :
416410
417411 var pipeline = true;
418412 // Get the actual Link href.
419 - var href = htmlNode.getAttribute( '_fcksavedurl' ) ;
420 - var hrefType = htmlNode.getAttribute( '_fck_mw_type' ) || '' ;
 413+ var href = htmlNode.getAttribute( '_fcksavedurl' );
 414+ var hrefType = htmlNode.getAttribute( '_fck_mw_type' ) || '';
421415
422416 if ( href == null )
423 - href = htmlNode.getAttribute( 'href' , 2 ) || '' ;
 417+ href = htmlNode.getAttribute( 'href' , 2 ) || '';
424418
425 - var isWikiUrl = true ;
 419+ var isWikiUrl = true;
426420
427421 if ( hrefType == "media" )
428 - stringBuilder.push( '[[Media:' ) ;
429 - else if ( htmlNode.className == "extiw" )
430 - {
431 - stringBuilder.push( '[[' ) ;
 422+ stringBuilder.push( '[[Media:' );
 423+ else if ( htmlNode.className == "extiw" ){
 424+ stringBuilder.push( '[[' );
432425 var isWikiUrl = true;
 426+ } else {
 427+ var isWikiUrl = !( href.StartsWith( 'mailto:' ) || /^\w+:\/\//.test( href ) );
 428+ stringBuilder.push( isWikiUrl ? '[[' : '[' );
433429 }
434 - else
435 - {
436 - var isWikiUrl = !( href.StartsWith( 'mailto:' ) || /^\w+:\/\//.test( href ) ) ;
437 - stringBuilder.push( isWikiUrl ? '[[' : '[' ) ;
438 - }
439 - //#2223
440 - if (htmlNode.getAttribute( '_fcknotitle' ) && htmlNode.getAttribute( '_fcknotitle' ) == "true")
441 - {
442 - var testHref = FCKConfig.ProtectedSource.Revert( href, 0 ) ;
443 - var testInner = FCKConfig.ProtectedSource.Revert( htmlNode.innerHTML, 0 ) ;
 430+ // #2223
 431+ if( htmlNode.getAttribute( '_fcknotitle' ) && htmlNode.getAttribute( '_fcknotitle' ) == "true" ){
 432+ var testHref = FCKConfig.ProtectedSource.Revert( href, 0 );
 433+ var testInner = FCKConfig.ProtectedSource.Revert( htmlNode.innerHTML, 0 );
444434 if ( href.toLowerCase().StartsWith( 'category:' ) )
445 - testInner = 'Category:' + testInner ;
 435+ testInner = 'Category:' + testInner;
446436 if ( testHref.toLowerCase().StartsWith( 'rtecolon' ) )
447 - testHref = testHref.replace( /rtecolon/, ":" ) ;
448 - testInner = testInner.replace( /&amp;/, "&" ) ;
 437+ testHref = testHref.replace( /rtecolon/, ":" );
 438+ testInner = testInner.replace( /&amp;/, "&" );
449439 if ( testInner == testHref )
450 - pipeline = false ;
 440+ pipeline = false;
451441 }
452 - if (href.toLowerCase().StartsWith( 'rtecolon' )) //change 'rtecolon=' => ':' in links
453 - {
 442+ if( href.toLowerCase().StartsWith( 'rtecolon' ) ){ // change 'rtecolon=' => ':' in links
454443 stringBuilder.push(':');
455444 href = href.substring(8);
456445 }
457 - stringBuilder.push( href ) ;
458 - if ( pipeline && htmlNode.innerHTML != '[n]' && (!isWikiUrl || href != htmlNode.innerHTML || !href.toLowerCase().StartsWith("category:")))
459 - {
460 - stringBuilder.push( isWikiUrl? '|' : ' ' ) ;
461 - this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
 446+ stringBuilder.push( href );
 447+ if ( pipeline && htmlNode.innerHTML != '[n]' && ( !isWikiUrl || href != htmlNode.innerHTML || !href.toLowerCase().StartsWith( "category:" ) ) ){
 448+ stringBuilder.push( isWikiUrl? '|' : ' ' );
 449+ this._AppendChildNodes( htmlNode, stringBuilder, prefix );
462450 }
463 - stringBuilder.push( isWikiUrl ? ']]' : ']' ) ;
 451+ stringBuilder.push( isWikiUrl ? ']]' : ']' );
464452
465 - break ;
 453+ break;
466454
467455 case 'dl' :
468456
469 - this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
470 - var isFirstLevel = !htmlNode.parentNode.nodeName.IEquals( 'ul', 'ol', 'li', 'dl', 'dd', 'dt' ) ;
 457+ this._AppendChildNodes( htmlNode, stringBuilder, prefix );
 458+ var isFirstLevel = !htmlNode.parentNode.nodeName.IEquals( 'ul', 'ol', 'li', 'dl', 'dd', 'dt' );
471459 if ( isFirstLevel && stringBuilder[ stringBuilder.length - 1 ] != "\n" )
472 - stringBuilder.push( '\n') ;
 460+ stringBuilder.push( '\n' );
473461
474 - break ;
 462+ break;
475463
476464 case 'dt' :
477465
478 - if( stringBuilder.length > 1)
479 - {
480 - var sLastStr = stringBuilder[ stringBuilder.length - 1 ] ;
 466+ if( stringBuilder.length > 1 ){
 467+ var sLastStr = stringBuilder[ stringBuilder.length - 1 ];
481468 if ( sLastStr != ";" && sLastStr != ":" && sLastStr != "#" && sLastStr != "*" )
482 - stringBuilder.push( '\n' + prefix ) ;
 469+ stringBuilder.push( '\n' + prefix );
483470 }
484 - stringBuilder.push( ';' ) ;
485 - this._AppendChildNodes( htmlNode, stringBuilder, prefix + ";") ;
 471+ stringBuilder.push( ';' );
 472+ this._AppendChildNodes( htmlNode, stringBuilder, prefix + ";" );
486473
487 - break ;
 474+ break;
488475
489476 case 'dd' :
490477
491 - if( stringBuilder.length > 1)
492 - {
493 - var sLastStr = stringBuilder[ stringBuilder.length - 1 ] ;
 478+ if( stringBuilder.length > 1 ){
 479+ var sLastStr = stringBuilder[ stringBuilder.length - 1 ];
494480 if ( sLastStr != ";" && sLastStr != ":" && sLastStr != "#" && sLastStr != "*" )
495 - stringBuilder.push( '\n' + prefix ) ;
 481+ stringBuilder.push( '\n' + prefix );
496482 }
497 - stringBuilder.push( ':' ) ;
498 - this._AppendChildNodes( htmlNode, stringBuilder, prefix + ":" ) ;
 483+ stringBuilder.push( ':' );
 484+ this._AppendChildNodes( htmlNode, stringBuilder, prefix + ":" );
499485
500 - break ;
 486+ break;
501487
502488 case 'table' :
503489
504 - var attribs = this._GetAttributesStr( htmlNode ) ;
 490+ var attribs = this._GetAttributesStr( htmlNode );
505491
506 - stringBuilder.push( '\n{|' ) ;
 492+ stringBuilder.push( '\n{|' );
507493 if ( attribs.length > 0 )
508 - stringBuilder.push( attribs ) ;
509 - stringBuilder.push( '\n' ) ;
 494+ stringBuilder.push( attribs );
 495+ stringBuilder.push( '\n' );
510496
511 - if ( htmlNode.caption && htmlNode.caption.innerHTML.length > 0 )
512 - {
513 - stringBuilder.push( '|+ ' ) ;
514 - this._AppendChildNodes( htmlNode.caption, stringBuilder, prefix ) ;
515 - stringBuilder.push( '\n' ) ;
 497+ if ( htmlNode.caption && htmlNode.caption.innerHTML.length > 0 ){
 498+ stringBuilder.push( '|+ ' );
 499+ this._AppendChildNodes( htmlNode.caption, stringBuilder, prefix );
 500+ stringBuilder.push( '\n' );
516501 }
517502
518 - for ( var r = 0 ; r < htmlNode.rows.length ; r++ )
519 - {
520 - attribs = this._GetAttributesStr( htmlNode.rows[r] ) ;
 503+ for ( var r = 0; r < htmlNode.rows.length; r++ ){
 504+ attribs = this._GetAttributesStr( htmlNode.rows[r] );
521505
522 - stringBuilder.push( '|-' ) ;
 506+ stringBuilder.push( '|-' );
523507 if ( attribs.length > 0 )
524 - stringBuilder.push( attribs ) ;
525 - stringBuilder.push( '\n' ) ;
 508+ stringBuilder.push( attribs );
 509+ stringBuilder.push( '\n' );
526510
527 - for ( var c = 0 ; c < htmlNode.rows[r].cells.length ; c++ )
528 - {
529 - attribs = this._GetAttributesStr( htmlNode.rows[r].cells[c] ) ;
 511+ for ( var c = 0; c < htmlNode.rows[r].cells.length; c++ ){
 512+ attribs = this._GetAttributesStr( htmlNode.rows[r].cells[c] );
530513
531514 if ( htmlNode.rows[r].cells[c].tagName.toLowerCase() == "th" )
532 - stringBuilder.push( '!' ) ;
 515+ stringBuilder.push( '!' );
533516 else
534 - stringBuilder.push( '|' ) ;
 517+ stringBuilder.push( '|' );
535518
536519 if ( attribs.length > 0 )
537 - stringBuilder.push( attribs + ' |' ) ;
 520+ stringBuilder.push( attribs + ' |' );
538521
539 - stringBuilder.push( ' ' ) ;
 522+ stringBuilder.push( ' ' );
540523
541 - this._IsInsideCell = true ;
542 - this._AppendChildNodes( htmlNode.rows[r].cells[c], stringBuilder, prefix ) ;
543 - this._IsInsideCell = false ;
 524+ this._IsInsideCell = true;
 525+ this._AppendChildNodes( htmlNode.rows[r].cells[c], stringBuilder, prefix );
 526+ this._IsInsideCell = false;
544527
545 - stringBuilder.push( '\n' ) ;
 528+ stringBuilder.push( '\n' );
546529 }
547530 }
548531
549 - stringBuilder.push( '|}\n' ) ;
 532+ stringBuilder.push( '|}\n' );
550533
551 - break ;
 534+ break;
552535
553536 case 'img' :
554537
555 - var formula = htmlNode.getAttribute( '_fck_mw_math' ) ;
 538+ var formula = htmlNode.getAttribute( '_fck_mw_math' );
556539
557 - if ( formula && formula.length > 0 )
558 - {
559 - stringBuilder.push( '<math>' ) ;
560 - stringBuilder.push( formula ) ;
561 - stringBuilder.push( '</math>' ) ;
562 - return ;
 540+ if ( formula && formula.length > 0 ){
 541+ stringBuilder.push( '<math>' );
 542+ stringBuilder.push( formula );
 543+ stringBuilder.push( '</math>' );
 544+ return;
563545 }
564546
565 - var imgName = htmlNode.getAttribute( '_fck_mw_filename' ) ;
566 - var imgCaption = htmlNode.getAttribute( 'alt' ) || '' ;
567 - var imgType = htmlNode.getAttribute( '_fck_mw_type' ) || '' ;
568 - var imgLocation = htmlNode.getAttribute( '_fck_mw_location' ) || '' ;
569 - var imgWidth = htmlNode.getAttribute( '_fck_mw_width' ) || '' ;
570 - var imgHeight = htmlNode.getAttribute( '_fck_mw_height' ) || '' ;
571 - var imgStyleWidth = ( parseInt(htmlNode.style.width) || '' ) + '' ;
572 - var imgStyleHeight = ( parseInt(htmlNode.style.height) || '' ) + '' ;
573 - var imgRealWidth = ( htmlNode.getAttribute( 'width' ) || '' ) + '' ;
574 - var imgRealHeight = ( htmlNode.getAttribute( 'height' ) || '' ) + '' ;
 547+ var imgName = htmlNode.getAttribute( '_fck_mw_filename' );
 548+ var imgCaption = htmlNode.getAttribute( 'alt' ) || '';
 549+ var imgType = htmlNode.getAttribute( '_fck_mw_type' ) || '';
 550+ var imgLocation = htmlNode.getAttribute( '_fck_mw_location' ) || '';
 551+ var imgWidth = htmlNode.getAttribute( '_fck_mw_width' ) || '';
 552+ var imgHeight = htmlNode.getAttribute( '_fck_mw_height' ) || '';
 553+ var imgStyleWidth = ( parseInt(htmlNode.style.width) || '' ) + '';
 554+ var imgStyleHeight = ( parseInt(htmlNode.style.height) || '' ) + '';
 555+ var imgRealWidth = ( htmlNode.getAttribute( 'width' ) || '' ) + '';
 556+ var imgRealHeight = ( htmlNode.getAttribute( 'height' ) || '' ) + '';
575557
576 - stringBuilder.push( '[[Image:' ) ;
577 - stringBuilder.push( imgName ) ;
 558+ stringBuilder.push( '[[Image:' );
 559+ stringBuilder.push( imgName );
578560
579561 if ( imgStyleWidth.length > 0 )
580 - imgWidth = imgStyleWidth ;
 562+ imgWidth = imgStyleWidth;
581563 else if ( imgWidth.length > 0 && imgRealWidth.length > 0 )
582 - imgWidth = imgRealWidth ;
 564+ imgWidth = imgRealWidth;
583565
584566 if ( imgStyleHeight.length > 0 )
585 - imgHeight = imgStyleHeight ;
 567+ imgHeight = imgStyleHeight;
586568 else if ( imgHeight.length > 0 && imgRealHeight.length > 0 )
587 - imgHeight = imgRealHeight ;
 569+ imgHeight = imgRealHeight;
588570
589571 if ( imgType.length > 0 )
590 - stringBuilder.push( '|' + imgType ) ;
 572+ stringBuilder.push( '|' + imgType );
591573
592574 if ( imgLocation.length > 0 )
593 - stringBuilder.push( '|' + imgLocation ) ;
 575+ stringBuilder.push( '|' + imgLocation );
594576
595 - if ( imgWidth.length > 0 )
596 - {
597 - stringBuilder.push( '|' + imgWidth ) ;
 577+ if ( imgWidth.length > 0 ){
 578+ stringBuilder.push( '|' + imgWidth );
598579
599580 if ( imgHeight.length > 0 )
600 - stringBuilder.push( 'x' + imgHeight ) ;
 581+ stringBuilder.push( 'x' + imgHeight );
601582
602 - stringBuilder.push( 'px' ) ;
 583+ stringBuilder.push( 'px' );
603584 }
604585
605586 if ( imgCaption.length > 0 )
606 - stringBuilder.push( '|' + imgCaption ) ;
 587+ stringBuilder.push( '|' + imgCaption );
607588
608 - stringBuilder.push( ']]' ) ;
 589+ stringBuilder.push( ']]' );
609590
610 - break ;
 591+ break;
611592
612593 case 'span' :
613 - switch ( htmlNode.className )
614 - {
 594+ switch ( htmlNode.className ){
615595 case 'fck_mw_source' :
616 - var refLang = htmlNode.getAttribute( 'lang' ) ;
 596+ var refLang = htmlNode.getAttribute( 'lang' );
617597
618 - stringBuilder.push( '<source' ) ;
619 - stringBuilder.push( ' lang="' + refLang + '"' ) ;
620 - stringBuilder.push( '>' ) ;
621 - stringBuilder.push( FCKTools.HTMLDecode(htmlNode.innerHTML).replace(/fckLR/g,'\r\n') ) ;
622 - stringBuilder.push( '</source>' ) ;
623 - return ;
 598+ stringBuilder.push( '<source' );
 599+ stringBuilder.push( ' lang="' + refLang + '"' );
 600+ stringBuilder.push( '>' );
 601+ stringBuilder.push( FCKTools.HTMLDecode(htmlNode.innerHTML).replace(/fckLR/g,'\r\n') );
 602+ stringBuilder.push( '</source>' );
 603+ return;
624604
625605 case 'fck_mw_ref' :
626 - var refName = htmlNode.getAttribute( 'name' ) ;
 606+ var refName = htmlNode.getAttribute( 'name' );
627607
628 - stringBuilder.push( '<ref' ) ;
 608+ stringBuilder.push( '<ref' );
629609
630610 if ( refName && refName.length > 0 )
631 - stringBuilder.push( ' name="' + refName + '"' ) ;
 611+ stringBuilder.push( ' name="' + refName + '"' );
632612
633613 if ( htmlNode.innerHTML.length == 0 )
634 - stringBuilder.push( ' />' ) ;
635 - else
636 - {
637 - stringBuilder.push( '>' ) ;
638 - stringBuilder.push( htmlNode.innerHTML ) ;
639 - stringBuilder.push( '</ref>' ) ;
 614+ stringBuilder.push( ' />' );
 615+ else {
 616+ stringBuilder.push( '>' );
 617+ stringBuilder.push( htmlNode.innerHTML );
 618+ stringBuilder.push( '</ref>' );
640619 }
641 - return ;
 620+ return;
642621
643622 case 'fck_mw_references' :
644 - stringBuilder.push( '<references />' ) ;
645 - return ;
 623+ stringBuilder.push( '<references />' );
 624+ return;
646625
647626 case 'fck_mw_signature' :
648 - stringBuilder.push( FCKConfig.WikiSignature ) ;
649 - return ;
 627+ stringBuilder.push( FCKConfig.WikiSignature );
 628+ return;
650629
651630 case 'fck_mw_template' :
652 - stringBuilder.push( FCKTools.HTMLDecode(htmlNode.innerHTML).replace(/fckLR/g,'\r\n') ) ;
653 - return ;
 631+ stringBuilder.push( FCKTools.HTMLDecode(htmlNode.innerHTML).replace(/fckLR/g,'\r\n') );
 632+ return;
654633
655634 case 'fck_mw_magic' :
656 - stringBuilder.push( htmlNode.innerHTML ) ;
657 - return ;
 635+ stringBuilder.push( htmlNode.innerHTML );
 636+ return;
658637
659638 case 'fck_mw_nowiki' :
660 - sNodeName = 'nowiki' ;
661 - break ;
 639+ sNodeName = 'nowiki';
 640+ break;
662641
663642 case 'fck_mw_html' :
664 - sNodeName = 'html' ;
665 - break ;
 643+ sNodeName = 'html';
 644+ break;
666645
667646 case 'fck_mw_includeonly' :
668 - sNodeName = 'includeonly' ;
669 - break ;
 647+ sNodeName = 'includeonly';
 648+ break;
670649
671650 case 'fck_mw_noinclude' :
672 - sNodeName = 'noinclude' ;
673 - break ;
 651+ sNodeName = 'noinclude';
 652+ break;
674653
675654 case 'fck_mw_gallery' :
676 - sNodeName = 'gallery' ;
677 - break ;
 655+ sNodeName = 'gallery';
 656+ break;
678657
679658 case 'fck_mw_onlyinclude' :
680 - sNodeName = 'onlyinclude' ;
 659+ sNodeName = 'onlyinclude';
681660
682 - break ;
 661+ break;
683662 }
684663
685664 // Change the node name and fell in the "default" case.
686665 if ( htmlNode.getAttribute( '_fck_mw_customtag' ) )
687 - sNodeName = htmlNode.getAttribute( '_fck_mw_tagname' ) ;
 666+ sNodeName = htmlNode.getAttribute( '_fck_mw_tagname' );
688667
689668 case 'pre' :
690 - var attribs = this._GetAttributesStr( htmlNode ) ;
 669+ var attribs = this._GetAttributesStr( htmlNode );
691670
692 - if ( htmlNode.className == "_fck_mw_lspace")
693 - {
694 - stringBuilder.push( "\n " ) ;
695 - this._inLSpace = true ;
696 - this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
697 - this._inLSpace = false ;
698 - var len = stringBuilder.length ;
699 - if ( len>1 ) {
 671+ if ( htmlNode.className == "_fck_mw_lspace" ){
 672+ stringBuilder.push( "\n " );
 673+ this._inLSpace = true;
 674+ this._AppendChildNodes( htmlNode, stringBuilder, prefix );
 675+ this._inLSpace = false;
 676+ var len = stringBuilder.length;
 677+ if ( len > 1 ) {
700678 var tail = stringBuilder[len-2] + stringBuilder[len-1];
701 - if ( len>2 ) {
702 - tail = stringBuilder[len-3] + tail ;
 679+ if ( len > 2 ) {
 680+ tail = stringBuilder[len-3] + tail;
703681 }
704682 if (tail.EndsWith("\n ")) {
705683 stringBuilder[len-1] = stringBuilder[len-1].replace(/ $/, "");
 684+ } else if ( !tail.EndsWith("\n") ) {
 685+ stringBuilder.push( "\n" );
706686 }
707 - else if ( !tail.EndsWith("\n") ) {
708 - stringBuilder.push( "\n" ) ;
709 - }
710687 }
711 - }
712 - else
713 - {
714 - stringBuilder.push( '<' ) ;
715 - stringBuilder.push( sNodeName ) ;
 688+ } else {
 689+ stringBuilder.push( '<' );
 690+ stringBuilder.push( sNodeName );
716691
717692 if ( attribs.length > 0 )
718 - stringBuilder.push( attribs ) ;
719 - if(htmlNode.innerHTML == "")
720 - stringBuilder.push( ' />' ) ;
721 - else
722 - {
723 - stringBuilder.push( '>' ) ;
724 - this._inPre = true ;
725 - this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
726 - this._inPre = false ;
 693+ stringBuilder.push( attribs );
 694+ if( htmlNode.innerHTML == '' )
 695+ stringBuilder.push( ' />' );
 696+ else {
 697+ stringBuilder.push( '>' );
 698+ this._inPre = true;
 699+ this._AppendChildNodes( htmlNode, stringBuilder, prefix );
 700+ this._inPre = false;
727701
728 - stringBuilder.push( '<\/' ) ;
729 - stringBuilder.push( sNodeName ) ;
730 - stringBuilder.push( '>' ) ;
 702+ stringBuilder.push( '<\/' );
 703+ stringBuilder.push( sNodeName );
 704+ stringBuilder.push( '>' );
731705 }
732706 }
733707
734 - break ;
 708+ break;
735709 default :
736 - var attribs = this._GetAttributesStr( htmlNode ) ;
 710+ var attribs = this._GetAttributesStr( htmlNode );
737711
738 - stringBuilder.push( '<' ) ;
739 - stringBuilder.push( sNodeName ) ;
 712+ stringBuilder.push( '<' );
 713+ stringBuilder.push( sNodeName );
740714
741715 if ( attribs.length > 0 )
742 - stringBuilder.push( attribs ) ;
 716+ stringBuilder.push( attribs );
743717
744 - stringBuilder.push( '>' ) ;
745 - this._AppendChildNodes( htmlNode, stringBuilder, prefix ) ;
746 - stringBuilder.push( '<\/' ) ;
747 - stringBuilder.push( sNodeName ) ;
748 - stringBuilder.push( '>' ) ;
749 - break ;
 718+ stringBuilder.push( '>' );
 719+ this._AppendChildNodes( htmlNode, stringBuilder, prefix );
 720+ stringBuilder.push( '<\/' );
 721+ stringBuilder.push( sNodeName );
 722+ stringBuilder.push( '>' );
 723+ break;
750724 }
751725 }
752726
753 - htmlNode._fckxhtmljob = FCKXHtml.CurrentJobNum ;
754 - return ;
 727+ htmlNode._fckxhtmljob = FCKXHtml.CurrentJobNum;
 728+ return;
755729
756730 // Text Node.
757731 case 3 :
758732
759 - var parentIsSpecialTag = htmlNode.parentNode.getAttribute( '_fck_mw_customtag' ) ;
 733+ var parentIsSpecialTag = htmlNode.parentNode.getAttribute( '_fck_mw_customtag' );
760734 var textValue = htmlNode.nodeValue;
761 - if ( !parentIsSpecialTag )
762 - {
 735+ if ( !parentIsSpecialTag ){
763736 if ( FCKBrowserInfo.IsIE && this._inLSpace ) {
764 - textValue = textValue.replace( /\r/g, "\r " ) ;
 737+ textValue = textValue.replace( /\r/g, "\r " );
765738 if (textValue.EndsWith( "\r " )) {
766739 textValue = textValue.replace( /\r $/, "\r" );
767740 }
768741 }
769742 if ( !FCKBrowserInfo.IsIE && this._inLSpace ) {
770 - textValue = textValue.replace( /\n(?! )/g, "\n " ) ;
 743+ textValue = textValue.replace( /\n(?! )/g, "\n " );
771744 }
772745
773746 if (!this._inLSpace && !this._inPre) {
774 - textValue = textValue.replace( /[\n\t]/g, ' ' ) ;
 747+ textValue = textValue.replace( /[\n\t]/g, ' ' );
775748 }
776749
777 - textValue = FCKTools.HTMLEncode( textValue ) ;
778 - textValue = textValue.replace( /\u00A0/g, '&nbsp;' ) ;
 750+ textValue = FCKTools.HTMLEncode( textValue );
 751+ textValue = textValue.replace( /\u00A0/g, '&nbsp;' );
779752
780753 if ( ( !htmlNode.previousSibling ||
781 - ( stringBuilder.length > 0 && stringBuilder[ stringBuilder.length - 1 ].EndsWith( '\n' ) ) ) && !this._inLSpace && !this._inPre )
782 - {
783 - textValue = textValue.LTrim() ;
 754+ ( stringBuilder.length > 0 && stringBuilder[ stringBuilder.length - 1 ].EndsWith( '\n' ) ) ) && !this._inLSpace && !this._inPre ){
 755+ textValue = textValue.LTrim();
784756 }
785757
786 - if ( !htmlNode.nextSibling && !this._inLSpace && !this._inPre && (!htmlNode.parentNode || !htmlNode.parentNode.nextSibling))
787 - textValue = textValue.RTrim() ;
 758+ if ( !htmlNode.nextSibling && !this._inLSpace && !this._inPre && ( !htmlNode.parentNode || !htmlNode.parentNode.nextSibling ) )
 759+ textValue = textValue.RTrim();
788760
789 - if (!this._inLSpace && !this._inPre)
790 - textValue = textValue.replace( / {2,}/g, ' ' ) ;
 761+ if( !this._inLSpace && !this._inPre )
 762+ textValue = textValue.replace( / {2,}/g, ' ' );
791763
792764 if ( this._inLSpace && textValue.length == 1 && textValue.charCodeAt(0) == 13 )
793 - textValue = textValue + " " ;
 765+ textValue = textValue + " ";
794766
795767 if ( !this._inLSpace && !this._inPre && textValue == " " ) {
796768 var len = stringBuilder.length;
797 - if (len > 1) {
 769+ if( len > 1 ) {
798770 var tail = stringBuilder[len-2] + stringBuilder[len-1];
799771 if ( tail.toString().EndsWith( "\n" ) )
800 - textValue = "";
 772+ textValue = '';
801773 }
802774 }
803775
804776 if ( this._IsInsideCell ) {
805 - var result, linkPattern = new RegExp( "\\[\\[.*?\\]\\]", "g" ) ;
 777+ var result, linkPattern = new RegExp( "\\[\\[.*?\\]\\]", "g" );
806778 while( result = linkPattern.exec( textValue ) ) {
807 - textValue = textValue.replace( result, result.toString().replace( /\|/g, "<!--LINK_PIPE-->" ) ) ;
 779+ textValue = textValue.replace( result, result.toString().replace( /\|/g, "<!--LINK_PIPE-->" ) );
808780 }
809 - textValue = textValue.replace( /\|/g, '&#124;' ) ;
810 - textValue = textValue.replace( /<!--LINK_PIPE-->/g, '|' ) ;
 781+ textValue = textValue.replace( /\|/g, '&#124;' );
 782+ textValue = textValue.replace( /<!--LINK_PIPE-->/g, '|' );
811783 }
812 - }
813 - else
814 - {
 784+ } else {
815785 textValue = FCKTools.HTMLDecode(textValue).replace(/fckLR/g,'\r\n');
816786 }
817787
818 - stringBuilder.push( textValue ) ;
819 - return ;
 788+ stringBuilder.push( textValue );
 789+ return;
820790
821791 // Comment
822792 case 8 :
823793 // IE catches the <!DOTYPE ... > as a comment, but it has no
824794 // innerHTML, so we can catch it, and ignore it.
825795 if ( FCKBrowserInfo.IsIE && !htmlNode.innerHTML )
826 - return ;
 796+ return;
827797
828 - stringBuilder.push( "<!--" ) ;
 798+ stringBuilder.push( "<!--" );
829799
830 - try { stringBuilder.push( htmlNode.nodeValue ) ; }
831 - catch (e) { /* Do nothing... probably this is a wrong format comment. */ }
 800+ try {
 801+ stringBuilder.push( htmlNode.nodeValue );
 802+ } catch( e ) { /* Do nothing... probably this is a wrong format comment. */ }
832803
833 - stringBuilder.push( "-->" ) ;
834 - return ;
 804+ stringBuilder.push( "-->" );
 805+ return;
835806 }
836807 },
837808
838 - _AppendChildNodes : function( htmlNode, stringBuilder, listPrefix )
839 - {
840 - var child = htmlNode.firstChild ;
 809+ _AppendChildNodes : function( htmlNode, stringBuilder, listPrefix ){
 810+ var child = htmlNode.firstChild;
841811
842 - while ( child )
843 - {
844 - this._AppendNode( child, stringBuilder, listPrefix ) ;
845 - child = child.nextSibling ;
 812+ while ( child ){
 813+ this._AppendNode( child, stringBuilder, listPrefix );
 814+ child = child.nextSibling;
846815 }
847816 },
848817
849 - _GetAttributesStr : function( htmlNode )
850 - {
851 - var attStr = '' ;
852 - var aAttributes = htmlNode.attributes ;
 818+ _GetAttributesStr : function( htmlNode ){
 819+ var attStr = '';
 820+ var aAttributes = htmlNode.attributes;
853821
854 - for ( var n = 0 ; n < aAttributes.length ; n++ )
855 - {
856 - var oAttribute = aAttributes[n] ;
 822+ for ( var n = 0; n < aAttributes.length; n++ ){
 823+ var oAttribute = aAttributes[n];
857824
858 - if ( oAttribute.specified )
859 - {
860 - var sAttName = oAttribute.nodeName.toLowerCase() ;
861 - var sAttValue ;
 825+ if ( oAttribute.specified ){
 826+ var sAttName = oAttribute.nodeName.toLowerCase();
 827+ var sAttValue;
862828
863829 // Ignore any attribute starting with "_fck".
864830 if ( sAttName.StartsWith( '_fck' ) )
865 - continue ;
 831+ continue;
866832 // There is a bug in Mozilla that returns '_moz_xxx' attributes as specified.
867833 else if ( sAttName.indexOf( '_moz' ) == 0 )
868 - continue ;
 834+ continue;
869835 // For "class", nodeValue must be used.
870 - else if ( sAttName == 'class' )
871 - {
 836+ else if ( sAttName == 'class' ){
872837 // Get the class, removing any fckXXX we can have there.
873 - sAttValue = oAttribute.nodeValue.replace( /(^|\s*)fck\S+/, '' ).Trim() ;
 838+ sAttValue = oAttribute.nodeValue.replace( /(^|\s*)fck\S+/, '' ).Trim();
874839
875840 if ( sAttValue.length == 0 )
876 - continue ;
 841+ continue;
 842+ } else if ( sAttName == 'style' && FCKBrowserInfo.IsIE ) {
 843+ sAttValue = htmlNode.style.cssText.toLowerCase();
877844 }
878 - else if ( sAttName == 'style' && FCKBrowserInfo.IsIE ) {
879 - sAttValue = htmlNode.style.cssText.toLowerCase() ;
880 - }
881845 // XHTML doens't support attribute minimization like "CHECKED". It must be trasformed to cheched="checked".
882846 else if ( oAttribute.nodeValue === true )
883 - sAttValue = sAttName ;
 847+ sAttValue = sAttName;
884848 else
885 - sAttValue = htmlNode.getAttribute( sAttName, 2 ) ; // We must use getAttribute to get it exactly as it is defined.
 849+ sAttValue = htmlNode.getAttribute( sAttName, 2 ); // We must use getAttribute to get it exactly as it is defined.
886850
887851 // leave templates
888852 if ( sAttName.StartsWith( '{{' ) && sAttName.EndsWith( '}}' ) ) {
889 - attStr += ' ' + sAttName ;
 853+ attStr += ' ' + sAttName;
 854+ } else {
 855+ attStr += ' ' + sAttName + '="' + String(sAttValue).replace( '"', '&quot;' ) + '"';
890856 }
891 - else {
892 - attStr += ' ' + sAttName + '="' + String(sAttValue).replace( '"', '&quot;' ) + '"' ;
893 - }
894857 }
895858 }
896 - return attStr ;
 859+ return attStr;
897860 }
898 -} ;
 861+};
899862
900863 // Here we change the SwitchEditMode function to make the Ajax call when
901864 // switching from Wikitext.
902 -(function()
903 -{
904 - if (window.parent.showFCKEditor & (2|4)) //if popup or toggle link
905 - {
906 - var original_ULF = FCK.UpdateLinkedField ;
 865+(function(){
 866+ if( window.parent.showFCKEditor & ( 2 | 4 ) ){ // if popup or toggle link
 867+ var original_ULF = FCK.UpdateLinkedField;
907868 FCK.UpdateLinkedField = function(){
908 - if (window.parent.showFCKEditor & 1) //only if editor is up-to-date
909 - {
 869+ if( window.parent.showFCKEditor & 1 ){ // only if editor is up-to-date
910870 original_ULF.apply();
911871 }
912872 }
913873 }
914 - var original = FCK.SwitchEditMode ;
 874+ var original = FCK.SwitchEditMode;
915875 window.parent.oFCKeditor.ready = true;
916 - FCK.SwitchEditMode = function()
917 - {
918 - var args = arguments ;
 876+ FCK.SwitchEditMode = function(){
 877+ var args = arguments;
919878 window.parent.oFCKeditor.ready = false;
920 - var loadHTMLFromAjax = function( result )
921 - {
922 - FCK.EditingArea.Textarea.value = result.responseText ;
923 - original.apply( FCK, args ) ;
 879+ var loadHTMLFromAjax = function( result ){
 880+ FCK.EditingArea.Textarea.value = result.responseText;
 881+ original.apply( FCK, args );
924882 window.parent.oFCKeditor.ready = true;
925883 }
926 - var edittools_markup = parent.document.getElementById ('editpage-specialchars') ;
 884+ var edittools_markup = parent.document.getElementById( 'editpage-specialchars' );
927885
928 - if ( FCK.EditMode == FCK_EDITMODE_SOURCE )
929 - {
 886+ if ( FCK.EditMode == FCK_EDITMODE_SOURCE ){
930887 // Hide the textarea to avoid seeing the code change.
931 - FCK.EditingArea.Textarea.style.visibility = 'hidden' ;
932 - var loading = document.createElement( 'span' ) ;
933 - loading.innerHTML = '&nbsp;'+ (FCKLang.wikiLoadingWikitext || 'Loading Wikitext. Please wait...' )+'&nbsp;';
934 - loading.style.position = 'absolute' ;
935 - loading.style.left = '5px' ;
936 -// loading.style.backgroundColor = '#ff0000' ;
937 - FCK.EditingArea.Textarea.parentNode.appendChild( loading, FCK.EditingArea.Textarea ) ;
 888+ FCK.EditingArea.Textarea.style.visibility = 'hidden';
 889+ var loading = document.createElement( 'span' );
 890+ loading.innerHTML = '&nbsp;'+ ( FCKLang.wikiLoadingWikitext || 'Loading Wikitext. Please wait...' ) + '&nbsp;';
 891+ loading.style.position = 'absolute';
 892+ loading.style.left = '5px';
 893+// loading.style.backgroundColor = '#ff0000';
 894+ FCK.EditingArea.Textarea.parentNode.appendChild( loading, FCK.EditingArea.Textarea );
938895 // if we have a standard Edittools div, hide the one containing wikimarkup
939 - if (edittools_markup) {
940 - edittools_markup.style.display = 'none' ;
 896+ if( edittools_markup ) {
 897+ edittools_markup.style.display = 'none';
941898 }
942899
943900 // Use Ajax to transform the Wikitext to HTML.
944901 if( window.parent.popup ){
945 - window.parent.popup.parent.FCK_sajax( 'wfSajaxWikiToHTML', [FCK.EditingArea.Textarea.value], loadHTMLFromAjax ) ;
 902+ window.parent.popup.parent.FCK_sajax( 'wfSajaxWikiToHTML', [FCK.EditingArea.Textarea.value], loadHTMLFromAjax );
 903+ } else {
 904+ window.parent.FCK_sajax( 'wfSajaxWikiToHTML', [FCK.EditingArea.Textarea.value], loadHTMLFromAjax );
946905 }
947 - else{
948 - window.parent.FCK_sajax( 'wfSajaxWikiToHTML', [FCK.EditingArea.Textarea.value], loadHTMLFromAjax ) ;
 906+ } else {
 907+ original.apply( FCK, args );
 908+ if( edittools_markup ) {
 909+ edittools_markup.style.display = '';
949910 }
950 - }
951 - else {
952 - original.apply( FCK, args ) ;
953 - if (edittools_markup) {
954 - edittools_markup.style.display = '' ;
955 - }
956911 window.parent.oFCKeditor.ready = true;
957912 }
958913 }
959 -})() ;
 914+})();
960915
961916 // MediaWiki document processor.
962 -FCKDocumentProcessor.AppendNew().ProcessDocument = function( document )
963 -{
 917+FCKDocumentProcessor.AppendNew().ProcessDocument = function( document ){
964918 // #1011: change signatures to SPAN elements
965 - var aTextNodes = document.getElementsByTagName( '*' ) ;
966 - var i = 0 ;
 919+ var aTextNodes = document.getElementsByTagName( '*' );
 920+ var i = 0;
967921 var signatureRegExp = new RegExp( FCKConfig.WikiSignature.replace( /([*:.*?();|$])/g, "\\$1" ), "i" );
968 - while (element = aTextNodes[i++])
969 - {
970 - var nodes = element.childNodes ;
971 - var j = 0 ;
972 - while ( node = nodes[j++] )
973 - {
974 - if ( node.nodeType == 3 )
975 - {//textNode
976 - var index = 0 ;
 922+ while( element = aTextNodes[i++] ){
 923+ var nodes = element.childNodes;
 924+ var j = 0;
 925+ while ( node = nodes[j++] ){
 926+ if ( node.nodeType == 3 ){ // textNode
 927+ var index = 0;
977928
978 - while ( aSignatures = node.nodeValue.match( signatureRegExp ) )
979 - {
980 - index = node.nodeValue.indexOf( aSignatures[0] ) ;
981 - if ( index != -1 )
982 - {
983 - var e = FCK.EditorDocument.createElement( 'span' ) ;
 929+ while ( aSignatures = node.nodeValue.match( signatureRegExp ) ){
 930+ index = node.nodeValue.indexOf( aSignatures[0] );
 931+ if ( index != -1 ){
 932+ var e = FCK.EditorDocument.createElement( 'span' );
984933 e.className = "fck_mw_signature";
985 - var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__MWSignature', e ) ;
 934+ var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__MWSignature', e );
986935
987 - var substr1 = FCK.EditorDocument.createTextNode( node.nodeValue.substring(0, index) ) ;
988 - var substr2 = FCK.EditorDocument.createTextNode( node.nodeValue.substring(index + aSignatures[0].length) ) ;
 936+ var substr1 = FCK.EditorDocument.createTextNode( node.nodeValue.substring(0, index) );
 937+ var substr2 = FCK.EditorDocument.createTextNode( node.nodeValue.substring(index + aSignatures[0].length) );
989938
990 - node.parentNode.insertBefore( substr1, node ) ;
991 - node.parentNode.insertBefore( oFakeImage, node ) ;
992 - node.parentNode.insertBefore( substr2, node ) ;
 939+ node.parentNode.insertBefore( substr1, node );
 940+ node.parentNode.insertBefore( oFakeImage, node );
 941+ node.parentNode.insertBefore( substr2, node );
993942
994 - node.parentNode.removeChild( node ) ;
 943+ node.parentNode.removeChild( node );
995944 if ( node )
996 - node.nodeValue = '' ;
 945+ node.nodeValue = '';
997946 }
998947 }
999948 }
@@ -1000,96 +949,86 @@
1001950 }
1002951
1003952 // Templates and magic words.
1004 - var aSpans = document.getElementsByTagName( 'SPAN' ) ;
 953+ var aSpans = document.getElementsByTagName( 'SPAN' );
1005954
1006 - var eSpan ;
1007 - var i = aSpans.length - 1 ;
1008 - while ( i >= 0 && ( eSpan = aSpans[i--] ) )
1009 - {
1010 - var className = null ;
1011 - switch ( eSpan.className )
1012 - {
 955+ var eSpan;
 956+ var i = aSpans.length - 1;
 957+ while ( i >= 0 && ( eSpan = aSpans[i--] ) ){
 958+ var className = null;
 959+ switch ( eSpan.className ){
1013960 case 'fck_mw_source' :
1014 - className = 'FCK__MWSource' ;
 961+ className = 'FCK__MWSource';
1015962 case 'fck_mw_ref' :
1016963 if (className == null)
1017 - className = 'FCK__MWRef' ;
 964+ className = 'FCK__MWRef';
1018965 case 'fck_mw_references' :
1019966 if ( className == null )
1020 - className = 'FCK__MWReferences' ;
 967+ className = 'FCK__MWReferences';
1021968 case 'fck_mw_template' :
1022969 if ( className == null ) //YC
1023 - className = 'FCK__MWTemplate' ; //YC
 970+ className = 'FCK__MWTemplate'; //YC
1024971 case 'fck_mw_magic' :
1025972 if ( className == null )
1026 - className = 'FCK__MWMagicWord' ;
 973+ className = 'FCK__MWMagicWord';
1027974 case 'fck_mw_magic' :
1028975 if ( className == null )
1029 - className = 'FCK__MWMagicWord' ;
 976+ className = 'FCK__MWMagicWord';
1030977 case 'fck_mw_special' : //YC
1031978 if ( className == null )
1032 - className = 'FCK__MWSpecial' ;
 979+ className = 'FCK__MWSpecial';
1033980 case 'fck_mw_nowiki' :
1034981 if ( className == null )
1035 - className = 'FCK__MWNowiki' ;
 982+ className = 'FCK__MWNowiki';
1036983 case 'fck_mw_html' :
1037984 if ( className == null )
1038 - className = 'FCK__MWHtml' ;
 985+ className = 'FCK__MWHtml';
1039986 case 'fck_mw_includeonly' :
1040987 if ( className == null )
1041 - className = 'FCK__MWIncludeonly' ;
 988+ className = 'FCK__MWIncludeonly';
1042989 case 'fck_mw_gallery' :
1043990 if ( className == null )
1044 - className = 'FCK__MWGallery' ;
 991+ className = 'FCK__MWGallery';
1045992 case 'fck_mw_noinclude' :
1046993 if ( className == null )
1047 - className = 'FCK__MWNoinclude' ;
 994+ className = 'FCK__MWNoinclude';
1048995 case 'fck_mw_onlyinclude' :
1049996 if ( className == null )
1050 - className = 'FCK__MWOnlyinclude' ;
 997+ className = 'FCK__MWOnlyinclude';
1051998
1052 - var oImg = FCKDocumentProcessor_CreateFakeImage( className, eSpan.cloneNode(true) ) ;
1053 - oImg.setAttribute( '_' + eSpan.className, 'true', 0 ) ;
 999+ var oImg = FCKDocumentProcessor_CreateFakeImage( className, eSpan.cloneNode(true) );
 1000+ oImg.setAttribute( '_' + eSpan.className, 'true', 0 );
10541001
1055 - eSpan.parentNode.insertBefore( oImg, eSpan ) ;
1056 - eSpan.parentNode.removeChild( eSpan ) ;
1057 - break ;
 1002+ eSpan.parentNode.insertBefore( oImg, eSpan );
 1003+ eSpan.parentNode.removeChild( eSpan );
 1004+ break;
10581005 }
10591006 }
10601007
10611008 // Math tags without Tex.
1062 - var aImgs = document.getElementsByTagName( 'IMG' ) ;
1063 - var eImg ;
1064 - i = aImgs.length - 1 ;
1065 - while ( i >= 0 && ( eImg = aImgs[i--] ) )
1066 - {
1067 - var className = null ;
1068 - switch ( eImg.className )
1069 - {
 1009+ var aImgs = document.getElementsByTagName( 'IMG' );
 1010+ var eImg;
 1011+ i = aImgs.length - 1;
 1012+ while ( i >= 0 && ( eImg = aImgs[i--] ) ){
 1013+ var className = null;
 1014+ switch ( eImg.className ){
10701015 case 'FCK__MWMath' :
1071 - eImg.src = FCKConfig.PluginsPath + 'mediawiki/images/icon_math.gif' ;
1072 - break ;
 1016+ eImg.src = FCKConfig.PluginsPath + 'mediawiki/images/icon_math.gif';
 1017+ break;
10731018 }
10741019 }
10751020
10761021 // InterWiki / InterLanguage links
1077 - var aHrefs = document.getElementsByTagName( 'A' ) ;
1078 - var a ;
1079 - var i = aHrefs.length - 1 ;
1080 - while ( i >= 0 && ( a = aHrefs[i--] ) )
1081 - {
1082 - if (a.className == 'extiw')
1083 - {
1084 - a.href = a.title ;
1085 - a.setAttribute( '_fcksavedurl', a.href ) ;
1086 - }
1087 - else
1088 - {
1089 - if (a.href.toLowerCase().StartsWith( 'rtecolon' ))
1090 - {
 1022+ var aHrefs = document.getElementsByTagName( 'A' );
 1023+ var a;
 1024+ var i = aHrefs.length - 1;
 1025+ while ( i >= 0 && ( a = aHrefs[i--] ) ){
 1026+ if( a.className == 'extiw' ){
 1027+ a.href = a.title;
 1028+ a.setAttribute( '_fcksavedurl', a.href );
 1029+ } else {
 1030+ if( a.href.toLowerCase().StartsWith( 'rtecolon' ) ){
10911031 a.href = ":" + a.href.substring(8);
1092 - if (a.innerHTML.toLowerCase().StartsWith( 'rtecolon' ))
1093 - {
 1032+ if( a.innerHTML.toLowerCase().StartsWith( 'rtecolon' ) ){
10941033 a.innerHTML = a.innerHTML.substring(8);
10951034 }
10961035 }
@@ -1099,45 +1038,36 @@
11001039
11011040 // Context menu for templates.
11021041 FCK.ContextMenu.RegisterListener({
1103 - AddItems : function( contextMenu, tag, tagName )
1104 - {
1105 - if ( tagName == 'IMG' )
1106 - {
1107 - if ( tag.getAttribute( '_fck_mw_template' ) )
1108 - {
1109 - contextMenu.AddSeparator() ;
1110 - contextMenu.AddItem( 'MW_Template', FCKLang.wikiMnuTemplate || 'Template Properties' ) ;
 1042+ AddItems : function( contextMenu, tag, tagName ){
 1043+ if ( tagName == 'IMG' ){
 1044+ if ( tag.getAttribute( '_fck_mw_template' ) ){
 1045+ contextMenu.AddSeparator();
 1046+ contextMenu.AddItem( 'MW_Template', FCKLang.wikiMnuTemplate || 'Template Properties' );
11111047 }
1112 - if ( tag.getAttribute( '_fck_mw_magic' ) )
1113 - {
1114 - contextMenu.AddSeparator() ;
1115 - contextMenu.AddItem( 'MW_MagicWord', FCKLang.wikiMnuMagicWord || 'Modify Magic Word' ) ;
 1048+ if ( tag.getAttribute( '_fck_mw_magic' ) ){
 1049+ contextMenu.AddSeparator();
 1050+ contextMenu.AddItem( 'MW_MagicWord', FCKLang.wikiMnuMagicWord || 'Modify Magic Word' );
11161051 }
1117 - if ( tag.getAttribute( '_fck_mw_ref' ) )
1118 - {
1119 - contextMenu.AddSeparator() ;
1120 - contextMenu.AddItem( 'MW_Ref', FCKLang.wikiMnuReference || 'Reference Properties' ) ;
 1052+ if ( tag.getAttribute( '_fck_mw_ref' ) ){
 1053+ contextMenu.AddSeparator();
 1054+ contextMenu.AddItem( 'MW_Ref', FCKLang.wikiMnuReference || 'Reference Properties' );
11211055 }
1122 - if ( tag.getAttribute( '_fck_mw_html' ) )
1123 - {
1124 - contextMenu.AddSeparator() ;
1125 - contextMenu.AddItem( 'MW_Special', 'Edit HTML code' ) ;
 1056+ if ( tag.getAttribute( '_fck_mw_html' ) ){
 1057+ contextMenu.AddSeparator();
 1058+ contextMenu.AddItem( 'MW_Special', 'Edit HTML code' );
11261059 }
1127 - if ( tag.getAttribute( '_fck_mw_source' ) )
1128 - {
1129 - contextMenu.AddSeparator() ;
1130 - contextMenu.AddItem( 'MW_Source', FCKLang.wikiMnuSourceCode || 'Source Code Properties' ) ;
 1060+ if ( tag.getAttribute( '_fck_mw_source' ) ){
 1061+ contextMenu.AddSeparator();
 1062+ contextMenu.AddItem( 'MW_Source', FCKLang.wikiMnuSourceCode || 'Source Code Properties' );
11311063 }
1132 - if ( tag.getAttribute( '_fck_mw_math' ) )
1133 - {
1134 - contextMenu.AddSeparator() ;
1135 - contextMenu.AddItem( 'MW_Math', FCKLang.wikiMnuFormula || 'Edit Formula' ) ;
 1064+ if ( tag.getAttribute( '_fck_mw_math' ) ){
 1065+ contextMenu.AddSeparator();
 1066+ contextMenu.AddItem( 'MW_Math', FCKLang.wikiMnuFormula || 'Edit Formula' );
11361067 }
1137 - if ( tag.getAttribute( '_fck_mw_special' ) || tag.getAttribute( '_fck_mw_nowiki' ) || tag.getAttribute( '_fck_mw_includeonly' ) || tag.getAttribute( '_fck_mw_noinclude' ) || tag.getAttribute( '_fck_mw_onlyinclude' ) || tag.getAttribute( '_fck_mw_gallery' )) //YC
1138 - {
1139 - contextMenu.AddSeparator() ;
1140 - contextMenu.AddItem( 'MW_Special', FCKLang.wikiMnuSpecial || 'Special Tag Properties' ) ;
 1068+ if ( tag.getAttribute( '_fck_mw_special' ) || tag.getAttribute( '_fck_mw_nowiki' ) || tag.getAttribute( '_fck_mw_includeonly' ) || tag.getAttribute( '_fck_mw_noinclude' ) || tag.getAttribute( '_fck_mw_onlyinclude' ) || tag.getAttribute( '_fck_mw_gallery' ) ){ //YC
 1069+ contextMenu.AddSeparator();
 1070+ contextMenu.AddItem( 'MW_Special', FCKLang.wikiMnuSpecial || 'Special Tag Properties' );
11411071 }
11421072 }
11431073 }
1144 -}) ;
 1074+});
Index: trunk/extensions/FCKeditor/plugins/mediawiki/lang/sv.js
@@ -1,178 +1,178 @@
2 -/*
3 - * mediaWiki FCKeditor plugin
4 - *
5 - * Swedish language file.
6 - */
7 -
8 -FCKLang.wikiTabEdit = 'Editera';
9 -FCKLang.wikiTabManual = 'Manual';
10 -
11 -FCKLang.wikiBtnTemplate = 'Infoga/Ändra Mall';
12 -FCKLang.wikiBtnReference = 'Infoga/Ändra Reference';
13 -FCKLang.wikiBtnReferences = 'Infoga <references /> tag';
14 -FCKLang.wikiBtnFormula = 'Infoga/Ändra Formel';
15 -FCKLang.wikiBtnSpecial = 'Infoga/Ändra Special Tag';
16 -FCKLang.wikiBtnSourceCode = 'Infoga/Ändra Source Kod';
17 -FCKLang.wikiBtnSignature = 'Infoga signatur';
18 -FCKLang.wikiCmdTemplate = 'Mall Egenskaper';
19 -FCKLang.wikiCmdReference = 'Reference egenskaper';
20 -FCKLang.wikiCmdFormula = 'Formel';
21 -FCKLang.wikiCmdCategories = 'Kategorier';
22 -FCKLang.wikiLoadingWikitext = 'Laddar Wikitext. vänligen vänta...';
23 -FCKLang.wikiLoadingCategories = 'Laddar kategorier...';
24 -FCKLang.wikiSearchCategory = 'sök kategori';
25 -FCKLang.wikiSelectedCategories = 'Valda kategorier';
26 -FCKLang.wikiBtnCategories = 'Infoga/Ändra kategorier';
27 -FCKLang.wikiAddNewCategory = 'Lägg till ny';
28 -FCKLang.wikiCategoryTree = 'Kategoriträd';
29 -FCKLang.wikiMnuTemplate = 'Mall Egenskaper';
30 -FCKLang.wikiMnuMagicWord = 'Modifiera Magic Word';
31 -FCKLang.wikiMnuReference = 'Reference Egenskaper';
32 -FCKLang.wikiMnuFormula = 'Ändra Formel';
33 -FCKLang.wikiCmdSpecial = 'Special Tag egenskaper';
34 -FCKLang.wikiCmdSourceCode = 'Source Kod egenskaper';
35 -FCKLang.wikiMnuSpecial = 'Special Tag Properties';
36 -FCKLang.wikiMnuSourceCode = 'Ändra source kod';
37 -FCKLang.wikiSourceCode = 'Source Kod';
38 -FCKLang.wikiSourceLanguage = 'Source Språk';
39 -
40 -FCKLang.wikiImgFileName = 'Bildens filnamn';
41 -FCKLang.wikiImgNotice1 = 'Bilden måste laddas upp först';
42 -FCKLang.wikiImgNotice2 = 'använd "Ladda upp fil" i vänsterkanten av skärmen';
43 -FCKLang.wikiImgCaption = 'Caption';
44 -FCKLang.wikiImgType = 'Special Type';
45 -FCKLang.wikiImgTypeThumb = 'Tumnagel';
46 -FCKLang.wikiImgTypeFrame = 'Ram';
47 -FCKLang.wikiImgTypeBorder = 'Kant';
48 -FCKLang.wikiImgAlignCenter = 'Center';
49 -
50 -FCKLang.wikiImgAutomatic = 'Automatiska sökresultat';
51 -FCKLang.wikiImgTooShort = 'För kort... skriv mer';
52 -FCKLang.wikiImgStartTyping = 'Börja skriv i fältet ovan';
53 -FCKLang.wikiImgStopTyping = 'Sluta skriv för att söka';
54 -FCKLang.wikiImgSearching = 'söker...';
55 -FCKLang.wikiImgSearchNothing = 'Inga bilder funna';
56 -FCKLang.wikiImgSearch1Found = 'en bild funnen';
57 -FCKLang.wikiImgSearchSeveral = '%1 bilder funna ';
58 -FCKLang.wikiImgSearchALot = '%1 bilder funan ';
59 -
60 -FCKLang.wikiLnk = 'Länk';
61 -FCKLang.wikiLnkAutomatic = 'Automatiska sökresultat';
62 -FCKLang.wikiLnkNoSearchAnchor = 'förankra länk... ingen sökning';
63 -FCKLang.wikiLnkNoSearchMail = 'e-post länk... ingen sökning';
64 -FCKLang.wikiLnkNoSearchExt = 'external link... ingan sökning';
65 -FCKLang.wikiLnkTooShort = 'för kort... skriv mer';
66 -FCKLang.wikiLnkStartTyping = 'Börja skriv i fältet ovan';
67 -FCKLang.wikiLnkStopTyping = 'Sluta skriv för att söka';
68 -FCKLang.wikiLnkSearching = 'söker...';
69 -FCKLang.wikiLnkSearchNothing = 'Inga sidor funna';
70 -FCKLang.wikiLnkSearch1Found = 'En sida funnen';
71 -FCKLang.wikiLnkSearchSeveral = '%1 sidor funna';
72 -FCKLang.wikiLnkSearchALot = '%1 sidor funna';
73 -
74 -FCKLang.wikiTeX = 'Formel (TeX markup)';
75 -FCKLang.wikiTeXEmpty = 'Skriv formeln';
76 -
77 -FCKLang.wikiSpTag = 'Vald Special Tag';
78 -FCKLang.wikiSpParam = 'Special tag parametrar';
79 -
80 -FCKLang.wikiRef = 'Reference text (Wikitext)';
81 -FCKLang.wikiRefName = 'Reference namn (frivilligt)';
82 -
83 -FCKLang.wikiTmpl = 'Raw mall definiering (från {{ till }})';
84 -FCKLang.wikiTmplEmpty = 'Mallar måste börja med {{ och sluta med }}. vänligen kontrollera.';
85 -FCKLang.wikiTmpsel = '(Hämta manualen till en mall här)';
86 -
87 -FCKLang.wikiUnsupportedLanguage = 'Ej supporerat språk: %1';
88 -
89 -FCKLang.DplHelp = 'DPL står för Dynamic Page List, DPL används för att generera listor på sidor baserat på sökkriterier. Se %link för mer info';
90 -FCKLang.inputboxHelp = 'Inputbox är en extension för att skapa formulär i wiki. Nya sidor kan bli för-definierade via en mall. Se %link för mer info';
91 -/*
92 - * mediaWiki FCKeditor plugin
93 - *
94 - * Swedish language file.
95 - */
96 -
97 -FCKLang.wikiTabEdit = 'Editera';
98 -FCKLang.wikiTabManual = 'Manual';
99 -
100 -FCKLang.wikiBtnTemplate = 'Infoga/Ändra Mall';
101 -FCKLang.wikiBtnReference = 'Infoga/Ändra Reference';
102 -FCKLang.wikiBtnReferences = 'Infoga <references /> tag';
103 -FCKLang.wikiBtnFormula = 'Infoga/Ändra Formel';
104 -FCKLang.wikiBtnSpecial = 'Infoga/Ändra Special Tag';
105 -FCKLang.wikiBtnSourceCode = 'Infoga/Ändra Source Kod';
106 -FCKLang.wikiBtnSignature = 'Infoga signatur';
107 -FCKLang.wikiCmdTemplate = 'Mall Egenskaper';
108 -FCKLang.wikiCmdReference = 'Reference egenskaper';
109 -FCKLang.wikiCmdFormula = 'Formel';
110 -FCKLang.wikiCmdCategories = 'Kategorier';
111 -FCKLang.wikiLoadingWikitext = 'Laddar Wikitext. vänligen vänta...';
112 -FCKLang.wikiLoadingCategories = 'Laddar kategorier...';
113 -FCKLang.wikiSearchCategory = 'sök kategori';
114 -FCKLang.wikiSelectedCategories = 'Valda kategorier';
115 -FCKLang.wikiBtnCategories = 'Infoga/Ändra kategorier';
116 -FCKLang.wikiAddNewCategory = 'Lägg till ny';
117 -FCKLang.wikiCategoryTree = 'Kategoriträd';
118 -FCKLang.wikiMnuTemplate = 'Mall Egenskaper';
119 -FCKLang.wikiMnuMagicWord = 'Modifiera Magic Word';
120 -FCKLang.wikiMnuReference = 'Reference Egenskaper';
121 -FCKLang.wikiMnuFormula = 'Ändra Formel';
122 -FCKLang.wikiCmdSpecial = 'Special Tag egenskaper';
123 -FCKLang.wikiCmdSourceCode = 'Source Kod egenskaper';
124 -FCKLang.wikiMnuSpecial = 'Special Tag Properties';
125 -FCKLang.wikiMnuSourceCode = 'Ändra source kod';
126 -FCKLang.wikiSourceCode = 'Source Kod';
127 -FCKLang.wikiSourceLanguage = 'Source Språk';
128 -
129 -FCKLang.wikiImgFileName = 'Bildens filnamn';
130 -FCKLang.wikiImgNotice1 = 'Bilden måste laddas upp först';
131 -FCKLang.wikiImgNotice2 = 'använd "Ladda upp fil" i vänsterkanten av skärmen';
132 -FCKLang.wikiImgCaption = 'Caption';
133 -FCKLang.wikiImgType = 'Special Type';
134 -FCKLang.wikiImgTypeThumb = 'Tumnagel';
135 -FCKLang.wikiImgTypeFrame = 'Ram';
136 -FCKLang.wikiImgTypeBorder = 'Kant';
137 -FCKLang.wikiImgAlignCenter = 'Center';
138 -
139 -FCKLang.wikiImgAutomatic = 'Automatiska sökresultat';
140 -FCKLang.wikiImgTooShort = 'För kort... skriv mer';
141 -FCKLang.wikiImgStartTyping = 'Börja skriv i fältet ovan';
142 -FCKLang.wikiImgStopTyping = 'Sluta skriv för att söka';
143 -FCKLang.wikiImgSearching = 'söker...';
144 -FCKLang.wikiImgSearchNothing = 'Inga bilder funna';
145 -FCKLang.wikiImgSearch1Found = 'en bild funnen';
146 -FCKLang.wikiImgSearchSeveral = '%1 bilder funna ';
147 -FCKLang.wikiImgSearchALot = '%1 bilder funan ';
148 -
149 -FCKLang.wikiLnk = 'Länk';
150 -FCKLang.wikiLnkAutomatic = 'Automatiska sökresultat';
151 -FCKLang.wikiLnkNoSearchAnchor = 'förankra länk... ingen sökning';
152 -FCKLang.wikiLnkNoSearchMail = 'e-post länk... ingen sökning';
153 -FCKLang.wikiLnkNoSearchExt = 'external link... ingan sökning';
154 -FCKLang.wikiLnkTooShort = 'för kort... skriv mer';
155 -FCKLang.wikiLnkStartTyping = 'Börja skriv i fältet ovan';
156 -FCKLang.wikiLnkStopTyping = 'Sluta skriv för att söka';
157 -FCKLang.wikiLnkSearching = 'söker...';
158 -FCKLang.wikiLnkSearchNothing = 'Inga sidor funna';
159 -FCKLang.wikiLnkSearch1Found = 'En sida funnen';
160 -FCKLang.wikiLnkSearchSeveral = '%1 sidor funna';
161 -FCKLang.wikiLnkSearchALot = '%1 sidor funna';
162 -
163 -FCKLang.wikiTeX = 'Formel (TeX markup)';
164 -FCKLang.wikiTeXEmpty = 'Skriv formeln';
165 -
166 -FCKLang.wikiSpTag = 'Vald Special Tag';
167 -FCKLang.wikiSpParam = 'Special tag parametrar';
168 -
169 -FCKLang.wikiRef = 'Reference text (Wikitext)';
170 -FCKLang.wikiRefName = 'Reference namn (frivilligt)';
171 -
172 -FCKLang.wikiTmpl = 'Raw mall definiering (från {{ till }})';
173 -FCKLang.wikiTmplEmpty = 'Mallar måste börja med {{ och sluta med }}. vänligen kontrollera.';
174 -FCKLang.wikiTmpsel = '(Hämta manualen till en mall här)';
175 -
176 -FCKLang.wikiUnsupportedLanguage = 'Ej supporerat språk: %1';
177 -
178 -FCKLang.DplHelp = 'DPL står för Dynamic Page List, DPL används för att generera listor på sidor baserat på sökkriterier. Se %link för mer info';
179 -FCKLang.inputboxHelp = 'Inputbox är en extension för att skapa formulär i wiki. Nya sidor kan bli för-definierade via en mall. Se %link för mer info';
 2+/*
 3+ * MediaWiki FCKeditor plugin
 4+ *
 5+ * Swedish (Svenska) language file.
 6+ */
 7+
 8+FCKLang.wikiTabEdit = 'Editera';
 9+FCKLang.wikiTabManual = 'Manual';
 10+
 11+FCKLang.wikiBtnTemplate = 'Infoga/Ändra Mall';
 12+FCKLang.wikiBtnReference = 'Infoga/Ändra Reference';
 13+FCKLang.wikiBtnReferences = 'Infoga <references /> tag';
 14+FCKLang.wikiBtnFormula = 'Infoga/Ändra Formel';
 15+FCKLang.wikiBtnSpecial = 'Infoga/Ändra Special Tag';
 16+FCKLang.wikiBtnSourceCode = 'Infoga/Ändra Source Kod';
 17+FCKLang.wikiBtnSignature = 'Infoga signatur';
 18+FCKLang.wikiCmdTemplate = 'Mall Egenskaper';
 19+FCKLang.wikiCmdReference = 'Reference egenskaper';
 20+FCKLang.wikiCmdFormula = 'Formel';
 21+FCKLang.wikiCmdCategories = 'Kategorier';
 22+FCKLang.wikiLoadingWikitext = 'Laddar Wikitext. vänligen vänta...';
 23+FCKLang.wikiLoadingCategories = 'Laddar kategorier...';
 24+FCKLang.wikiSearchCategory = 'sök kategori';
 25+FCKLang.wikiSelectedCategories = 'Valda kategorier';
 26+FCKLang.wikiBtnCategories = 'Infoga/Ändra kategorier';
 27+FCKLang.wikiAddNewCategory = 'Lägg till ny';
 28+FCKLang.wikiCategoryTree = 'Kategoriträd';
 29+FCKLang.wikiMnuTemplate = 'Mall Egenskaper';
 30+FCKLang.wikiMnuMagicWord = 'Modifiera Magic Word';
 31+FCKLang.wikiMnuReference = 'Reference Egenskaper';
 32+FCKLang.wikiMnuFormula = 'Ändra Formel';
 33+FCKLang.wikiCmdSpecial = 'Special Tag egenskaper';
 34+FCKLang.wikiCmdSourceCode = 'Source Kod egenskaper';
 35+FCKLang.wikiMnuSpecial = 'Special Tag Properties';
 36+FCKLang.wikiMnuSourceCode = 'Ändra source kod';
 37+FCKLang.wikiSourceCode = 'Source Kod';
 38+FCKLang.wikiSourceLanguage = 'Source Språk';
 39+
 40+FCKLang.wikiImgFileName = 'Bildens filnamn';
 41+FCKLang.wikiImgNotice1 = 'Bilden måste laddas upp först';
 42+FCKLang.wikiImgNotice2 = 'använd "Ladda upp fil" i vänsterkanten av skärmen';
 43+FCKLang.wikiImgCaption = 'Caption';
 44+FCKLang.wikiImgType = 'Special Type';
 45+FCKLang.wikiImgTypeThumb = 'Tumnagel';
 46+FCKLang.wikiImgTypeFrame = 'Ram';
 47+FCKLang.wikiImgTypeBorder = 'Kant';
 48+FCKLang.wikiImgAlignCenter = 'Center';
 49+
 50+FCKLang.wikiImgAutomatic = 'Automatiska sökresultat';
 51+FCKLang.wikiImgTooShort = 'För kort... skriv mer';
 52+FCKLang.wikiImgStartTyping = 'Börja skriv i fältet ovan';
 53+FCKLang.wikiImgStopTyping = 'Sluta skriv för att söka';
 54+FCKLang.wikiImgSearching = 'söker...';
 55+FCKLang.wikiImgSearchNothing = 'Inga bilder funna';
 56+FCKLang.wikiImgSearch1Found = 'en bild funnen';
 57+FCKLang.wikiImgSearchSeveral = '%1 bilder funna ';
 58+FCKLang.wikiImgSearchALot = '%1 bilder funan ';
 59+
 60+FCKLang.wikiLnk = 'Länk';
 61+FCKLang.wikiLnkAutomatic = 'Automatiska sökresultat';
 62+FCKLang.wikiLnkNoSearchAnchor = 'förankra länk... ingen sökning';
 63+FCKLang.wikiLnkNoSearchMail = 'e-post länk... ingen sökning';
 64+FCKLang.wikiLnkNoSearchExt = 'external link... ingan sökning';
 65+FCKLang.wikiLnkTooShort = 'för kort... skriv mer';
 66+FCKLang.wikiLnkStartTyping = 'Börja skriv i fältet ovan';
 67+FCKLang.wikiLnkStopTyping = 'Sluta skriv för att söka';
 68+FCKLang.wikiLnkSearching = 'söker...';
 69+FCKLang.wikiLnkSearchNothing = 'Inga sidor funna';
 70+FCKLang.wikiLnkSearch1Found = 'En sida funnen';
 71+FCKLang.wikiLnkSearchSeveral = '%1 sidor funna';
 72+FCKLang.wikiLnkSearchALot = '%1 sidor funna';
 73+
 74+FCKLang.wikiTeX = 'Formel (TeX markup)';
 75+FCKLang.wikiTeXEmpty = 'Skriv formeln';
 76+
 77+FCKLang.wikiSpTag = 'Vald Special Tag';
 78+FCKLang.wikiSpParam = 'Special tag parametrar';
 79+
 80+FCKLang.wikiRef = 'Reference text (Wikitext)';
 81+FCKLang.wikiRefName = 'Reference namn (frivilligt)';
 82+
 83+FCKLang.wikiTmpl = 'Raw mall definiering (från {{ till }})';
 84+FCKLang.wikiTmplEmpty = 'Mallar måste börja med {{ och sluta med }}. vänligen kontrollera.';
 85+FCKLang.wikiTmpsel = '(Hämta manualen till en mall här)';
 86+
 87+FCKLang.wikiUnsupportedLanguage = 'Ej supporerat språk: %1';
 88+
 89+FCKLang.DplHelp = 'DPL står för Dynamic Page List, DPL används för att generera listor på sidor baserat på sökkriterier. Se %link för mer info';
 90+FCKLang.inputboxHelp = 'Inputbox är en extension för att skapa formulär i wiki. Nya sidor kan bli för-definierade via en mall. Se %link för mer info';
 91+/*
 92+ * mediaWiki FCKeditor plugin
 93+ *
 94+ * Swedish language file.
 95+ */
 96+
 97+FCKLang.wikiTabEdit = 'Editera';
 98+FCKLang.wikiTabManual = 'Manual';
 99+
 100+FCKLang.wikiBtnTemplate = 'Infoga/Ändra Mall';
 101+FCKLang.wikiBtnReference = 'Infoga/Ändra Reference';
 102+FCKLang.wikiBtnReferences = 'Infoga <references /> tag';
 103+FCKLang.wikiBtnFormula = 'Infoga/Ändra Formel';
 104+FCKLang.wikiBtnSpecial = 'Infoga/Ändra Special Tag';
 105+FCKLang.wikiBtnSourceCode = 'Infoga/Ändra Source Kod';
 106+FCKLang.wikiBtnSignature = 'Infoga signatur';
 107+FCKLang.wikiCmdTemplate = 'Mall Egenskaper';
 108+FCKLang.wikiCmdReference = 'Reference egenskaper';
 109+FCKLang.wikiCmdFormula = 'Formel';
 110+FCKLang.wikiCmdCategories = 'Kategorier';
 111+FCKLang.wikiLoadingWikitext = 'Laddar Wikitext. vänligen vänta...';
 112+FCKLang.wikiLoadingCategories = 'Laddar kategorier...';
 113+FCKLang.wikiSearchCategory = 'sök kategori';
 114+FCKLang.wikiSelectedCategories = 'Valda kategorier';
 115+FCKLang.wikiBtnCategories = 'Infoga/Ändra kategorier';
 116+FCKLang.wikiAddNewCategory = 'Lägg till ny';
 117+FCKLang.wikiCategoryTree = 'Kategoriträd';
 118+FCKLang.wikiMnuTemplate = 'Mall Egenskaper';
 119+FCKLang.wikiMnuMagicWord = 'Modifiera Magic Word';
 120+FCKLang.wikiMnuReference = 'Reference Egenskaper';
 121+FCKLang.wikiMnuFormula = 'Ändra Formel';
 122+FCKLang.wikiCmdSpecial = 'Special Tag egenskaper';
 123+FCKLang.wikiCmdSourceCode = 'Source Kod egenskaper';
 124+FCKLang.wikiMnuSpecial = 'Special Tag Properties';
 125+FCKLang.wikiMnuSourceCode = 'Ändra source kod';
 126+FCKLang.wikiSourceCode = 'Source Kod';
 127+FCKLang.wikiSourceLanguage = 'Source Språk';
 128+
 129+FCKLang.wikiImgFileName = 'Bildens filnamn';
 130+FCKLang.wikiImgNotice1 = 'Bilden måste laddas upp först';
 131+FCKLang.wikiImgNotice2 = 'använd "Ladda upp fil" i vänsterkanten av skärmen';
 132+FCKLang.wikiImgCaption = 'Caption';
 133+FCKLang.wikiImgType = 'Special Type';
 134+FCKLang.wikiImgTypeThumb = 'Tumnagel';
 135+FCKLang.wikiImgTypeFrame = 'Ram';
 136+FCKLang.wikiImgTypeBorder = 'Kant';
 137+FCKLang.wikiImgAlignCenter = 'Center';
 138+
 139+FCKLang.wikiImgAutomatic = 'Automatiska sökresultat';
 140+FCKLang.wikiImgTooShort = 'För kort... skriv mer';
 141+FCKLang.wikiImgStartTyping = 'Börja skriv i fältet ovan';
 142+FCKLang.wikiImgStopTyping = 'Sluta skriv för att söka';
 143+FCKLang.wikiImgSearching = 'söker...';
 144+FCKLang.wikiImgSearchNothing = 'Inga bilder funna';
 145+FCKLang.wikiImgSearch1Found = 'en bild funnen';
 146+FCKLang.wikiImgSearchSeveral = '%1 bilder funna ';
 147+FCKLang.wikiImgSearchALot = '%1 bilder funan ';
 148+
 149+FCKLang.wikiLnk = 'Länk';
 150+FCKLang.wikiLnkAutomatic = 'Automatiska sökresultat';
 151+FCKLang.wikiLnkNoSearchAnchor = 'förankra länk... ingen sökning';
 152+FCKLang.wikiLnkNoSearchMail = 'e-post länk... ingen sökning';
 153+FCKLang.wikiLnkNoSearchExt = 'external link... ingan sökning';
 154+FCKLang.wikiLnkTooShort = 'för kort... skriv mer';
 155+FCKLang.wikiLnkStartTyping = 'Börja skriv i fältet ovan';
 156+FCKLang.wikiLnkStopTyping = 'Sluta skriv för att söka';
 157+FCKLang.wikiLnkSearching = 'söker...';
 158+FCKLang.wikiLnkSearchNothing = 'Inga sidor funna';
 159+FCKLang.wikiLnkSearch1Found = 'En sida funnen';
 160+FCKLang.wikiLnkSearchSeveral = '%1 sidor funna';
 161+FCKLang.wikiLnkSearchALot = '%1 sidor funna';
 162+
 163+FCKLang.wikiTeX = 'Formel (TeX markup)';
 164+FCKLang.wikiTeXEmpty = 'Skriv formeln';
 165+
 166+FCKLang.wikiSpTag = 'Vald Special Tag';
 167+FCKLang.wikiSpParam = 'Special tag parametrar';
 168+
 169+FCKLang.wikiRef = 'Reference text (Wikitext)';
 170+FCKLang.wikiRefName = 'Reference namn (frivilligt)';
 171+
 172+FCKLang.wikiTmpl = 'Raw mall definiering (från {{ till }})';
 173+FCKLang.wikiTmplEmpty = 'Mallar måste börja med {{ och sluta med }}. vänligen kontrollera.';
 174+FCKLang.wikiTmpsel = '(Hämta manualen till en mall här)';
 175+
 176+FCKLang.wikiUnsupportedLanguage = 'Ej supporerat språk: %1';
 177+
 178+FCKLang.DplHelp = 'DPL står för Dynamic Page List, DPL används för att generera listor på sidor baserat på sökkriterier. Se %link för mer info';
 179+FCKLang.inputboxHelp = 'Inputbox är en extension för att skapa formulär i wiki. Nya sidor kan bli för-definierade via en mall. Se %link för mer info';
Index: trunk/extensions/FCKeditor/plugins/mediawiki/lang/ko.js
@@ -1,89 +1,89 @@
2 -/*
3 - * mediaWiki FCKeditor plugin
4 - *
5 - * 한국어 language file.
6 - */
7 -
8 -FCKLang.wikiTabEdit = '편집';
9 -FCKLang.wikiTabManual = '매뉴얼';
10 -
11 -FCKLang.wikiBtnTemplate = '삽입/편집 틀';
12 -FCKLang.wikiBtnReference = '삽입/편집 참조';
13 -FCKLang.wikiBtnReferences = '삽입 <references /> 태그';
14 -FCKLang.wikiBtnFormula = '삽입/편집 수식';
15 -FCKLang.wikiBtnSpecial = '삽입/편집 특수기능 태그';
16 -FCKLang.wikiBtnSourceCode = '삽입/편집 소스 코드';
17 -FCKLang.wikiBtnSignature = '삽입 signature';
18 -FCKLang.wikiCmdTemplate = '틀 속성';
19 -FCKLang.wikiCmdReference = '참조 속성';
20 -FCKLang.wikiCmdFormula = '수식';
21 -FCKLang.wikiCmdCategories = '분류 목록';
22 -FCKLang.wikiLoadingWikitext = '위키텍스트를 적재하는 중입니다. 기다려주세요...';
23 -FCKLang.wikiLoadingCategories = '분류 목록을 적재하는 중입니다...';
24 -FCKLang.wikiSearchCategory = '검색 분류';
25 -FCKLang.wikiSelectedCategories = '선택한 분류 목록';
26 -FCKLang.wikiBtnCategories = '삽입/편집 분류 목록';
27 -FCKLang.wikiAddNewCategory = '새로 추가';
28 -FCKLang.wikiCategoryTree = '분류 트리';
29 -FCKLang.wikiMnuTemplate = '틀 속성';
30 -FCKLang.wikiMnuMagicWord = '주문 수정하기';
31 -FCKLang.wikiMnuReference = '참조 속성';
32 -FCKLang.wikiMnuFormula = '수식 편집하기';
33 -FCKLang.wikiCmdSpecial = '특수 태그 속성';
34 -FCKLang.wikiCmdSourceCode = '소스 코드 속성';
35 -FCKLang.wikiMnuSpecial = '특수 태그 속성';
36 -FCKLang.wikiMnuSourceCode = '소스 코드 편집하기';
37 -FCKLang.wikiSourceCode = '소스 코드';
38 -FCKLang.wikiSourceLanguage = '소스 언어';
39 -
40 -FCKLang.wikiImgFileName = '이미지 파일 이름';
41 -FCKLang.wikiImgNotice1 = '이미지를 먼저 올려야 합니다';
42 -FCKLang.wikiImgNotice2 = '화면 좌측의 "파일 올리기"를 이용하세요';
43 -FCKLang.wikiImgCaption = '캡션';
44 -FCKLang.wikiImgType = '특수 형';
45 -FCKLang.wikiImgTypeThumb = '썸네일';
46 -FCKLang.wikiImgTypeFrame = '프레임';
47 -FCKLang.wikiImgTypeBorder = '두께';
48 -FCKLang.wikiImgAlignCenter = '중앙';
49 -
50 -FCKLang.wikiImgAutomatic = '자동 검색 결과';
51 -FCKLang.wikiImgTooShort = '너무 짧습니다. 글자를 더 넣으세요';
52 -FCKLang.wikiImgStartTyping = '위쪽 필드부터 적으세요';
53 -FCKLang.wikiImgStopTyping = '타이핑을 멈추면 검색을 시작합니다';
54 -FCKLang.wikiImgSearching = '검색 중...';
55 -FCKLang.wikiImgSearchNothing = '발견한 이미지 없음';
56 -FCKLang.wikiImgSearch1Found = '이미지 하나 발견';
57 -FCKLang.wikiImgSearchSeveral = '%1 개의 이미지 발견';
58 -FCKLang.wikiImgSearchALot = '%1 개의 이미지 발견';
59 -
60 -FCKLang.wikiLnk = '링크';
61 -FCKLang.wikiLnkAutomatic = '자동 검색 결과';
62 -FCKLang.wikiLnkNoSearchAnchor = '앵커 링크... 검색된 내용 없음';
63 -FCKLang.wikiLnkNoSearchMail = '이메일 링크... 검색된 내용 없음';
64 -FCKLang.wikiLnkNoSearchExt = '외부 링크... 검색된 내용 없음';
65 -FCKLang.wikiLnkTooShort = '너무 짧습니다. 글자를 더 넣으세요';
66 -FCKLang.wikiLnkStartTyping = '위쪽 필드부터 적으세요';
67 -FCKLang.wikiLnkStopTyping = '타이핑을 멈추면 검색을 시작합니다';
68 -FCKLang.wikiLnkSearching = '검색 중...';
69 -FCKLang.wikiLnkSearchNothing = '발견한 글 없음';
70 -FCKLang.wikiLnkSearch1Found = '글 하나 발견';
71 -FCKLang.wikiLnkSearchSeveral = '%1 개의 글 발견';
72 -FCKLang.wikiLnkSearchALot = '%1 개의 글 발견';
73 -
74 -FCKLang.wikiTeX = '수식 (TeX 마크업)';
75 -FCKLang.wikiTeXEmpty = '수식을 입력해주세요';
76 -
77 -FCKLang.wikiSpTag = '현재 특수 태그';
78 -FCKLang.wikiSpParam = '특수 태그 매개변수';
79 -
80 -FCKLang.wikiRef = 'Reference text (Wikitext)';
81 -FCKLang.wikiRefName = 'Reference name (optional)';
82 -
83 -FCKLang.wikiTmpl = '틀 원시 정의 ({{로 시작, }}로 끝남)';
84 -FCKLang.wikiTmplEmpty = '틀은 {{로 시작해서 }}로 끝나야 합니다. 확인해보세요.';
85 -FCKLang.wikiTmpsel = '(여기서 틀 매뉴얼을 고르세요)';
86 -
87 -FCKLang.wikiUnsupportedLanguage = '지원하지 않는 언어: %1';
88 -
89 -FCKLang.DplHelp = 'DPL은 Dynamic Page List를 뜻하며 선택 기준에 근거해 페이지 목록을 예쁘게 꾸며서 보여줍니다. 자세히 알고 싶으면 %link 를 참고하세요';
90 -FCKLang.inputboxHelp = '입력 상자는 사용자가 새 페이지를 생성하는 폼을 생성하게 해줍니다. 어느 틀에나 새 페이지 편집 상자를 미리 적재할 수 있습니다. 자세히 알고 싶으면 %link 를 참고하세요';
 2+/*
 3+ * MediaWiki FCKeditor plugin
 4+ *
 5+ * Korean (한국어) language file.
 6+ */
 7+
 8+FCKLang.wikiTabEdit = '편집';
 9+FCKLang.wikiTabManual = '매뉴얼';
 10+
 11+FCKLang.wikiBtnTemplate = '삽입/편집 틀';
 12+FCKLang.wikiBtnReference = '삽입/편집 참조';
 13+FCKLang.wikiBtnReferences = '삽입 <references /> 태그';
 14+FCKLang.wikiBtnFormula = '삽입/편집 수식';
 15+FCKLang.wikiBtnSpecial = '삽입/편집 특수기능 태그';
 16+FCKLang.wikiBtnSourceCode = '삽입/편집 소스 코드';
 17+FCKLang.wikiBtnSignature = '삽입 signature';
 18+FCKLang.wikiCmdTemplate = '틀 속성';
 19+FCKLang.wikiCmdReference = '참조 속성';
 20+FCKLang.wikiCmdFormula = '수식';
 21+FCKLang.wikiCmdCategories = '분류 목록';
 22+FCKLang.wikiLoadingWikitext = '위키텍스트를 적재하는 중입니다. 기다려주세요...';
 23+FCKLang.wikiLoadingCategories = '분류 목록을 적재하는 중입니다...';
 24+FCKLang.wikiSearchCategory = '검색 분류';
 25+FCKLang.wikiSelectedCategories = '선택한 분류 목록';
 26+FCKLang.wikiBtnCategories = '삽입/편집 분류 목록';
 27+FCKLang.wikiAddNewCategory = '새로 추가';
 28+FCKLang.wikiCategoryTree = '분류 트리';
 29+FCKLang.wikiMnuTemplate = '틀 속성';
 30+FCKLang.wikiMnuMagicWord = '주문 수정하기';
 31+FCKLang.wikiMnuReference = '참조 속성';
 32+FCKLang.wikiMnuFormula = '수식 편집하기';
 33+FCKLang.wikiCmdSpecial = '특수 태그 속성';
 34+FCKLang.wikiCmdSourceCode = '소스 코드 속성';
 35+FCKLang.wikiMnuSpecial = '특수 태그 속성';
 36+FCKLang.wikiMnuSourceCode = '소스 코드 편집하기';
 37+FCKLang.wikiSourceCode = '소스 코드';
 38+FCKLang.wikiSourceLanguage = '소스 언어';
 39+
 40+FCKLang.wikiImgFileName = '이미지 파일 이름';
 41+FCKLang.wikiImgNotice1 = '이미지를 먼저 올려야 합니다';
 42+FCKLang.wikiImgNotice2 = '화면 좌측의 "파일 올리기"를 이용하세요';
 43+FCKLang.wikiImgCaption = '캡션';
 44+FCKLang.wikiImgType = '특수 형';
 45+FCKLang.wikiImgTypeThumb = '썸네일';
 46+FCKLang.wikiImgTypeFrame = '프레임';
 47+FCKLang.wikiImgTypeBorder = '두께';
 48+FCKLang.wikiImgAlignCenter = '중앙';
 49+
 50+FCKLang.wikiImgAutomatic = '자동 검색 결과';
 51+FCKLang.wikiImgTooShort = '너무 짧습니다. 글자를 더 넣으세요';
 52+FCKLang.wikiImgStartTyping = '위쪽 필드부터 적으세요';
 53+FCKLang.wikiImgStopTyping = '타이핑을 멈추면 검색을 시작합니다';
 54+FCKLang.wikiImgSearching = '검색 중...';
 55+FCKLang.wikiImgSearchNothing = '발견한 이미지 없음';
 56+FCKLang.wikiImgSearch1Found = '이미지 하나 발견';
 57+FCKLang.wikiImgSearchSeveral = '%1 개의 이미지 발견';
 58+FCKLang.wikiImgSearchALot = '%1 개의 이미지 발견';
 59+
 60+FCKLang.wikiLnk = '링크';
 61+FCKLang.wikiLnkAutomatic = '자동 검색 결과';
 62+FCKLang.wikiLnkNoSearchAnchor = '앵커 링크... 검색된 내용 없음';
 63+FCKLang.wikiLnkNoSearchMail = '이메일 링크... 검색된 내용 없음';
 64+FCKLang.wikiLnkNoSearchExt = '외부 링크... 검색된 내용 없음';
 65+FCKLang.wikiLnkTooShort = '너무 짧습니다. 글자를 더 넣으세요';
 66+FCKLang.wikiLnkStartTyping = '위쪽 필드부터 적으세요';
 67+FCKLang.wikiLnkStopTyping = '타이핑을 멈추면 검색을 시작합니다';
 68+FCKLang.wikiLnkSearching = '검색 중...';
 69+FCKLang.wikiLnkSearchNothing = '발견한 글 없음';
 70+FCKLang.wikiLnkSearch1Found = '글 하나 발견';
 71+FCKLang.wikiLnkSearchSeveral = '%1 개의 글 발견';
 72+FCKLang.wikiLnkSearchALot = '%1 개의 글 발견';
 73+
 74+FCKLang.wikiTeX = '수식 (TeX 마크업)';
 75+FCKLang.wikiTeXEmpty = '수식을 입력해주세요';
 76+
 77+FCKLang.wikiSpTag = '현재 특수 태그';
 78+FCKLang.wikiSpParam = '특수 태그 매개변수';
 79+
 80+FCKLang.wikiRef = 'Reference text (Wikitext)';
 81+FCKLang.wikiRefName = 'Reference name (optional)';
 82+
 83+FCKLang.wikiTmpl = '틀 원시 정의 ({{로 시작, }}로 끝남)';
 84+FCKLang.wikiTmplEmpty = '틀은 {{로 시작해서 }}로 끝나야 합니다. 확인해보세요.';
 85+FCKLang.wikiTmpsel = '(여기서 틀 매뉴얼을 고르세요)';
 86+
 87+FCKLang.wikiUnsupportedLanguage = '지원하지 않는 언어: %1';
 88+
 89+FCKLang.DplHelp = 'DPL은 Dynamic Page List를 뜻하며 선택 기준에 근거해 페이지 목록을 예쁘게 꾸며서 보여줍니다. 자세히 알고 싶으면 %link 를 참고하세요';
 90+FCKLang.inputboxHelp = '입력 상자는 사용자가 새 페이지를 생성하는 폼을 생성하게 해줍니다. 어느 틀에나 새 페이지 편집 상자를 미리 적재할 수 있습니다. 자세히 알고 싶으면 %link 를 참고하세요';
Index: trunk/extensions/FCKeditor/plugins/mediawiki/lang/zh-tw.js
@@ -0,0 +1,81 @@
 2+/*
 3+ * MediaWiki FCKeditor plugin
 4+ *
 5+ * Taiwan Chinese (‪中文(台灣)‬) language file.
 6+ * @file
 7+ * @ingroup Language
 8+ * @author Roc michael
 9+ */
 10+
 11+FCKLang.wikiTabEdit = '編輯';
 12+FCKLang.wikiTabManual = '手動選取';
 13+
 14+FCKLang.wikiBtnTemplate = '插入/編輯模板';
 15+FCKLang.wikiBtnReference = '插入/編輯參考(Reference)';
 16+FCKLang.wikiBtnReference = '插入/編輯參考標記「<references />」';
 17+FCKLang.wikiBtnFormula = '插入/編輯公式';
 18+FCKLang.wikiBtnSpecial = '插入/編輯特別標記';
 19+FCKLang.wikiCmdTemplate = '模板屬性';
 20+FCKLang.wikiCmdReference = '參考屬性';
 21+FCKLang.wikiCmdFormula = '公式';
 22+FCKLang.wikiCmdCategories = '分類';
 23+FCKLang.wikiLoadingWikitext = '載入維基文字中,請稍待...';
 24+FCKLang.wikiLoadingCategories = '載入分類中...';
 25+FCKLang.wikiSearchCategory = '蒐尋分類';
 26+FCKLang.wikiSelectedCategories = '選取分類';
 27+FCKLang.wikiBtnCategories = '插入/編輯分類';
 28+FCKLang.wikiAddNewCategory = '新增';
 29+FCKLang.wikiCategoryTree = '分類樹';
 30+FCKLang.wikiMnuTemplate = '模板屬性';
 31+FCKLang.wikiMnuMagicWord = '修改魔術字';
 32+FCKLang.wikiMnuReference = '參考屬性';
 33+FCKLang.wikiMnuFormula = '編輯公式';
 34+FCKLang.wikiCmdSpecial = '特殊標記屬性';
 35+FCKLang.wikiMnuSpecial = '特殊標記屬性';
 36+
 37+FCKLang.wikiImgFileName = '影像檔檔名';
 38+FCKLang.wikiImgNotice1 = '影像必須事先完成上傳';
 39+FCKLang.wikiImgNotice2 = '使用在螢幕左側的 "上傳檔案"';
 40+FCKLang.wikiImgCaption = '標題(Caption)';
 41+FCKLang.wikiImgType = '特殊型態';
 42+FCKLang.wikiImgTypeThumb = '縮圖(Thumbnail)';
 43+FCKLang.wikiImgTypeFrame = '框(Frame)';
 44+FCKLang.wikiImgTypeBorder = '邊(Border)';
 45+FCKLang.wikiImgAlignCenter = '置中(Center)';
 46+
 47+FCKLang.wikiImgAutomatic = '自動蒐尋結果';
 48+FCKLang.wikiImgTooShort = '太短了... 請多鍵入些';
 49+FCKLang.wikiImgStartTyping = '在上方的欄位開始鍵入';
 50+FCKLang.wikiImgStopTyping = '停止鍵入以蒐尋';
 51+FCKLang.wikiImgSearching = '蒐尋...';
 52+FCKLang.wikiImgSearchNothing = '沒有找到影像';
 53+FCKLang.wikiImgSearch1Found = '找到一個影像';
 54+FCKLang.wikiImgSearchSeveral = '找到%1個影像';
 55+FCKLang.wikiImgSearchALot = '找到%1個影像';
 56+
 57+FCKLang.wikiLnk = '連結';
 58+FCKLang.wikiLnkAutomatic = '自動蒐尋結果';
 59+FCKLang.wikiLnkNoSearchAnchor = '錨點連結...,無蒐尋選項';
 60+FCKLang.wikiLnkNoSearchMail = '電子郵件連結,無蒐尋選項';
 61+FCKLang.wikiLnkNoSearchExt = '外部連結,無蒐尋選項';
 62+FCKLang.wikiLnkTooShort = '太短了... 請多鍵入些';
 63+FCKLang.wikiLnkStartTyping = '在上方的欄位開始鍵入';
 64+FCKLang.wikiLnkStopTyping = '停止鍵入以蒐尋';
 65+FCKLang.wikiLnkSearching = '蒐尋中...';
 66+FCKLang.wikiLnkSearchNothing = '沒有找到文章';
 67+FCKLang.wikiLnkSearch1Found = '找到1篇文章';
 68+FCKLang.wikiLnkSearchSeveral = '找到%1篇文章';
 69+FCKLang.wikiLnkSearchALot = '找到%1篇文章';
 70+
 71+FCKLang.wikiTeX = '公式 (TeX 標記)';
 72+FCKLang.wikiTeXEmpty = '請鍵入公式';
 73+
 74+FCKLang.wikiSpTag = '現有特殊標記(Special Tag)';
 75+FCKLang.wikiSpParam = '特殊標記參數';
 76+
 77+FCKLang.wikiRef = '參考文字(維基文字)';
 78+FCKLang.wikiRefName = '參考名稱(選擇性填寫)';
 79+
 80+FCKLang.wikiTmpl = '模板行定義(從 {{ 至 }})';
 81+FCKLang.wikiTmplEmpty = '模板必須以「{{」開頭,並以「}}」結果,請確認一下';
 82+FCKLang.wikiTmpsel = '(請於此處選取一個模板使用說明(template manual))';
\ No newline at end of file
Property changes on: trunk/extensions/FCKeditor/plugins/mediawiki/lang/zh-tw.js
___________________________________________________________________
Added: svn:eol-style
183 + native
Index: trunk/extensions/FCKeditor/plugins/mediawiki/lang/pl.js
@@ -1,90 +1,90 @@
2 -/*
3 - * mediaWiki FCKeditor plugin
4 - *
5 - * Polish language file.
6 - */
7 -
8 -FCKLang.wikiTabEdit = 'Edycja';
9 -FCKLang.wikiTabManual = 'Własny' ;
10 -
11 -FCKLang.wikiBtnTemplate = 'Wstaw/edytuj szablon';
12 -FCKLang.wikiBtnReference = 'Wstaw/edytuj przypis';
13 -FCKLang.wikiBtnReferences = 'Wstaw znacznik <references />';
14 -FCKLang.wikiBtnFormula = 'Wstaw/edytuj formułę matematyczną';
15 -FCKLang.wikiBtnSpecial = 'Wstaw/edytuj specialny znacznik';
16 -FCKLang.wikiBtnSignature = 'Wstaw sygnaturkę';
17 -FCKLang.wikiBtnSourceCode = 'Wstaw/edytuj kod źródłowy programu';
18 -FCKLang.wikiCmdTemplate = 'Właściwości szablonu';
19 -FCKLang.wikiCmdReference = 'Właściwości przypisu';
20 -FCKLang.wikiCmdFormula = 'Właściwości formuły matematycznej';
21 -FCKLang.wikiCmdCategories = 'Kategorie';
22 -FCKLang.wikiLoadingWikitext = '&nbsp;Konwertuję format wiki. Proszę czekać...&nbsp;';
23 -FCKLang.wikiLoadingCategories = 'Ładuję kategorie...';
24 -FCKLang.wikiSearchCategory = 'Szukaj kategorii';
25 -FCKLang.wikiSelectedCategories = 'Wybrane kategorie';
26 -FCKLang.wikiBtnCategories = 'Wstaw/edytuj kategorie';
27 -FCKLang.wikiAddNewCategory = 'Dodaj nową';
28 -FCKLang.wikiCategoryTree = 'Drzewo kategorii';
29 -FCKLang.wikiMnuTemplate = 'Właściwości szablonu';
30 -FCKLang.wikiMnuMagicWord = 'Zmodyfikuj "magiczne słowo"';
31 -FCKLang.wikiMnuReference = 'Właściwości przypisu';
32 -FCKLang.wikiMnuFormula = 'Właściwości formuły matematycznej';
33 -FCKLang.wikiCmdSpecial = 'Właściwości specialnego znacznika';
34 -FCKLang.wikiCmdSourceCode = 'Właściwości kodu źródłowego';
35 -FCKLang.wikiMnuSpecial = 'Edytuj specialny znacznik';
36 -FCKLang.wikiMnuSourceCode = 'Edytuj kod źródłowy';
37 -FCKLang.wikiSourceCode = 'Kod źródłowy';
38 -FCKLang.wikiSourceLanguage = 'Język programowania';
39 -
40 -FCKLang.wikiImgFileName = 'Nazwa obrazka';
41 -FCKLang.wikiImgNotice1 = 'Obrazek musi być uprzednio zapisany';
42 -FCKLang.wikiImgNotice2 = 'patrz menu "Prześlij plik" z lewej strony ekranu.';
43 -FCKLang.wikiImgCaption = 'Tytuł/tekst zastępczy';
44 -FCKLang.wikiImgType = "Typ";
45 -FCKLang.wikiImgTypeThumb = 'Podgląd';
46 -FCKLang.wikiImgTypeFrame = 'Ramka+podpis';
47 -FCKLang.wikiImgTypeBorder = 'Ramka';
48 -FCKLang.wikiImgAlignCenter = 'Do środka';
49 -
50 -FCKLang.wikiImgAutomatic = 'Wyniki wyszukiwania';
51 -FCKLang.wikiImgTooShort = 'za mało liter... napisz coś jeszcze';
52 -FCKLang.wikiImgStartTyping = 'zacznij pisać w polu powyżej';
53 -FCKLang.wikiImgStopTyping = 'przestań pisać, by rozpocząć wyszukiwanie';
54 -FCKLang.wikiImgSearching = 'wyszukiwanie...';
55 -FCKLang.wikiImgSearchNothing = 'nie znaleziono żadnego obrazka';
56 -FCKLang.wikiImgSearch1Found = 'znaleziono jeden&nbsp;obrazek';
57 -FCKLang.wikiImgSearchSeveral = 'znaleziono %1&nbsp;obrazki';
58 -FCKLang.wikiImgSearchALot = 'znaleziono %1&nbsp;obrazków';
59 -
60 -FCKLang.wikiLnk = 'Hiperłącze';
61 -FCKLang.wikiLnkAutomatic = 'Wyniki wyszukiwania';
62 -FCKLang.wikiLnkNoSearchAnchor = 'Kotwica... nie da się wyszukać';
63 -FCKLang.wikiLnkNoSearchMail = 'Adres pocztowy... nie da się wyszukać';
64 -FCKLang.wikiLnkNoSearchExt = 'Łącze do zewnętrzne... nie da się wyszukać';
65 -FCKLang.wikiLnkTooShort = 'za mało liter aby wyszukać';
66 -FCKLang.wikiLnkStartTyping = 'zacznij pisać w polu powyżej';
67 -FCKLang.wikiLnkStopTyping = 'przestań pisać, by rozpocząć wyszukiwanie';
68 -FCKLang.wikiLnkSearching = 'wyszukiwanie...';
69 -FCKLang.wikiLnkSearchNothing = 'nie znaleziono żadnego artykułu';
70 -FCKLang.wikiLnkSearch1Found = 'znaleziono jednen artykuł';
71 -FCKLang.wikiLnkSearchSeveral = 'znaleziono %1 artykuły'
72 -FCKLang.wikiLnkSearchALot = 'znaleziono %1 artykułów'
73 -
74 -FCKLang.wikiTeX = 'Formuła matematyczna (notacja TeX)';
75 -FCKLang.wikiTeXEmpty = 'Nie wprowadzono formuły';
76 -
77 -FCKLang.wikiSpTag = 'Typ znacznika';
78 -FCKLang.wikiSpParam = 'Parametry';
79 -
80 -FCKLang.wikiRef = 'Treść cytatu (format wiki)';
81 -FCKLang.wikiRefName = 'Nazwa cytatu (opcjonalna)';
82 -
83 -FCKLang.wikiTmpl = 'Szablon (np. {{PrzykładowySzablon}})';
84 -FCKLang.wikiTmplEmpty = 'Szablon musi zaczynać się znakami {{ i kończyć się znakami }}';
85 -FCKLang.wikiTmpsel = '(Wybierz z listy)';
86 -
87 -FCKLang.wikiUnsupportedLanguage = 'Nieprawidłowy język programowania: %1';
88 -
89 -FCKLang.DplHelp = 'Dynamic Page List pozwala na generowanie formatowanych list stron bazując na podanych kryteriach Zobacz %link aby dowiedzieć się więcej';;
90 -FCKLang.inputboxHelp = 'Inputbox pozwala na stworzenie formularza dla użytkowników do tworzenia nowych stron. Zobacz %link aby dowiedzieć się więcej';
91 -
 2+/*
 3+ * MediaWiki FCKeditor plugin
 4+ *
 5+ * Polish (Polski) language file.
 6+ */
 7+
 8+FCKLang.wikiTabEdit = 'Edycja';
 9+FCKLang.wikiTabManual = 'Własny' ;
 10+
 11+FCKLang.wikiBtnTemplate = 'Wstaw/edytuj szablon';
 12+FCKLang.wikiBtnReference = 'Wstaw/edytuj przypis';
 13+FCKLang.wikiBtnReferences = 'Wstaw znacznik <references />';
 14+FCKLang.wikiBtnFormula = 'Wstaw/edytuj formułę matematyczną';
 15+FCKLang.wikiBtnSpecial = 'Wstaw/edytuj specialny znacznik';
 16+FCKLang.wikiBtnSignature = 'Wstaw sygnaturkę';
 17+FCKLang.wikiBtnSourceCode = 'Wstaw/edytuj kod źródłowy programu';
 18+FCKLang.wikiCmdTemplate = 'Właściwości szablonu';
 19+FCKLang.wikiCmdReference = 'Właściwości przypisu';
 20+FCKLang.wikiCmdFormula = 'Właściwości formuły matematycznej';
 21+FCKLang.wikiCmdCategories = 'Kategorie';
 22+FCKLang.wikiLoadingWikitext = '&nbsp;Konwertuję format wiki. Proszę czekać...&nbsp;';
 23+FCKLang.wikiLoadingCategories = 'Ładuję kategorie...';
 24+FCKLang.wikiSearchCategory = 'Szukaj kategorii';
 25+FCKLang.wikiSelectedCategories = 'Wybrane kategorie';
 26+FCKLang.wikiBtnCategories = 'Wstaw/edytuj kategorie';
 27+FCKLang.wikiAddNewCategory = 'Dodaj nową';
 28+FCKLang.wikiCategoryTree = 'Drzewo kategorii';
 29+FCKLang.wikiMnuTemplate = 'Właściwości szablonu';
 30+FCKLang.wikiMnuMagicWord = 'Zmodyfikuj "magiczne słowo"';
 31+FCKLang.wikiMnuReference = 'Właściwości przypisu';
 32+FCKLang.wikiMnuFormula = 'Właściwości formuły matematycznej';
 33+FCKLang.wikiCmdSpecial = 'Właściwości specialnego znacznika';
 34+FCKLang.wikiCmdSourceCode = 'Właściwości kodu źródłowego';
 35+FCKLang.wikiMnuSpecial = 'Edytuj specialny znacznik';
 36+FCKLang.wikiMnuSourceCode = 'Edytuj kod źródłowy';
 37+FCKLang.wikiSourceCode = 'Kod źródłowy';
 38+FCKLang.wikiSourceLanguage = 'Język programowania';
 39+
 40+FCKLang.wikiImgFileName = 'Nazwa obrazka';
 41+FCKLang.wikiImgNotice1 = 'Obrazek musi być uprzednio zapisany';
 42+FCKLang.wikiImgNotice2 = 'patrz menu "Prześlij plik" z lewej strony ekranu.';
 43+FCKLang.wikiImgCaption = 'Tytuł/tekst zastępczy';
 44+FCKLang.wikiImgType = "Typ";
 45+FCKLang.wikiImgTypeThumb = 'Podgląd';
 46+FCKLang.wikiImgTypeFrame = 'Ramka+podpis';
 47+FCKLang.wikiImgTypeBorder = 'Ramka';
 48+FCKLang.wikiImgAlignCenter = 'Do środka';
 49+
 50+FCKLang.wikiImgAutomatic = 'Wyniki wyszukiwania';
 51+FCKLang.wikiImgTooShort = 'za mało liter... napisz coś jeszcze';
 52+FCKLang.wikiImgStartTyping = 'zacznij pisać w polu powyżej';
 53+FCKLang.wikiImgStopTyping = 'przestań pisać, by rozpocząć wyszukiwanie';
 54+FCKLang.wikiImgSearching = 'wyszukiwanie...';
 55+FCKLang.wikiImgSearchNothing = 'nie znaleziono żadnego obrazka';
 56+FCKLang.wikiImgSearch1Found = 'znaleziono jeden&nbsp;obrazek';
 57+FCKLang.wikiImgSearchSeveral = 'znaleziono %1&nbsp;obrazki';
 58+FCKLang.wikiImgSearchALot = 'znaleziono %1&nbsp;obrazków';
 59+
 60+FCKLang.wikiLnk = 'Hiperłącze';
 61+FCKLang.wikiLnkAutomatic = 'Wyniki wyszukiwania';
 62+FCKLang.wikiLnkNoSearchAnchor = 'Kotwica... nie da się wyszukać';
 63+FCKLang.wikiLnkNoSearchMail = 'Adres pocztowy... nie da się wyszukać';
 64+FCKLang.wikiLnkNoSearchExt = 'Łącze do zewnętrzne... nie da się wyszukać';
 65+FCKLang.wikiLnkTooShort = 'za mało liter aby wyszukać';
 66+FCKLang.wikiLnkStartTyping = 'zacznij pisać w polu powyżej';
 67+FCKLang.wikiLnkStopTyping = 'przestań pisać, by rozpocząć wyszukiwanie';
 68+FCKLang.wikiLnkSearching = 'wyszukiwanie...';
 69+FCKLang.wikiLnkSearchNothing = 'nie znaleziono żadnego artykułu';
 70+FCKLang.wikiLnkSearch1Found = 'znaleziono jednen artykuł';
 71+FCKLang.wikiLnkSearchSeveral = 'znaleziono %1 artykuły'
 72+FCKLang.wikiLnkSearchALot = 'znaleziono %1 artykułów'
 73+
 74+FCKLang.wikiTeX = 'Formuła matematyczna (notacja TeX)';
 75+FCKLang.wikiTeXEmpty = 'Nie wprowadzono formuły';
 76+
 77+FCKLang.wikiSpTag = 'Typ znacznika';
 78+FCKLang.wikiSpParam = 'Parametry';
 79+
 80+FCKLang.wikiRef = 'Treść cytatu (format wiki)';
 81+FCKLang.wikiRefName = 'Nazwa cytatu (opcjonalna)';
 82+
 83+FCKLang.wikiTmpl = 'Szablon (np. {{PrzykładowySzablon}})';
 84+FCKLang.wikiTmplEmpty = 'Szablon musi zaczynać się znakami {{ i kończyć się znakami }}';
 85+FCKLang.wikiTmpsel = '(Wybierz z listy)';
 86+
 87+FCKLang.wikiUnsupportedLanguage = 'Nieprawidłowy język programowania: %1';
 88+
 89+FCKLang.DplHelp = 'Dynamic Page List pozwala na generowanie formatowanych list stron bazując na podanych kryteriach Zobacz %link aby dowiedzieć się więcej';;
 90+FCKLang.inputboxHelp = 'Inputbox pozwala na stworzenie formularza dla użytkowników do tworzenia nowych stron. Zobacz %link aby dowiedzieć się więcej';
 91+
Index: trunk/extensions/FCKeditor/plugins/mediawiki/lang/he.js
@@ -1,7 +1,7 @@
22 /*
3 - * mediaWiki FCKeditor plugin
 3+ * MediaWiki FCKeditor plugin
44 *
5 - * Hebrew language file.
 5+ * Hebrew (עברית) language file.
66 */
77
88 FCKLang.wikiTabEdit = 'עריכה';
Index: trunk/extensions/FCKeditor/plugins/mediawiki/lang/fi.js
@@ -0,0 +1,92 @@
 2+/*
 3+ * MediaWiki FCKeditor plugin
 4+ *
 5+ * Finnish (Suomi) language file.
 6+ * @file
 7+ * @ingroup Language
 8+ * @author Jack Phoenix <jack@countervandalism.net>
 9+ */
 10+
 11+FCKLang.wikiTabEdit = 'Muokkaa';
 12+//FCKLang.wikiTabManual = 'Manual';
 13+
 14+FCKLang.wikiBtnTemplate = 'Lisää/Muokkaa mallinetta';
 15+FCKLang.wikiBtnReference = 'Lisää/Muokkaa viittausta';
 16+FCKLang.wikiBtnReferences = 'Lisää <references /> -tagi';
 17+FCKLang.wikiBtnFormula = 'Lisää/Muokkaa kaavaa';
 18+FCKLang.wikiBtnSpecial = 'Lisää/Muokkaa erikoistagia';
 19+FCKLang.wikiBtnSourceCode = 'Lisää/Muokkaa lähdekoodia';
 20+FCKLang.wikiBtnSignature = 'Lisää allekirjoitus';
 21+FCKLang.wikiCmdTemplate = 'Mallineen ominaisuudet';
 22+FCKLang.wikiCmdReference = 'Vittauksen ominaisuudet';
 23+FCKLang.wikiCmdFormula = 'Kaava';
 24+FCKLang.wikiCmdCategories = 'Luokat';
 25+FCKLang.wikiLoadingWikitext = 'Ladataan wikitekstiä. Ole hyvä ja odota...';
 26+FCKLang.wikiLoadingCategories = 'ladataan luokkia...';
 27+//FCKLang.wikiSearchCategory = 'Etsi luokkaa';
 28+FCKLang.wikiSelectedCategories = 'Valitut luokat';
 29+FCKLang.wikiBtnCategories = 'Lisää/Muokkaa luokkia';
 30+FCKLang.wikiAddNewCategory = 'Lisää uusi';
 31+FCKLang.wikiCategoryTree = 'Luokkapuu';
 32+FCKLang.wikiMnuTemplate = 'Mallineen ominaisuudet';
 33+FCKLang.wikiMnuMagicWord = 'Muuta taikasanaa';
 34+FCKLang.wikiMnuReference = 'Viittauksen ominaisuudet';
 35+FCKLang.wikiMnuFormula = 'Muokkaa kaavaa';
 36+FCKLang.wikiCmdSpecial = 'Erikoistagin ominaisuudet';
 37+FCKLang.wikiCmdSourceCode = 'Lähdekoodin ominaisuudet';
 38+FCKLang.wikiMnuSpecial = 'Erikoistagin ominaisuudet';
 39+FCKLang.wikiMnuSourceCode = 'Muokkaa lähdekoodia';
 40+FCKLang.wikiSourceCode = 'Lähdekoodi';
 41+FCKLang.wikiSourceLanguage = 'Lähdekieli';
 42+
 43+FCKLang.wikiImgFileName = 'Kuvatiedoston nimi';
 44+FCKLang.wikiImgNotice1 = 'Kuvan tulee olla tallennettu etukäteen';
 45+FCKLang.wikiImgNotice2 = 'käytä "Tallenna tiedosto"-ominaisuutta ruudun vasemmalla puolella';
 46+FCKLang.wikiImgCaption = 'Kuvateksti';
 47+//FCKLang.wikiImgType = 'Erikoistyyppi';
 48+FCKLang.wikiImgTypeThumb = 'Pikkukuva';
 49+FCKLang.wikiImgTypeFrame = 'Kehys';
 50+FCKLang.wikiImgTypeBorder = 'Reuna';
 51+FCKLang.wikiImgAlignCenter = 'Keskitetty';
 52+
 53+FCKLang.wikiImgAutomatic = 'Automaattisen haun tulokset';
 54+FCKLang.wikiImgTooShort = 'liian lyhyt... kirjoita lisää';
 55+FCKLang.wikiImgStartTyping = 'aloita kirjoittamaan ylläolevaan kenttään';
 56+FCKLang.wikiImgStopTyping = 'lopeta kirjoittaminen etsiäksesi';
 57+FCKLang.wikiImgSearching = 'etsitään...';
 58+FCKLang.wikiImgSearchNothing = 'kuvia ei löytynyt';
 59+FCKLang.wikiImgSearch1Found = 'yksi kuva löytyi';
 60+FCKLang.wikiImgSearchSeveral = '%1 kuvaa löytyi ';
 61+FCKLang.wikiImgSearchALot = '%1 kuvaa löytyi ';
 62+
 63+FCKLang.wikiLnk = 'Linkki';
 64+FCKLang.wikiLnkAutomatic = 'Automaattisen haun tulokset';
 65+FCKLang.wikiLnkNoSearchAnchor = 'ankkurilinkki... ei haeta sitä';
 66+FCKLang.wikiLnkNoSearchMail = 'sähköpostilinkki... ei haeta sitä';
 67+FCKLang.wikiLnkNoSearchExt = 'ulkoinen linkki... ei haeta sitä';
 68+FCKLang.wikiLnkTooShort = 'liian lyhyt... kirjoita lisää';
 69+FCKLang.wikiLnkStartTyping = 'aloita kirjoittamaan ylläolevaan kenttään';
 70+FCKLang.wikiLnkStopTyping = 'lopeta kirjoittaminen etsiäksesi';
 71+FCKLang.wikiLnkSearching = 'etsitään...';
 72+FCKLang.wikiLnkSearchNothing = 'artikkeleita ei löytynyt';
 73+FCKLang.wikiLnkSearch1Found = 'yksi artikkeli löytyi';
 74+FCKLang.wikiLnkSearchSeveral = '%1 artikkelia löytyi';
 75+FCKLang.wikiLnkSearchALot = '%1 artikkelia löytyi';
 76+
 77+FCKLang.wikiTeX = 'Kaava (TeX-merkkikieli)';
 78+FCKLang.wikiTeXEmpty = 'Ole hyvä ja kirjoita kaava';
 79+
 80+FCKLang.wikiSpTag = 'Nykyinen erikoistagi';
 81+FCKLang.wikiSpParam = 'Erikoistagin parametrit';
 82+
 83+FCKLang.wikiRef = 'Vittauksen teksti (wikitekstiä)';
 84+FCKLang.wikiRefName = 'Viittauksen nimi (vapaaehtoinen)';
 85+
 86+FCKLang.wikiTmpl = 'Mallineen raakamääritelmä ({{ -merkeistä }} -merkkeihin)';
 87+FCKLang.wikiTmplEmpty = 'Mallineiden täytyy alkaa {{ -merkeillä ja päättyä }} -merkkeihin. Ole hyvä ja tarkista se.';
 88+//FCKLang.wikiTmpsel = '(Pick up a template manual here)';
 89+
 90+FCKLang.wikiUnsupportedLanguage = 'Ei-tuettu kieli: %1';
 91+
 92+FCKLang.DplHelp = 'DPL on lyhenne sanoista Dynamic Page List (dynaaminen sivulista) ja se mahdollistaa muotoillun listan luomisen annettuja kriteereitä vastaavisa sivuista. Katso %link saadaksesi lisätietoja';
 93+FCKLang.inputboxHelp = 'Inputbox mahdollistaa lomakkeen luomisen, jonka avulla käyttäjät voivat luoda uusia sivuja. Uusien sivujen luontilaatikkoon voi etukäteen ladata minkä tahansa mallineen. Katso %link saadaksesi lisätietoja';
\ No newline at end of file
Property changes on: trunk/extensions/FCKeditor/plugins/mediawiki/lang/fi.js
___________________________________________________________________
Added: svn:eol-style
194 + native
Index: trunk/extensions/FCKeditor/plugins/mediawiki/lang/en.js
@@ -1,11 +1,11 @@
22 /*
3 - * mediaWiki FCKeditor plugin
 3+ * MediaWiki FCKeditor plugin
44 *
55 * English language file.
66 */
77
8 -FCKLang.wikiTabEdit = 'Edit';
9 -FCKLang.wikiTabManual = 'Manual';
 8+FCKLang.wikiTabEdit = 'Edit';
 9+FCKLang.wikiTabManual = 'Manual';
1010
1111 FCKLang.wikiBtnTemplate = 'Insert/Edit Template';
1212 FCKLang.wikiBtnReference = 'Insert/Edit Reference';
@@ -18,7 +18,7 @@
1919 FCKLang.wikiCmdReference = 'Reference Properties';
2020 FCKLang.wikiCmdFormula = 'Formula';
2121 FCKLang.wikiCmdCategories = 'Categories';
22 -FCKLang.wikiLoadingWikitext = 'Loading Wikitext. Please wait...';
 22+FCKLang.wikiLoadingWikitext = 'Loading Wikitext. Please wait...';
2323 FCKLang.wikiLoadingCategories = 'loading categories...';
2424 FCKLang.wikiSearchCategory = 'Search category';
2525 FCKLang.wikiSelectedCategories = 'Selected categories';
@@ -40,50 +40,50 @@
4141 FCKLang.wikiImgNotice1 = 'Image have to be uploded before';
4242 FCKLang.wikiImgNotice2 = 'use "Upload file" on the left side of the screen';
4343 FCKLang.wikiImgCaption = 'Caption';
44 -FCKLang.wikiImgType = 'Special Type';
 44+FCKLang.wikiImgType = 'Special Type';
4545 FCKLang.wikiImgTypeThumb = 'Thumbnail';
4646 FCKLang.wikiImgTypeFrame = 'Frame';
4747 FCKLang.wikiImgTypeBorder = 'Border';
48 -FCKLang.wikiImgAlignCenter = 'Center';
 48+FCKLang.wikiImgAlignCenter = 'Center';
4949
5050 FCKLang.wikiImgAutomatic = 'Automatic search results';
5151 FCKLang.wikiImgTooShort = 'too short... type more';
52 -FCKLang.wikiImgStartTyping = 'start typing in the above field';
 52+FCKLang.wikiImgStartTyping = 'start typing in the above field';
5353 FCKLang.wikiImgStopTyping = 'stop typing to search';
5454 FCKLang.wikiImgSearching = 'searching...';
55 -FCKLang.wikiImgSearchNothing = 'no images found';
56 -FCKLang.wikiImgSearch1Found = 'one image found';
57 -FCKLang.wikiImgSearchSeveral = '%1 images found ';
 55+FCKLang.wikiImgSearchNothing = 'no images found';
 56+FCKLang.wikiImgSearch1Found = 'one image found';
 57+FCKLang.wikiImgSearchSeveral = '%1 images found ';
5858 FCKLang.wikiImgSearchALot = '%1 images found ';
5959
60 -FCKLang.wikiLnk = 'Link';
 60+FCKLang.wikiLnk = 'Link';
6161 FCKLang.wikiLnkAutomatic = 'Automatic search results';
62 -FCKLang.wikiLnkNoSearchAnchor = 'anchor link... no search for it';
63 -FCKLang.wikiLnkNoSearchMail = 'e-mail link... no search for it';
64 -FCKLang.wikiLnkNoSearchExt = 'external link... no search for it';
 62+FCKLang.wikiLnkNoSearchAnchor = 'anchor link... no search for it';
 63+FCKLang.wikiLnkNoSearchMail = 'e-mail link... no search for it';
 64+FCKLang.wikiLnkNoSearchExt = 'external link... no search for it';
6565 FCKLang.wikiLnkTooShort = 'too short... type more';
66 -FCKLang.wikiLnkStartTyping = 'start typing in the above field';
 66+FCKLang.wikiLnkStartTyping = 'start typing in the above field';
6767 FCKLang.wikiLnkStopTyping = 'stop typing to search';
6868 FCKLang.wikiLnkSearching = 'searching...';
69 -FCKLang.wikiLnkSearchNothing = 'no articles found';
70 -FCKLang.wikiLnkSearch1Found = 'one article found';
71 -FCKLang.wikiLnkSearchSeveral = '%1 articles found';
 69+FCKLang.wikiLnkSearchNothing = 'no articles found';
 70+FCKLang.wikiLnkSearch1Found = 'one article found';
 71+FCKLang.wikiLnkSearchSeveral = '%1 articles found';
7272 FCKLang.wikiLnkSearchALot = '%1 articles found';
7373
74 -FCKLang.wikiTeX = 'Formula (TeX markup)';
75 -FCKLang.wikiTeXEmpty = 'Please type the formula';
 74+FCKLang.wikiTeX = 'Formula (TeX markup)';
 75+FCKLang.wikiTeXEmpty = 'Please type the formula';
7676
77 -FCKLang.wikiSpTag = 'Current Special Tag';
78 -FCKLang.wikiSpParam = 'Special tag parameters';
 77+FCKLang.wikiSpTag = 'Current Special Tag';
 78+FCKLang.wikiSpParam = 'Special tag parameters';
7979
80 -FCKLang.wikiRef = 'Reference text (Wikitext)';
81 -FCKLang.wikiRefName = 'Reference name (optional)';
 80+FCKLang.wikiRef = 'Reference text (Wikitext)';
 81+FCKLang.wikiRefName = 'Reference name (optional)';
8282
83 -FCKLang.wikiTmpl = 'Template raw definition (from {{ to }})';
84 -FCKLang.wikiTmplEmpty = 'Templates must start with {{ and end with }}. Please check it.';
85 -FCKLang.wikiTmpsel = '(Pick up a template manual here)';
 83+FCKLang.wikiTmpl = 'Template raw definition (from {{ to }})';
 84+FCKLang.wikiTmplEmpty = 'Templates must start with {{ and end with }}. Please check it.';
 85+FCKLang.wikiTmpsel = '(Pick up a template manual here)';
8686
87 -FCKLang.wikiUnsupportedLanguage = 'Unsupported language: %1';
 87+FCKLang.wikiUnsupportedLanguage = 'Unsupported language: %1';
8888
89 -FCKLang.DplHelp = 'DPL stands for Dynamic Page List, and allows to generate a formatted list of pages based on selection criteria. See %link for details';
90 -FCKLang.inputboxHelp = 'Inputbox allows to create a form for users to create new pages. The new pages edit box can be pre-loaded with any template. See %link for details';
 89+FCKLang.DplHelp = 'DPL stands for Dynamic Page List, and allows to generate a formatted list of pages based on selection criteria. See %link for details';
 90+FCKLang.inputboxHelp = 'Inputbox allows to create a form for users to create new pages. The new pages edit box can be pre-loaded with any template. See %link for details';
Index: trunk/extensions/FCKeditor/FCKeditorSajax.body.php
@@ -1,14 +1,17 @@
22 <?php
 3+/**
 4+ * AJAX functions used by FCKeditor extension
 5+ */
36
47 function wfSajaxGetMathUrl( $term ) {
58 $originalLink = MathRenderer::renderMath( $term );
69
7 - if (false == strpos($originalLink, "src=\"")) {
8 - return "";
 10+ if( false == strpos( $originalLink, 'src="' ) ) {
 11+ return '';
912 }
1013
11 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
12 - $url = strtok($srcPart, '"');
 14+ $srcPart = substr( $originalLink, strpos( $originalLink, "src=" ) + 5 );
 15+ $url = strtok( $srcPart, '"' );
1316
1417 return $url;
1518 }
@@ -17,48 +20,47 @@
1821 global $wgExtensionFunctions, $wgTitle;
1922
2023 $options = new FCKeditorParserOptions();
21 - $options->setTidy(true);
 24+ $options->setTidy( true );
2225 $parser = new FCKeditorParser();
2326
24 - if (in_array("wfCite", $wgExtensionFunctions)) {
25 - $parser->setHook('ref', array($parser, 'ref'));
26 - $parser->setHook('references', array($parser, 'references'));
 27+ if( in_array( 'wfCite', $wgExtensionFunctions ) ) {
 28+ $parser->setHook( 'ref', array( $parser, 'ref' ) );
 29+ $parser->setHook( 'references', array( $parser, 'references' ) );
2730 }
28 - $parser->setOutputType(OT_HTML);
29 - $originalLink = $parser->parse("[[Image:".$term."]]", $wgTitle, $options)->getText();
30 - if (false == strpos($originalLink, "src=\"")) {
31 - return "";
 31+ $parser->setOutputType( OT_HTML );
 32+ $originalLink = $parser->parse( '[[File:' . $term . ']]', $wgTitle, $options )->getText();
 33+ if( false == strpos( $originalLink, 'src="' ) ) {
 34+ return '';
3235 }
3336
34 - $srcPart = substr($originalLink, strpos($originalLink, "src=")+ 5);
35 - $url = strtok($srcPart, '"');
 37+ $srcPart = substr( $originalLink, strpos( $originalLink, "src=" )+ 5 );
 38+ $url = strtok( $srcPart, '"' );
3639
3740 return $url;
3841 }
3942
40 -function wfSajaxSearchSpecialTagFCKeditor($empty) {
 43+function wfSajaxSearchSpecialTagFCKeditor( $empty ) {
4144 global $wgParser, $wgRawHtml;
4245
4346 $ret = "nowiki\nincludeonly\nonlyinclude\nnoinclude\ngallery\n";
44 - if( $wgRawHtml )
45 - {
46 - $ret.="html\n";
 47+ if( $wgRawHtml ){
 48+ $ret.= "html\n";
4749 }
4850 $wgParser->firstCallInit();
49 - foreach ($wgParser->getTags() as $h) {
50 - if (!in_array($h, array("pre", "math", "ref", "references"))) {
51 - $ret .= $h ."\n";
 51+ foreach( $wgParser->getTags() as $h ) {
 52+ if( !in_array( $h, array( 'pre', 'math', 'ref', 'references' ) ) ) {
 53+ $ret .= $h . "\n";
5254 }
5355 }
54 - $arr = explode("\n", $ret);
55 - sort($arr);
56 - $ret = implode("\n", $arr);
 56+ $arr = explode( "\n", $ret );
 57+ sort( $arr );
 58+ $ret = implode( "\n", $arr );
5759
5860 return $ret;
5961 }
6062
6163 function wfSajaxSearchImageFCKeditor( $term ) {
62 - global $wgContLang, $wgOut;
 64+ global $wgContLang;
6365 $limit = 10;
6466
6567 $term = $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) );
@@ -68,24 +70,27 @@
6971 $term4 = str_replace( ' ', '_', $wgContLang->ucfirst( $term2 ) );
7072 $term = $term1;
7173
72 - if ( strlen( str_replace( '_', '', $term ) )<3 )
73 - return "";
 74+ if ( strlen( str_replace( '_', '', $term ) ) < 3 )
 75+ return '';
7476
75 - $db = wfGetDB( DB_SLAVE );
76 - $res = $db->select( 'page', 'page_title',
77 - array( 'page_namespace' => NS_IMAGE,
78 - "page_title LIKE '%". $db->strencode( $term1 ) ."%'".
79 - "OR (page_title LIKE '%". $db->strencode( $term2 ) ."%') ".
80 - "OR (page_title LIKE '%". $db->strencode( $term3 ) ."%') ".
81 - "OR (page_title LIKE '%". $db->strencode( $term4 ) ."%') " ),
82 - "wfSajaxSearch",
83 - array( 'LIMIT' => $limit+1 )
 77+ $dbr = wfGetDB( DB_SLAVE );
 78+ $res = $dbr->select( 'page',
 79+ 'page_title',
 80+ array(
 81+ 'page_namespace' => NS_FILE,
 82+ "page_title LIKE '%". $dbr->strencode( $term1 ) ."%'".
 83+ "OR (page_title LIKE '%". $dbr->strencode( $term2 ) ."%') ".
 84+ "OR (page_title LIKE '%". $dbr->strencode( $term3 ) ."%') ".
 85+ "OR (page_title LIKE '%". $dbr->strencode( $term4 ) ."%') "
 86+ ),
 87+ __METHOD__,
 88+ array( 'LIMIT' => $limit + 1 )
8489 );
8590
86 - $ret = "";
 91+ $ret = '';
8792 $i = 0;
88 - while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
89 - $ret .= $row->page_title ."\n";
 93+ while ( ( $row = $dbr->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
 94+ $ret .= $row->page_title . "\n";
9095 }
9196
9297 $term = htmlspecialchars( $term );
@@ -94,39 +99,35 @@
95100 }
96101
97102 function wfSajaxSearchArticleFCKeditor( $term ) {
98 - global $wgContLang, $wgOut, $wgExtraNamespaces;
 103+ global $wgContLang, $wgExtraNamespaces;
99104 $limit = 10;
100105 $ns = NS_MAIN;
101106
102107 $term = $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) );
103108
104 - if (strpos(strtolower($term), "category:") === 0) {
 109+ if( strpos( strtolower( $term ), 'category:' ) === 0 ) {
105110 $ns = NS_CATEGORY;
106 - $term = substr($term, 9);
107 - $prefix = "Category:";
108 - }
109 - else if (strpos(strtolower($term), ":category:") === 0) {
 111+ $term = substr( $term, 9 );
 112+ $prefix = 'Category:';
 113+ } else if( strpos( strtolower( $term ), ':category:' ) === 0 ) {
110114 $ns = NS_CATEGORY;
111 - $term = substr($term, 10);
112 - $prefix = ":Category:";
113 - }
114 - else if (strpos(strtolower($term), "media:") === 0) {
 115+ $term = substr( $term, 10 );
 116+ $prefix = ':Category:';
 117+ } else if( strpos( strtolower( $term ), 'media:' ) === 0 ) {
115118 $ns = NS_IMAGE;
116 - $term = substr($term, 6);
117 - $prefix = "Media:";
118 - }
119 - else if (strpos(strtolower($term), ":image:") === 0) {
 119+ $term = substr( $term, 6 );
 120+ $prefix = 'Media:';
 121+ } else if( strpos( strtolower( $term ), ':image:' ) === 0 ) {
120122 $ns = NS_IMAGE;
121 - $term = substr(strtolower($term), 7);
122 - $prefix = ":Image:";
123 - }
124 - else if ( strpos($term,":") && is_array($wgExtraNamespaces )) {
125 - $pos = strpos($term,":");
126 - $find_ns = array_search(substr($term,0,$pos),$wgExtraNamespaces);
127 - if ($find_ns) {
 123+ $term = substr( strtolower( $term ), 7 );
 124+ $prefix = ':Image:';
 125+ } else if( strpos( $term, ':' ) && is_array( $wgExtraNamespaces ) ) {
 126+ $pos = strpos( $term, ':' );
 127+ $find_ns = array_search( substr( $term, 0, $pos ), $wgExtraNamespaces );
 128+ if( $find_ns ) {
128129 $ns = $find_ns;
129 - $prefix = substr($term,0,$pos+1);
130 - $term = substr($term,$pos+1);
 130+ $prefix = substr( $term, 0, $pos + 1 );
 131+ $term = substr( $term, $pos + 1 );
131132 }
132133 }
133134
@@ -136,28 +137,31 @@
137138 $term4 = str_replace( ' ', '_', $wgContLang->ucfirst( $term2 ) );
138139 $term = $term1;
139140
140 - if ( strlen( str_replace( '_', '', $term ) )<3 ) {
141 - return "";
 141+ if ( strlen( str_replace( '_', '', $term ) ) < 3 ) {
 142+ return '';
142143 }
143144
144 - $db = wfGetDB( DB_SLAVE );
145 - $res = $db->select( 'page', 'page_title',
146 - array( 'page_namespace' => $ns,
147 - "page_title LIKE '%". $db->strencode( $term1 ) ."%' ".
148 - "OR (page_title LIKE '%". $db->strencode( $term2 ) ."%') ".
149 - "OR (page_title LIKE '%". $db->strencode( $term3 ) ."%') ".
150 - "OR (page_title LIKE '%". $db->strencode( $term4 ) ."%') " ),
151 - "wfSajaxSearch",
152 - array( 'LIMIT' => $limit+1 )
 145+ $dbr = wfGetDB( DB_SLAVE );
 146+ $res = $dbr->select( 'page',
 147+ 'page_title',
 148+ array(
 149+ 'page_namespace' => $ns,
 150+ "page_title LIKE '%". $dbr->strencode( $term1 ) ."%' ".
 151+ "OR (page_title LIKE '%". $dbr->strencode( $term2 ) ."%') ".
 152+ "OR (page_title LIKE '%". $dbr->strencode( $term3 ) ."%') ".
 153+ "OR (page_title LIKE '%". $dbr->strencode( $term4 ) ."%') "
 154+ ),
 155+ __METHOD__,
 156+ array( 'LIMIT' => $limit + 1 )
153157 );
154158
155 - $ret = "";
 159+ $ret = '';
156160 $i = 0;
157 - while ( ( $row = $db->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
158 - if (isset($prefix) && !is_null($prefix)) {
 161+ while ( ( $row = $dbr->fetchObject( $res ) ) && ( ++$i <= $limit ) ) {
 162+ if( isset( $prefix ) && !is_null( $prefix ) ) {
159163 $ret .= $prefix;
160164 }
161 - $ret .= $row->page_title ."\n";
 165+ $ret .= $row->page_title . "\n";
162166 }
163167
164168 $term = htmlspecialchars( $term );
@@ -165,71 +169,69 @@
166170 return $ret;
167171 }
168172
169 -function wfSajaxSearchCategoryFCKeditor()
170 -{
171 - global $wgContLang, $wgOut;
 173+function wfSajaxSearchCategoryFCKeditor(){
172174 $ns = NS_CATEGORY;
173 - $db =& wfGetDB( DB_SLAVE );
174 - $m_sql="SELECT tmpSelectCat1.cl_to AS title FROM ".$db->tableName('categorylinks')." AS tmpSelectCat1 ".
175 - "LEFT JOIN ".$db->tableName('page')." AS tmpSelectCatPage ON ( tmpSelectCat1.cl_to = tmpSelectCatPage.page_title ".
 175+ $dbr = wfGetDB( DB_SLAVE );
 176+ /** @todo FIXME: should use Database class */
 177+ $m_sql = "SELECT tmpSelectCat1.cl_to AS title FROM ".$dbr->tableName('categorylinks')." AS tmpSelectCat1 ".
 178+ "LEFT JOIN ".$dbr->tableName('page')." AS tmpSelectCatPage ON ( tmpSelectCat1.cl_to = tmpSelectCatPage.page_title ".
176179 "AND tmpSelectCatPage.page_namespace =$ns ) ".
177 - "LEFT JOIN ".$db->tableName('categorylinks')." AS tmpSelectCat2 ON tmpSelectCatPage.page_id = tmpSelectCat2.cl_from ".
 180+ "LEFT JOIN ".$dbr->tableName('categorylinks')." AS tmpSelectCat2 ON tmpSelectCatPage.page_id = tmpSelectCat2.cl_from ".
178181 "WHERE tmpSelectCat2.cl_from IS NULL GROUP BY tmpSelectCat1.cl_to";
179182
180 - $res = $db->query($m_sql,__METHOD__ );
 183+ $res = $dbr->query( $m_sql, __METHOD__ );
181184
182 - $ret = "";
183 - $i=0;
184 - while ( ( $row = $db->fetchObject( $res ) ) ) {
185 - $ret .= $row->title ."\n";
186 - $sub = explode("\n",wfSajaxSearchCategoryChildrenFCKeditor($row->title));
187 - foreach($sub as $subrow)if(strlen($subrow)>0)$ret.=" ".$subrow."\n";
 185+ $ret = '';
 186+ $i = 0;
 187+ while ( ( $row = $dbr->fetchObject( $res ) ) ) {
 188+ $ret .= $row->title . "\n";
 189+ $sub = explode( "\n", wfSajaxSearchCategoryChildrenFCKeditor( $row->title ) );
 190+ foreach( $sub as $subrow )
 191+ if( strlen( $subrow ) > 0 )
 192+ $ret.= ' ' . $subrow . "\n";
188193 }
189194
190195 return $ret;
191196 }
192197
193 -function wfSajaxSearchCategoryChildrenFCKeditor($m_root)
194 -{
195 - global $wgContLang, $wgOut;
 198+function wfSajaxSearchCategoryChildrenFCKeditor( $m_root ){
196199 $limit = 50;
197200 $ns = NS_CATEGORY;
198 - $m_root = str_replace("'","\'",$m_root);
199 - $db =& wfGetDB( DB_SLAVE );
200 - $m_sql ="SELECT tmpSelectCatPage.page_title AS title FROM ".$db->tableName('categorylinks')." AS tmpSelectCat ".
201 - "LEFT JOIN ".$db->tableName('page')." AS tmpSelectCatPage ON tmpSelectCat.cl_from = tmpSelectCatPage.page_id ".
202 - "WHERE tmpSelectCat.cl_to LIKE '$m_root' AND tmpSelectCatPage.page_namespace = $ns";
 201+ $dbr = wfGetDB( DB_SLAVE );
 202+ $res = $dbr->select(
 203+ array( 'categorylinks', 'page' ),
 204+ array( 'page_title AS title' ),
 205+ array( 'cl_to LIKE ' . $dbr->escapeLike( $m_root ), "page_namespace = $ns" ),
 206+ __METHOD__,
 207+ array(),
 208+ array( 'page' => array( 'LEFT JOIN', 'cl_from = page_id' ) )
 209+ );
203210
204 -
205 - $res = $db->query($m_sql,__METHOD__ );
206 -
207 - $ret = "";
208 - $i=0;
209 - while ( ( $row = $db->fetchObject( $res ) ) ) {
210 - $ret .= $row->title ."\n";
211 - $sub = explode("\n",wfSajaxSearchCategoryChildrenFCKeditor($row->title));
212 - foreach($sub as $subrow)if(strlen($subrow)>0)$ret.=" ".$subrow."\n";
213 -
 211+ $ret = '';
 212+ $i = 0;
 213+ while ( ( $row = $dbr->fetchObject( $res ) ) ) {
 214+ $ret .= $row->title . "\n";
 215+ $sub = explode( "\n", wfSajaxSearchCategoryChildrenFCKeditor( $row->title ) );
 216+ foreach( $sub as $subrow )
 217+ if( strlen( $subrow ) > 0 )
 218+ $ret.= ' ' . $subrow . "\n";
214219 }
215220
216221 return $ret;
217222 }
218223
219 -function wfSajaxSearchTemplateFCKeditor($empty) {
220 - global $wgContLang, $wgOut;
221 - $ns = NS_TEMPLATE;
222 -
223 - $db = wfGetDB( DB_SLAVE );
224 - $options['ORDER BY'] = 'page_title';
225 - $res = $db->select( 'page', 'page_title',
226 - array( 'page_namespace' => $ns),
227 - "wfSajaxSearch",
228 - $options
 224+function wfSajaxSearchTemplateFCKeditor( $empty ) {
 225+ $dbr = wfGetDB( DB_SLAVE );
 226+ $res = $dbr->select( 'page',
 227+ 'page_title',
 228+ array( 'page_namespace' => NS_TEMPLATE ),
 229+ __METHOD__,
 230+ array( 'ORDER BY' => 'page_title' )
229231 );
230232
231 - $ret = "";
232 - while ( $row = $db->fetchObject( $res ) ) {
233 - $ret .= $row->page_title ."\n";
 233+ $ret = '';
 234+ while ( $row = $dbr->fetchObject( $res ) ) {
 235+ $ret .= $row->page_title . "\n";
234236 }
235237
236238 return $ret;
@@ -239,22 +241,19 @@
240242 global $wgTitle;
241243
242244 $options = new FCKeditorParserOptions();
243 - $options->setTidy(true);
 245+ $options->setTidy( true );
244246 $parser = new FCKeditorParser();
245 - $parser->setOutputType(OT_HTML);
 247+ $parser->setOutputType( OT_HTML );
246248
247 - wfSajaxToggleFCKeditor('show'); //FCKeditor was switched to visible
248 - return str_replace("<!-- Tidy found serious XHTML errors -->", "", $parser->parse($wiki, $wgTitle, $options)->getText());
 249+ wfSajaxToggleFCKeditor( 'show' ); // FCKeditor was switched to visible
 250+ return str_replace( '<!-- Tidy found serious XHTML errors -->', '', $parser->parse( $wiki, $wgTitle, $options )->getText() );
249251 }
250252
251 -function wfSajaxToggleFCKeditor($data) {
252 - global $wgFCKEditorSaveUserSetting;
253 -
254 - if($data == 'show'){
255 - $_SESSION['showMyFCKeditor'] = RTE_VISIBLE; //visible last time
 253+function wfSajaxToggleFCKeditor( $data ) {
 254+ if( $data == 'show' ){
 255+ $_SESSION['showMyFCKeditor'] = RTE_VISIBLE; // visible last time
 256+ } else {
 257+ $_SESSION['showMyFCKeditor'] = 0; // invisible
256258 }
257 - else {
258 - $_SESSION['showMyFCKeditor'] = 0; //invisible
259 - }
260 - return "SUCCESS";
 259+ return 'SUCCESS';
261260 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r50657Change Versionjan11:47, 16 May 2009

Comments

#Comment by Siebrand (talk | contribs)   15:26, 17 May 2009

Would it be possible to use FCKeditor as an external dependency in SVN? It would mean that the editor is not forked into the MediaWiki svn. This is for example something the NOCC project does with http://svn.fckeditor.net/FCKeditor/tags/2.6.4/, but we could for example also use http://svn.fckeditor.net/FCKeditor/branches/versions/2.6.x/.

#Comment by Jack Phoenix (talk | contribs)   16:33, 17 May 2009

Sure, that'd be cool. :-) Forks tend to become outdated rather quickly and maintaining them indeed is a pain. Feel free to go ahead with it.

#Comment by Siebrand (talk | contribs)   16:49, 17 May 2009

Done in r50699. Could you test if it is not horribly broken now?

#Comment by Jack Phoenix (talk | contribs)   17:22, 17 May 2009

Seems to be working well on my localhost. Thanks for your help!

Status & tagging log