r65975 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65974‎ | r65975 | r65976 >
Date:00:50, 6 May 2010
Author:tstarling
Status:deferred
Tags:
Comment:
Merged all changes from trunk/extensions/Collection up to HEAD (r65974)
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/Collection (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/Collection.body.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/Collection.hooks.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/Collection.i18n.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/Collection.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/Collection.session.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/Collection.suggest.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/Collection.templates.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/CollectionCore.i18n.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/js/bookcreator.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/js/check_load_from_localstorage.js (added) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/js/collection.js (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/js/jquery.json.js (added) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/js/json2.js (deleted) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/js/jstorage.js (added) (history)
  • /branches/wmf/1.16wmf4/extensions/Collection/js/suggest.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/Collection/Collection.i18n.php
@@ -119,6 +119,8 @@
120120
121121 Notes:
122122 * Not satisfied with the output? See [[{{MediaWiki:Coll-helppage}}|the help page about books]] for possibilities to improve it.",
 123+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Rendering page info text',
 124+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Rendering collection info text',
123125 'coll-notfound_title' => 'Book not found',
124126 'coll-notfound_text' => 'Could not find book page.',
125127 'coll-download_notfound_title' => 'File not found',
@@ -160,6 +162,7 @@
161163 'coll-suggest_article_remove' => "Page <strong>$1</strong> has been removed from your book ($2).",
162164 'coll-suggest_undo_tooltip' => 'Undo this action',
163165 'coll-suggest_undo' => 'undo',
 166+ 'coll-load_local_book' => 'Click OK to continue with your book %TITLE% which contains %NUMPAGES% wiki pages. Click Cancel to delete it and start with an empty book.',
164167
165168 'right-collectionsaveasuserpage' => 'Save books as user page',
166169 'right-collectionsaveascommunitypage' => 'Save books as community page',
@@ -186,7 +189,8 @@
187190 'coll-collection' => '{{Identical|Book}}',
188191 'coll-collections' => '{{Identical|Book}}',
189192 'coll-exclusion_category_title' => 'The message text is the name of a category.',
190 - 'coll-print_template_prefix' => 'Prefix added to the templates name if you want to get a special for-print version of the template. So in a page instead of Template:Foo Template:PrintFoo is used if it exists.',
 193+ 'coll-print_template_prefix' => 'Prefix added to the templates name if you want to get a special for-print version of the template. So in a page instead of Template:Foo Template:PrintFoo is used if it exists.
 194+{{Identical|Print}}',
191195 'coll-print_template_pattern' => 'Use print templates being subpages of regular templates.
192196
193197 $1 is a placeholder and will be replaced by content during the rendering process.',
@@ -815,6 +819,8 @@
816820
817821 Заўвага:
818822 * Не задаволены створаным дакумэнтам? Глядзіце [[{{MediaWiki:Coll-helppage}}|старонку дапамогі па калекцыі]], каб даведацца, як яго палепшыць.',
 823+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Стварэньне тэксту з інфармацыяй пра старонку',
 824+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Стварэньне тэксту з інфармацыяй пра калекцыю',
819825 'coll-notfound_title' => 'Кніга ня знойдзеная',
820826 'coll-notfound_text' => 'Немагчыма знайсьці старонку кнігі.',
821827 'coll-download_notfound_title' => 'Файл ня знойдзены',
@@ -853,6 +859,7 @@
854860 'coll-suggest_article_remove' => 'Старонка <strong>$1</strong> была выдаленая з Вашай кнігі ($2).',
855861 'coll-suggest_undo_tooltip' => 'Адмяніць гэтае дзеяньне',
856862 'coll-suggest_undo' => 'адмяніць',
 863+ 'coll-load_local_book' => 'Націсьніце «Добра» каб працягваць працу з Вашай кнігай %TITLE%, якая ўтрымлівае %NUMPAGES% вікі-старонак. Націсьніце «Адмена», каб выдаліць яе і пачаць з пустой кнігі.',
857864 'right-collectionsaveasuserpage' => 'захаваньне кніг як старонак ўдзельніка',
858865 'right-collectionsaveascommunitypage' => 'захаваньне кніг як старонак супольнасьці',
859866 );
@@ -1028,7 +1035,7 @@
10291036 আপনি কি ওভাররাইট করবেন?',
10301037 'coll-overwrite_text' => '[[:$1]] নামের একটি পাতা ইতিমধ্যে রয়েছে। </br>
10311038 আপনি কি আপনার বই এই নামে প্রতিস্থাপন করতে চান?',
1032 - 'coll-yes' => 'হ্যা',
 1039+ 'coll-yes' => 'হ্যাঁ',
10331040 'coll-no' => 'না',
10341041 'coll-load_overwrite_text' => 'আপনার বইয়ে আগে থেকেই কিছু পাতা রয়েছে।
10351042 আপনি কি বর্তমান বই দিয়ে তা প্রতিস্থাপন করবেন, নতুন কন্টেন্ট আগের কন্টেন্টের শেষে যোগ করবেন, নাকি এই বইটি লোড বাতিল করবেন?',
@@ -1190,12 +1197,16 @@
11911198 'coll-rendering_status' => '<strong>Stad :</strong> $1',
11921199 'coll-rendering_article' => '(pajenn wiki : $1)',
11931200 'coll-rendering_page' => '(pajenn : $1)',
 1201+ 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Testenn titouroù war deouez ar pajennoù',
 1202+ 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Testenn titouroù war deouez an dastumadegoù',
11941203 'coll-rendering_finished_title' => 'Argerzh echu',
11951204 'coll-rendering_finished_text' => "<strong>Ganet eo bet ar restr teul.</strong>
11961205 <strong>[$1 Pellgargit ar restr]</strong> war hoc'h urzhiataer.
11971206
11981207 Notennoù :
11991208 * N'eo ket an disoc'h diouzhoc'h ? Gwelit [[{{MediaWiki:Coll-helppage}}|ar bajenn skoazell diwar-benn al levrioù]] evit kavout doareoù da wellaat an traoù.",
 1209+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Deouez testenn titouroù ar bajenn',
 1210+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Deouez testenn titouroù an dastumadeg',
12001211 'coll-notfound_title' => "N'eo ket bet kavet al levr",
12011212 'coll-notfound_text' => "N'eus ket bet tu da gavout pajenn al levr.",
12021213 'coll-download_notfound_title' => "N'eo ket bet kavet ar restr",
@@ -1484,7 +1495,7 @@
14851496 'coll-download_notfound_title' => "No s'ha trobat el fitxer",
14861497 'coll-download_notfound_text' => 'El fitxer que intenteu descarregar no existeix: Potser ha estat esborrat i cal que sigui regenerat.',
14871498 'coll-download_failed_title' => 'Error durant la baixada',
1488 - 'coll-download_failed_text' => "S'ha produït un error en descarregar l'arxiu: \$ 1",
 1499+ 'coll-download_failed_text' => "S'ha produït un error en descarregar l'arxiu: $1",
14891500 'coll-is_cached' => '<ul><li>S\'ha trobat una versió del document en la memòria cau i per tant no ha estat necessària cap renderització. <a href="$1">Forçar renderització.</a></li></ul>',
14901501 'coll-excluded-templates' => "* No s'han inclòs les plantilles de la categoria [[:Category:$1|$1]].",
14911502 'coll-blacklisted-templates' => "* S'han exclòs les plantilles de la llista negra [[:$1]].",
@@ -1610,6 +1621,8 @@
16111622
16121623 Poznámky:
16131624 * Nejste spokojeni s výsledkem? Podívejte se na [[{{MediaWiki:Coll-helppage}}|stránku s nápovědou ke kolekcím]], jak ho vylepšit.',
 1625+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informace při vykreslování stránky',
 1626+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informace při vykreslování knihy',
16141627 'coll-notfound_title' => 'Kniha nenalezena',
16151628 'coll-notfound_text' => 'Nebylo možné najít stránku knihy.',
16161629 'coll-download_notfound_title' => 'Soubor nenalezen',
@@ -1648,6 +1661,7 @@
16491662 'coll-suggest_article_remove' => 'Stránka <strong>$1</strong> byla odstraněna z vaší knihy. ($2)',
16501663 'coll-suggest_undo_tooltip' => 'Vrátit tuto akci zpět',
16511664 'coll-suggest_undo' => 'zpět',
 1665+ 'coll-load_local_book' => 'Pokračovat v tvorbě knihy %TITLE%, která obsahuje %NUMPAGES% stran wiki, můžete kliknutím na OK. Kliknutím na Storno ji smažete a začnete s prázdnou knihou.',
16521666 'right-collectionsaveasuserpage' => 'Ukládání knih jako uživatelských stránek',
16531667 'right-collectionsaveascommunitypage' => 'Ukládání knih jako stránek komunity',
16541668 );
@@ -1741,7 +1755,7 @@
17421756 'coll-rendering_status' => '<strong>Statws:</strong> $1',
17431757 'coll-rendering_article' => '(tudalen wici: $1)',
17441758 'coll-rendering_page' => '(tudalen: $1)',
1745 - 'coll-rendering_page_info_text_article' => "{{MediaWiki:Coll-helppage}}/Wrthi'n cynhyrchu'r gwybodaeth am y dudalen",
 1759+ 'coll-rendering_page_info_text_article' => "{{MediaWiki:Coll-helppage}}/Wrthi'n cynhyrchu'r wybodaeth am y dudalen",
17461760 'coll-rendering_collection_info_text_article' => "{{MediaWiki:Coll-helppage}}/Wrthi'n cynhyrchu'r gwybodaeth am y casgliad",
17471761 'coll-rendering_finished_title' => 'Wedi gorffen cynhyrchu',
17481762 'coll-rendering_finished_text' => "<strong>Mae ffeil y ddogfen wedi cael ei gynhyrchu.</strong>
@@ -1749,6 +1763,8 @@
17501764
17511765 Nodiadau:
17521766 * Os nad ydych yn bles â'r cynnyrch gwelwch [[{{MediaWiki:Coll-helppage}}|y dudalen gymorth ar gynhyrchu llyfrau]] er mwyn deall sut mae gwella arno.",
 1767+ 'coll-finished_page_info_text_article' => "{{MediaWiki:Coll-helppage}}/Wrthi'n cynhyrchu'r wybodaeth am y dudalen",
 1768+ 'coll-finished_collection_info_text_article' => "{{MediaWiki:Coll-helppage}}/Wrthi'n cynhyrchu'r wybodaeth am y casgliad",
17531769 'coll-notfound_title' => 'Heb ganfod y llyfr',
17541770 'coll-notfound_text' => 'Heb ganfod y dudalen yn y llyfr.',
17551771 'coll-download_notfound_title' => 'Heb lwyddo canfod y ffeil',
@@ -1920,6 +1936,7 @@
19211937 /** German (Deutsch)
19221938 * @author Heuler06
19231939 * @author Jbeigel
 1940+ * @author Kghbln
19241941 * @author Melancholie
19251942 * @author Metalhead64
19261943 * @author Pill
@@ -2020,6 +2037,8 @@
20212038
20222039 Hinweise:
20232040 * Bist du mit dem Ergebnis nicht zufrieden? Möglichkeiten zur Verbesserung der Ausgabe findest du auf der [[{{MediaWiki:Coll-helppage}}|Hilfeseite über Bücher]].',
 2041+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Rendern der Seiteninformation',
 2042+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Rendern des Buchs',
20242043 'coll-notfound_title' => 'Buch nicht gefunden',
20252044 'coll-notfound_text' => 'Dein Buch konnte nicht gefunden werden.',
20262045 'coll-download_notfound_title' => 'Datei nicht gefunden',
@@ -2057,6 +2076,7 @@
20582077 'coll-suggest_article_remove' => 'Die Seite <strong>$1</strong> wurde aus deinem Buch entfernt ($2).',
20592078 'coll-suggest_undo_tooltip' => 'Diese Aktion rückgängig machen',
20602079 'coll-suggest_undo' => 'rückgängig',
 2080+ 'coll-load_local_book' => 'Klicke auf OK, um mit deinem Buch %TITLE% fortzufahren, bestehend aus %NUMPAGES% Wikiseiten. Klicke auf Abbrechen, um es zu löschen und um mit einem leeren Buch zu starten.',
20612081 'right-collectionsaveasuserpage' => 'Bücher als Benutzerseite speichern',
20622082 'right-collectionsaveascommunitypage' => 'Bücher als Gemeinschaftsseite speichern',
20632083 );
@@ -2347,6 +2367,8 @@
23482368
23492369 Pśispomnjeśa:
23502370 * Njespokojom z wudaśim? Glědaj [[{{MediaWiki:Coll-helppage}}|bok pomocy wó zběrkach]] za móžnosći, jo pólěpšyś.',
 2371+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informaciski tekst boka wuceriś',
 2372+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informaciski tekst zběrki wuceriś',
23512373 'coll-notfound_title' => 'Knigły njenamakane',
23522374 'coll-notfound_text' => 'Bok knigłow njejo se dał namakaś.',
23532375 'coll-download_notfound_title' => 'Dataja njenamakana',
@@ -2385,6 +2407,7 @@
23862408 'coll-suggest_article_remove' => 'Bok <strong>$1</strong> jo se z twójich knigłow wótpórał ($2).',
23872409 'coll-suggest_undo_tooltip' => 'Akciju slědk wześ',
23882410 'coll-suggest_undo' => 'slědk wześ',
 2411+ 'coll-load_local_book' => 'Klikni na W pórědku, aby pókšacowak z knigłami %TITLE%, kótaraž wopśimujo %NUMPAGES% {{PLURAL:%NUMPAGES%|wikibok|wikiboka|wikiboki|wikibokow}}. Klikni na Pśetergnuś, aby ju wulašował a startuj z proznymi knigłami.',
23892412 'right-collectionsaveasuserpage' => 'Knigły ako wužywarski bok składowaś',
23902413 'right-collectionsaveascommunitypage' => 'Knigły ako bok zgromaźeństwa składowaś',
23912414 );
@@ -2565,7 +2588,7 @@
25662589 'coll-unknown_subpage_text' => 'Ĉi tiu subpaĝo de [[Special:Book|Libro]] ne ekzistas',
25672590 'coll-couldnotaddarticle_title' => 'Ne eblis aldoni vikian paĝon',
25682591 'coll-couldnotaddarticle_msg' => 'Ne eblis aldoni ĉi tiun vikian paĝon.',
2569 - 'coll-couldnotremovearticle_title' => 'Ne eblas forigi vikipaĝon',
 2592+ 'coll-couldnotremovearticle_title' => 'Ne povis forigi vikipaĝon',
25702593 'coll-couldnotremovearticle_msg' => 'Ne eblis forigi ĉi tiun vikian paĝon.',
25712594 'coll-noscript_text' => '<h1>JavaScript-o estas deviga!<h1>
25722595 <strong>Via retumilo ne subtenas JavaScript-on aŭ JavaScript-o estis malŝaltita.
@@ -2640,8 +2663,10 @@
26412664
26422665 Notoj:
26432666 * Ĉu la eligo ne plaĉus al vi? Vidu [[{{MediaWiki:Coll-helppage}}|la helpan paĝon pri kolektoj]] por fojoj por plibonigi ĝin.',
 2667+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informoteksto pri bildigante paĝon',
 2668+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informoteksto pri bildigante kolekton',
26442669 'coll-notfound_title' => 'Libro ne trovita',
2645 - 'coll-notfound_text' => 'Ne eblas trovi libran paĝon.',
 2670+ 'coll-notfound_text' => 'Ne povis trovi libran paĝon.',
26462671 'coll-download_notfound_title' => 'Dosiero ne trovita',
26472672 'coll-download_notfound_text' => 'La dosiero kiun vi celas elŝuti ne ekzistas. Eble ĝi estis forigita kaj bezonas esti regenerata.',
26482673 'coll-download_failed_title' => 'Eraro dum elŝuto',
@@ -2654,8 +2679,8 @@
26552680 'coll-book_text' => 'Akiri presitan libron de nia ek-eldoneja partnero:',
26562681 'coll-order_from_pp' => 'Antaŭvidi kun $1',
26572682 'coll-about_pp' => 'Pri $1',
2658 - 'coll-invalid_podpartner_title' => 'Nevalida ek-eldoneja partnero',
2659 - 'coll-invalid_podpartner_msg' => 'La donita ek-eldoneja partnero estas nevalida.
 2683+ 'coll-invalid_podpartner_title' => 'Malvalida ek-eldoneja partnero',
 2684+ 'coll-invalid_podpartner_msg' => 'La donita ek-eldoneja partnero estas malvalida.
26602685 Bonvolu kontakti vian administranton de MediaWiki.',
26612686 'coll-license' => 'Licenco',
26622687 'coll-return_to' => 'Reiri al [[:$1]]',
@@ -2690,7 +2715,9 @@
26912716 * @author Jatrobat
26922717 * @author Lin linao
26932718 * @author Locos epraix
 2719+ * @author Manuelt15
26942720 * @author McDutchie
 2721+ * @author Pertile
26952722 * @author Platonides
26962723 * @author Remember the dot
26972724 * @author Sanbec
@@ -2700,7 +2727,7 @@
27012728 'coll-desc' => '[[Special:Book|Crear libros]]',
27022729 'coll-book_creator_intro' => "<big>Con el ''creador de libros'' puedes crear un libro consistente de páginas wiki de tu preferencia. Puedes exportar tu libro en diferentes formatos (por ejemplo PDF o ODF) u ordenar una copia impresa.</big>",
27032730 'coll-manage_your_book' => 'Gestionar tu libro',
2704 - 'coll-book_creator_help' => 'Ver [[{{MediaWiki:Coll-helppage}}|la página de ayuda acerca de los libros]] para mayor información.',
 2731+ 'coll-book_creator_help' => 'Para más información véase [[{{MediaWiki:Coll-helppage}}|la página de ayuda acerca de los libros]].',
27052732 'coll-start_book_creator' => 'Comenzar creador de libro',
27062733 'coll-book_creator_continue' => 'Continuar usando creador de libro',
27072734 'coll-book_creator_disable_text' => "''Creador de libros'' se descargará y el libro en que estás trabajando será removido.",
@@ -2790,6 +2817,8 @@
27912818
27922819 Notas:
27932820 * ¿No estás satisfecho con el resultado? Mira [[{{MediaWiki:Coll-helppage}}|la página de ayuda sobre libros]] para ver las posibilidades de mejorarlo.',
 2821+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Texto informativo de la página de renderización',
 2822+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Texto informativo de la colección de renderización',
27942823 'coll-notfound_title' => 'No se encuentra el libro',
27952824 'coll-notfound_text' => 'No se encuentra la página de libro.',
27962825 'coll-download_notfound_title' => 'Archivo no encontrado',
@@ -2828,6 +2857,7 @@
28292858 'coll-suggest_article_remove' => 'Página <strong>$1</strong> ha sido removida de tu libro ($2).',
28302859 'coll-suggest_undo_tooltip' => 'Deshacer esta acción',
28312860 'coll-suggest_undo' => 'deshacer',
 2861+ 'coll-load_local_book' => 'Haz click en OK para continuar con tu libro %TITLE% que contiene %NUMPAGES% página wiki. Haz click en Cancelar para borrarlo y comenzar con un libro vacío.',
28322862 'right-collectionsaveasuserpage' => 'Grabar libros como página de usuario',
28332863 'right-collectionsaveascommunitypage' => 'Grabar libros como página de la comunidad',
28342864 );
@@ -3429,6 +3459,8 @@
34303460
34313461 Notes :
34323462 * Vous n’êtes pas satisfait du résultat ? Consultez [[{{MediaWiki:Coll-helppage}}|la page d’aide des livres]] pour les façons possibles de l’améliorer.',
 3463+ 'coll-finished_page_info_text_article' => "{{MediaWiki:Coll-helppage}}/Rendu du texte d'information de la page",
 3464+ 'coll-finished_collection_info_text_article' => "{{MediaWiki:Coll-helppage}}/Rendu du texte d'information de la collection",
34333465 'coll-notfound_title' => 'Livre non trouvé',
34343466 'coll-notfound_text' => 'La page du livre n’a pas pu être trouvée.',
34353467 'coll-download_notfound_title' => 'Fichier introuvable',
@@ -3467,6 +3499,7 @@
34683500 'coll-suggest_article_remove' => 'La page <strong>$1</strong> a été retirée de votre livre ($2).',
34693501 'coll-suggest_undo_tooltip' => 'Défaire cette action',
34703502 'coll-suggest_undo' => 'défaire',
 3503+ 'coll-load_local_book' => 'Cliquez sur OK pour continuer votre livre %TITLE% qui contient %NUMPAGES% pages wiki. Cliquez sur Annuler pour le supprimer et commencer avec un livre vide.',
34713504 'right-collectionsaveasuserpage' => 'Sauvegarder des livres sur des pages utilisateur',
34723505 'right-collectionsaveascommunitypage' => 'Sauvegarder des livres sur des pages communautaires',
34733506 );
@@ -3700,6 +3733,8 @@
37013734
37023735 Notas:
37033736 *Non está satisfeito co ficheiro obtido? Vexa [[{{MediaWiki:Coll-helppage}}|a páxina de axuda acerca das coleccións]] para comprobar as posibilidades de melloralo.',
 3737+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Texto informativo sobre o renderizado de páxinas',
 3738+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Texto informativo sobre o renderizado de coleccións',
37043739 'coll-notfound_title' => 'Non se pode atopar o libro',
37053740 'coll-notfound_text' => 'Non se pode atopar a páxina do libro.',
37063741 'coll-download_notfound_title' => 'Non se atopou o ficheiro',
@@ -3738,6 +3773,7 @@
37393774 'coll-suggest_article_remove' => 'A páxina "<strong>$1</strong>" foi eliminada do seu libro ($2).',
37403775 'coll-suggest_undo_tooltip' => 'Desfacer esta acción',
37413776 'coll-suggest_undo' => 'desfacer',
 3777+ 'coll-load_local_book' => 'Prema en "Aceptar" para continuar co seu libro titulado "%TITLE%", formado por %NUMPAGES% páxinas wiki. Prema en "Cancelar" para borralo e comezar un libro novo.',
37423778 'right-collectionsaveasuserpage' => 'Gardar libros como unha páxina de usuario',
37433779 'right-collectionsaveascommunitypage' => 'Gardar libros como unha páxina da comunidade',
37443780 );
@@ -3866,6 +3902,8 @@
38673903
38683904 Hiiwyys:
38693905 * Bisch mit em Ergebnis nit zfride? Megligkeite d Uusgab z verbessere findsch uf dr [[{{MediaWiki:Coll-helppage}}|Hilfsyte iber d Sammlige]].',
 3906+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Rendere vu dr Syteinformation',
 3907+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Rendere vum Buech',
38703908 'coll-notfound_title' => 'Buech nit gfunde',
38713909 'coll-notfound_text' => 'Dyyni Buech het nit chenne gfunde wäre.',
38723910 'coll-download_notfound_title' => 'Datei nit gfunde',
@@ -4402,6 +4440,8 @@
44034441
44044442 Přispomnjenka:
44054443 * Njejsy spokojny z wudaćom? Hlej [[{{MediaWiki:Coll-helppage}}|stronu pomocy wo zběrkach]] za móžnosće je polěpšić.',
 4444+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informaciski tekst strony rysować',
 4445+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informaciski tekst zběrki rysować',
44064446 'coll-notfound_title' => 'Kniha njenamakana',
44074447 'coll-notfound_text' => 'Strona knihi njebu namakana.',
44084448 'coll-download_notfound_title' => 'Dataja njenamakana',
@@ -4440,6 +4480,7 @@
44414481 'coll-suggest_article_remove' => 'Strona <strong>$1</strong> bu z twojeje knihi wotstronjena ($2).',
44424482 'coll-suggest_undo_tooltip' => 'Tutu akciju cofnyć',
44434483 'coll-suggest_undo' => 'cofnyć',
 4484+ 'coll-load_local_book' => 'Klikń W porjadku, zo by ze swojej knihu %TITLE% pokročował , kotraž %NUMPAGES% {{PLURAL:%NUMPAGES%|wikistronu|wikistronje|wikistrony|wikistronow}} wobsahuje. Klikń na Přetorhnyć, zo by ju zhašał a startuj z prózdnej knihu.',
44444485 'right-collectionsaveasuserpage' => 'Knihi jako wužiwarsku stronu składować',
44454486 'right-collectionsaveascommunitypage' => 'Knihi jako stronu zhromadźenstwa składować',
44464487 );
@@ -4783,6 +4824,8 @@
47844825
47854826 Notas:
47864827 * Non satisfacite con le resultato? Vide [[{{MediaWiki:Coll-helppage}}|le pagina de adjuta super le libros]] pro possibilitates de meliorar lo.',
 4828+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Texto informative super le rendition de paginas',
 4829+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Texto informative super le rendition de collectiones',
47874830 'coll-notfound_title' => 'Libro non trovate',
47884831 'coll-notfound_text' => 'Non poteva trovar le pagina del libro.',
47894832 'coll-download_notfound_title' => 'File non trovate',
@@ -4821,6 +4864,7 @@
48224865 'coll-suggest_article_remove' => 'Le pagina <strong>$1</strong> ha essite removite de tu libro ($2).',
48234866 'coll-suggest_undo_tooltip' => 'Disfacer iste action',
48244867 'coll-suggest_undo' => 'disfacer',
 4868+ 'coll-load_local_book' => 'Clicca super OK pro continuar con tu libro %TITLE% que contine %NUMPAGES% paginas wiki. Clicca super Cancellar pro deler lo e comenciar con un libro vacue.',
48254869 'right-collectionsaveasuserpage' => 'Salveguardar libros como pagina de usator',
48264870 'right-collectionsaveascommunitypage' => 'Salveguardar libros como pagina de communitate',
48274871 );
@@ -4830,6 +4874,7 @@
48314875 * @author Farras
48324876 * @author Irwangatot
48334877 * @author IvanLanin
 4878+ * @author Iwan Novirion
48344879 * @author Rex
48354880 */
48364881 $messages['id'] = array(
@@ -4918,6 +4963,8 @@
49194964 'coll-rendering_status' => '<strong>Status:</strong> $1',
49204965 'coll-rendering_article' => '(halaman wiki: $1)',
49214966 'coll-rendering_page' => '(halaman: $1)',
 4967+ 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Mengubah teks halaman info',
 4968+ 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Mengubah teks koleksi info',
49224969 'coll-rendering_finished_title' => 'Pengolahan selesai',
49234970 'coll-rendering_finished_text' => '<strong>Berkas dokumen telah dibuat.</strong>
49244971 <strong>[$1 Unduh berkas]</strong> ke komputer Anda.
@@ -5017,6 +5064,7 @@
50185065
50195066 /** Italian (Italiano)
50205067 * @author BrokenArrow
 5068+ * @author Civvì
50215069 * @author Darth Kule
50225070 * @author Melos
50235071 * @author Pietrodn
@@ -5107,12 +5155,16 @@
51085156 'coll-rendering_status' => '<strong>Stato:</strong> $1',
51095157 'coll-rendering_article' => '(pagina wiki: $1)',
51105158 'coll-rendering_page' => '(pagina: $1)',
 5159+ 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informazioni sul rendering delle pagine',
 5160+ 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informazioni sul rendering di collezioni',
51115161 'coll-rendering_finished_title' => 'Conversione terminata',
51125162 'coll-rendering_finished_text' => '<strong>Il documento è stato generato.</strong>
51135163 <strong>[$1 Scarica il file]</strong> sul tuo computer.
51145164
51155165 Note:
51165166 * Non sei soddisfatto del risultato? Leggi [[{{MediaWiki:Coll-helppage}}|la pagina di aiuto sulle raccolte]] riguardo alle possibilità per migliorarlo.',
 5167+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informazioni sul rendering delle pagine',
 5168+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informazioni sul rendering di collezioni',
51175169 'coll-notfound_title' => 'Libro non trovato',
51185170 'coll-notfound_text' => 'Non è possibile trovare la pagina del libro.',
51195171 'coll-download_notfound_title' => 'File non trovato',
@@ -5150,6 +5202,7 @@
51515203 'coll-suggest_article_remove' => 'La pagina <strong>$1</strong> è stata rimossa dal tuo libro ($2).',
51525204 'coll-suggest_undo_tooltip' => 'Annulla questa azione',
51535205 'coll-suggest_undo' => 'annulla',
 5206+ 'coll-load_local_book' => 'Fai clic su OK per continuare con il tuo libro %TITLE% composto da %NUMPAGES% pagine wiki. Clicca Annulla per cancellarlo e cominciare con un libro vuoto.',
51545207 'right-collectionsaveasuserpage' => 'Salva libri in pagine utente',
51555208 'right-collectionsaveascommunitypage' => 'Salva libri nelle pagine della comunità',
51565209 );
@@ -5240,12 +5293,16 @@
52415294 'coll-rendering_status' => '<strong>状況:</strong> $1',
52425295 'coll-rendering_article' => '(ウィキページ: $1)',
52435296 'coll-rendering_page' => '(ページ: $1)',
 5297+ 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/ページ情報文を生成中',
 5298+ 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/コレクション情報文を生成中',
52445299 'coll-rendering_finished_title' => 'レンダリング完了',
52455300 'coll-rendering_finished_text' => '<strong>ドキュメントファイルは生成されました。</strong>
52465301 あなたのコンピュータに<strong>[$1 ファイルをダウンロード]</strong>してください。
52475302
52485303 注:
52495304 * 出力に満足できませんか?改善が可能か、[[{{MediaWiki:Coll-helppage}}|ブックについてのヘルプページ]]をご覧ください。',
 5305+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/ページ情報テキストを生成中',
 5306+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/コレクション情報テキストを生成中',
52505307 'coll-notfound_title' => 'ブックが見つかりません',
52515308 'coll-notfound_text' => 'ブックの保存ページが見つかりませんでした。',
52525309 'coll-download_notfound_title' => 'ファイルが見つかりません',
@@ -5282,6 +5339,7 @@
52835340 'coll-suggest_article_remove' => 'ページ「<strong>$1</strong>」はあなたのブックから除去されました($2)。',
52845341 'coll-suggest_undo_tooltip' => 'この操作を取り消し',
52855342 'coll-suggest_undo' => '取り消し',
 5343+ 'coll-load_local_book' => 'OKをクリックすると %NUMPAGES% 件のウィキページを含む本を %TITLE% という題で作成します。この本を削除して新しい本を作成する場合はキャンセルをクリックしてください。',
52865344 'right-collectionsaveasuserpage' => 'ブックを利用者ページとして保存',
52875345 'right-collectionsaveascommunitypage' => 'ブックを共有ページとして保存',
52885346 );
@@ -5488,6 +5546,7 @@
54895547 'coll-suggest_add_selected' => 'არჩეული გვერდების დამატება',
54905548 'coll-suggest_your_book' => 'თქვენი წიგნი',
54915549 'coll-suggest_show' => 'ჩვენება',
 5550+ 'coll-suggest_undo_tooltip' => 'ცვლილების გაუქმება',
54925551 'coll-suggest_undo' => 'გაუქმება',
54935552 'right-collectionsaveasuserpage' => 'შეინახე წიგნი, როგორც მომხმარებლის გვერდი',
54945553 'right-collectionsaveascommunitypage' => 'შეინახეთ წიგნი, როგორც საზოგადოების გვერდი',
@@ -5571,8 +5630,10 @@
55725631 */
55735632 $messages['kn'] = array(
55745633 'coll-show' => 'ತೋರಿಸು',
 5634+ 'coll-title' => 'ಶೀರ್ಷಿಕೆ:',
55755635 'coll-yes' => 'ಹೌದು',
55765636 'coll-no' => 'ಇಲ್ಲ',
 5637+ 'coll-rendering_status' => '<strong>ಸ್ಥಾನಮಾನ:</strong> $1',
55775638 'coll-suggest_show' => 'ತೋರಿಸು',
55785639 );
55795640
@@ -5701,7 +5762,7 @@
57025763 'coll-about_pp' => 'Angut sa Iwan $1',
57035764 );
57045765
5705 -/** Ripoarisch (Ripoarisch)
 5766+/** Colognian (Ripoarisch)
57065767 * @author Purodha
57075768 */
57085769 $messages['ksh'] = array(
@@ -5837,7 +5898,7 @@
58385899 'right-collectionsaveascommunitypage' => 'E Boch als en Jemeinschaffß_Sigg avspeichere',
58395900 );
58405901
5841 -/** Cornish (Kernowek)
 5902+/** Cornish (Kernewek)
58425903 * @author Kernoweger
58435904 * @author Kw-Moon
58445905 */
@@ -5981,6 +6042,7 @@
59826043 'coll-suggest_article_remove' => "D'Säit <strong>$1</strong> gouf aus Ärem Buch erausgeholl ($2).",
59836044 'coll-suggest_undo_tooltip' => 'Dës Aktioun réckgängeg maachen',
59846045 'coll-suggest_undo' => 'réckgängeg maachen',
 6046+ 'coll-load_local_book' => 'Klickt OK fir mat Ärem Buch %TITLE% dat %NUMPAGES% Wikisäiten huet weiderzefueren. Klickt Ofbriechen fir et ze läschen a mat engem eidele Buch unzefänken.',
59856047 'right-collectionsaveasuserpage' => 'Bicher als Benotzersäit späicheren',
59866048 'right-collectionsaveascommunitypage' => 'Bicher als Gemeinschaftssäit späicheren',
59876049 );
@@ -6234,6 +6296,8 @@
62356297
62366298 Белешки:
62376299 * Не сте задоволни со резултатот? Погледајте ја нашата [[{{MediaWiki:Coll-helppage}}|страница за помош со книги]] за да ги видите можностите за нејзино подобрување.',
 6300+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Изработка на информативен текст за страницата',
 6301+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Изработка на информативен текст за збирката',
62386302 'coll-notfound_title' => 'Книгата не е пронајдена',
62396303 'coll-notfound_text' => 'Не можев да ја пронајдам страницата.',
62406304 'coll-download_notfound_title' => 'Податотеката не е пронајдена',
@@ -6274,6 +6338,7 @@
62756339 'coll-suggest_article_remove' => 'Страницата <strong>$1</strong> е отстранета од вашата книга ($2).',
62766340 'coll-suggest_undo_tooltip' => 'Врати го ова дејство',
62776341 'coll-suggest_undo' => 'врати',
 6342+ 'coll-load_local_book' => 'Кликнете на „ОК“ за да продолжите со книгата %TITLE% којашто содржи %NUMPAGES% вики-страници. Кликнете на „Откажи“ за да ја избришете и да започнете со празна книга.',
62786343 'right-collectionsaveasuserpage' => 'Зачувување на книги како корисничка страница',
62796344 'right-collectionsaveascommunitypage' => 'Зачувување на книги како страница на заедницата',
62806345 );
@@ -6307,7 +6372,7 @@
63086373 ജാവാസ്ക്രിപ്റ്റ് സജ്ജമാക്കിയില്ലെങ്കിൽ, ഈ താൾ ശരിയായ രീതിയിൽ പ്രവർത്തിക്കില്ല.</strong>',
63096374 'coll-savedbook_template' => 'ശേഖരിക്കപ്പെട്ട_പുസ്തകം',
63106375 'coll-your_book' => 'താങ്കളുടെ പുസ്തകം',
6311 - 'coll-download_title' => 'ഡൗണ്‍ലോഡ്',
 6376+ 'coll-download_title' => 'ഡൗൺലോഡ്',
63126377 'coll-download_text' => 'താങ്കളുടെ പുസ്തകം ഡൗൺലോഡ് ചെയ്യുന്നതിനായി ഫോർമാറ്റ് തിരഞ്ഞെടുത്ത ശേഷം ബട്ടൺ ഞെക്കുക.',
63136378 'coll-download_as_text' => 'താങ്കളുടെ പുസ്തകം $1 ഫോർമാറ്റിൽ ഡൗൺലോഡ് ചെയ്യാൻ ബട്ടൺ അമർത്തുക.',
63146379 'coll-download' => 'ഡൗൺലോഡ്',
@@ -6318,44 +6383,44 @@
63196384 'coll-move_up' => 'മുകളിലേക്കു നീങ്ങുക',
63206385 'coll-move_down' => 'താഴേക്ക് നീങ്ങുക',
63216386 'coll-move_to_bottom' => 'ഏറ്റവും താഴേക്ക് നീങ്ങുക',
6322 - 'coll-title' => 'ശീര്‍ഷകം:',
6323 - 'coll-subtitle' => 'ഉപശീര്‍ഷകം:',
 6387+ 'coll-title' => 'ശീർഷകം:',
 6388+ 'coll-subtitle' => 'ഉപശീർഷകം:',
63246389 'coll-contents' => 'ഉള്ളടക്കം',
63256390 'coll-drag_and_drop' => 'വിക്കി താളുകളും അദ്ധ്യായങ്ങളും ക്രമം മാറ്റാൻ വലിച്ചിടൽ ഉപയോഗിക്കുക',
63266391 'coll-create_chapter' => 'അദ്ധ്യായം സൃഷ്ടിക്കുക',
6327 - 'coll-sort_alphabetically' => 'താളുകള്‍ അകാദാരിക്രമത്തില്‍ ക്രമീകരിക്കുക',
6328 - 'coll-rename' => 'പുനഃര്‍നാമകരണം ചെയ്യുക',
 6392+ 'coll-sort_alphabetically' => 'താളുകൾ അകാദാരിക്രമത്തിൽ ക്രമീകരിക്കുക',
 6393+ 'coll-rename' => 'പുനഃർനാമകരണം ചെയ്യുക',
63296394 'coll-new_chapter' => 'പുതിയ അദ്ധ്യായത്തിനു ഒരു പേരു കൊടുക്കുക',
63306395 'coll-rename_chapter' => 'അദ്ധ്യായത്തിനു പുതിയൊരു പേരു കൊടുക്കുക',
6331 - 'coll-no_such_category' => 'അങ്ങനെ ഒരു വര്‍ഗ്ഗം നിലവിലില്ല',
6332 - 'coll-notitle_title' => 'താളിന്റെ തലക്കെട്ട് നിര്‍ണ്ണയിക്കുന്നതിനു കഴിഞ്ഞില്ല.',
 6396+ 'coll-no_such_category' => 'അങ്ങനെ ഒരു വർഗ്ഗം നിലവിലില്ല',
 6397+ 'coll-notitle_title' => 'താളിന്റെ തലക്കെട്ട് നിർണ്ണയിക്കുന്നതിനു കഴിഞ്ഞില്ല.',
63336398 'coll-post_failed_title' => 'POST അഭ്യർത്ഥന പരാജയപ്പെട്ടു',
63346399 'coll-post_failed_msg' => '$1 എന്നതിലേയ്ക്കുള്ള POST അഭ്യർത്ഥന പരാജയപ്പെട്ടു ($2).',
63356400 'coll-mwserve_failed_title' => 'റെൻഡർ സെർവർ പിഴവ്',
63366401 'coll-mwserve_failed_msg' => 'റെൻഡർ സെ‌‌ർവറിൽ പിഴവ് സംഭവിച്ചിരിക്കുന്നു: <nowiki>$1</nowiki>',
6337 - 'coll-error_reponse' => 'സെര്‍‌വറില്‍ നിന്നു പിഴവാണെന്ന മറുപടി കിട്ടി.',
 6402+ 'coll-error_reponse' => 'സെർ‌വറിൽ നിന്നു പിഴവാണെന്ന മറുപടി കിട്ടി.',
63386403 'coll-empty_collection' => 'ശൂന്യമായ പുസ്തകം',
63396404 'coll-revision' => 'പതിപ്പ്: $1',
63406405 'coll-save_collection_title' => 'താങ്കളുടെ പുസ്തകം സേവ് ചെയ്യുക പങ്ക് വെയ്ക്കുക',
63416406 'coll-save_collection_text' => 'താങ്കളുടെ പുസ്തകം ശേഖരിച്ചു വെയ്ക്കേണ്ട സ്ഥലം തിരഞ്ഞെടുത്തു നൽകുക:',
6342 - 'coll-login_to_save' => 'പുസ്തകങ്ങൾ പിന്നീടുള്ള ഉപയോഗത്തിനായി സൂക്ഷിക്കണമെങ്കില്‍, ദയവായി [[Special:UserLogin|ലോഗിന്‍ ചെയ്യുകയോ പുതിയൊരു അംഗത്വം ഉണ്ടാക്കുകയോ ചെയ്യുക]].',
 6407+ 'coll-login_to_save' => 'പുസ്തകങ്ങൾ പിന്നീടുള്ള ഉപയോഗത്തിനായി സൂക്ഷിക്കണമെങ്കിൽ, ദയവായി [[Special:UserLogin|ലോഗിൻ ചെയ്യുകയോ പുതിയൊരു അംഗത്വം ഉണ്ടാക്കുകയോ ചെയ്യുക]].',
63436408 'coll-personal_collection_label' => 'സ്വകാര്യ പുസ്തകം:',
63446409 'coll-community_collection_label' => 'സമൂഹ പുസ്തകം:',
63456410 'coll-save_collection' => 'പുസ്തകം സേവ് ചെയ്യുക',
63466411 'coll-save_category' => 'സേവ് ചെയ്ത പുസ്തകങ്ങളെല്ലാം [[:Category:{{MediaWiki:Coll-bookscategory}}|{{MediaWiki:Coll-bookscategory}}]] വർഗ്ഗത്തിലേയ്ക്ക് ചേർത്തിരിക്കുന്നു.',
6347 - 'coll-overwrite_title' => 'താള്‍ നിലവിലുണ്ട്. അതിനെ ഓവര്‍റൈറ്റ് ചെയ്യട്ടെ?',
6348 - 'coll-overwrite_text' => '[[:$1]] എന്ന പേരില്‍ ഒരു താള്‍ നിലവിലുണ്ട്. താങ്കളുടെ പുസ്തകം ആ താളിനു ബദലാക്കണോ?',
 6412+ 'coll-overwrite_title' => 'താൾ നിലവിലുണ്ട്. അതിനെ ഓവർറൈറ്റ് ചെയ്യട്ടെ?',
 6413+ 'coll-overwrite_text' => '[[:$1]] എന്ന പേരിൽ ഒരു താൾ നിലവിലുണ്ട്. താങ്കളുടെ പുസ്തകം ആ താളിനു ബദലാക്കണോ?',
63496414 'coll-yes' => 'ശരി',
63506415 'coll-no' => 'ഇല്ല',
6351 - 'coll-load_overwrite_text' => 'താങ്കളുടെ പുസ്തകത്തില്‍ ഇപ്പോള്‍ തന്നെ കുറച്ചു താളുകള്‍ ഉണ്ട്.
6352 -താങ്കള്‍ക്കു നിലവിലുള്ള പുസ്തകം മാറ്റണോ, പുതിയ താളുകള്‍ നിലവിലുള്ളതില്‍ ചേര്‍ക്കണോ, അതോ പുസ്തകം ശേഖരിക്കുന്നതു റദ്ദാക്കണമോ?',
6353 - 'coll-overwrite' => 'ഓവര്‍റൈറ്റ്',
6354 - 'coll-append' => 'കൂട്ടിചേര്‍ക്കുക',
 6416+ 'coll-load_overwrite_text' => 'താങ്കളുടെ പുസ്തകത്തിൽ ഇപ്പോൾ തന്നെ കുറച്ചു താളുകൾ ഉണ്ട്.
 6417+താങ്കൾക്കു നിലവിലുള്ള പുസ്തകം മാറ്റണോ, പുതിയ താളുകൾ നിലവിലുള്ളതിൽ ചേർക്കണോ, അതോ പുസ്തകം ശേഖരിക്കുന്നതു റദ്ദാക്കണമോ?',
 6418+ 'coll-overwrite' => 'ഓവർറൈറ്റ്',
 6419+ 'coll-append' => 'കൂട്ടിചേർക്കുക',
63556420 'coll-cancel' => 'റദ്ദാക്കുക',
63566421 'coll-update' => 'പുതുക്കുക',
63576422 'coll-limit_exceeded_title' => 'പുസ്തകത്തിന്റെ വലിപ്പം വളരെ കൂടുതലാണ്‌',
63586423 'coll-limit_exceeded_text' => 'താങ്കളുടെ പുസ്തകം വളരെ വലുതാണ്‌.
6359 -ഇനി കൂടുതല്‍ താളുകള്‍ ചേര്‍ക്കുന്നതിനു സാദ്ധ്യമല്ല.',
 6424+ഇനി കൂടുതൽ താളുകൾ ചേർക്കുന്നതിനു സാദ്ധ്യമല്ല.',
63606425 'coll-rendering_title' => 'റെൻഡർ ചെയ്യുന്നു',
63616426 'coll-rendering_text' => '<p><strong>പ്രമാണം സൃഷ്ടിക്കപ്പെടുന്നതു വരെ ദയവായി കാത്തിരിക്കുക.</strong></p>
63626427 <p><strong>പുരോഗതി:</strong> <span id="renderingProgress">$1</span>% <span id="renderingStatus">$2</span></p>
@@ -6363,14 +6428,18 @@
63646429 'coll-rendering_status' => '<strong>സ്ഥിതി:</strong> $1',
63656430 'coll-rendering_article' => '(‌‌വിക്കി താൾ:$1)',
63666431 'coll-rendering_page' => '(താൾ: $1)',
 6432+ 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/താളിന്റെ വിവരങ്ങളുള്ള എഴുത്ത് പ്രദർശനയോഗ്യമാക്കുന്നു',
 6433+ 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/ശേഖരത്തിന്റെ വിവരങ്ങളുള്ള എഴുത്ത് പ്രദർശനയോഗ്യമാക്കുന്നു',
63676434 'coll-rendering_finished_title' => 'റെൻഡർ ചെയ്യൽ പൂർണ്ണം',
63686435 'coll-rendering_finished_text' => '<strong>വിവര പ്രമാണം സൃഷ്ടിച്ചിരിക്കുന്നു.</strong>
63696436 താങ്കളുടെ കമ്പ്യൂട്ടറിലേയ്ക്ക് <strong>[$1 പ്രമാണം ഡൗൺലോഡ് ചെയ്യുക]</strong>.
63706437
63716438 കുറിപ്പുകൾ:
63726439 * ലഭ്യമായതിൽ സംതൃപ്തനല്ലേ? അത് മെച്ചപ്പെടുത്താനുള്ള സാധ്യതകളെ കുറിച്ചറിയാൻ [[{{MediaWiki:Coll-helppage}}|പുസ്തകങ്ങൾ സംബന്ധിച്ച സഹായം താൾ കാണുക]]',
 6440+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/താളിന്റെ വിവരങ്ങളുള്ള എഴുത്ത് പ്രദർശനയോഗ്യമാക്കുന്നു',
 6441+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/ശേഖരത്തിന്റെ വിവരങ്ങളുള്ള എഴുത്ത് പ്രദർശനയോഗ്യമാക്കുന്നു',
63736442 'coll-notfound_title' => 'പുസ്തകം കണ്ടെത്താനായില്ല',
6374 - 'coll-notfound_text' => 'പുസ്തക താള്‍ കണ്ടെത്താന്‍ കഴിഞ്ഞില്ല.',
 6443+ 'coll-notfound_text' => 'പുസ്തക താൾ കണ്ടെത്താൻ കഴിഞ്ഞില്ല.',
63756444 'coll-download_notfound_title' => 'പ്രമാണം കണ്ടെത്താൻ കഴിഞ്ഞില്ല',
63766445 'coll-download_notfound_text' => 'താങ്കൾ ഡൗൺലോഡ് ചെയ്യാൻ ശ്രമിക്കുന്ന പ്രമാണം നിലവിലില്ല:
63776446 ചിലപ്പോളത് മായ്ക്കപ്പെട്ടിരിക്കുന്നതാവാം, അങ്ങനെയെങ്കിൽ അത് പുനഃസൃഷ്ടിക്കേണ്ടതുണ്ട്.',
@@ -6381,7 +6450,7 @@
63826451 'coll-excluded-templates' => '*[[:Category:$1|$1]] എന്ന വർഗ്ഗത്തിലുൾപ്പെട്ട ഫലകങ്ങൾ ഒഴിവാക്കി.',
63836452 'coll-blacklisted-templates' => '*കരിമ്പട്ടികയിലുള്ള ഫലകങ്ങൾ [[:$1]] ഒഴിവാക്കിയിരിക്കുന്നു.',
63846453 'coll-return_to_collection' => '<p><a href="$1">$2</a></p>-ലേക്കു തിരിച്ചു പോവുക',
6385 - 'coll-book_title' => 'അച്ചടിച്ച പുസ്തകം ഓര്‍ഡര്‍ ചെയ്യുക',
 6454+ 'coll-book_title' => 'അച്ചടിച്ച പുസ്തകം ഓർഡർ ചെയ്യുക',
63866455 'coll-book_text' => 'ഞങ്ങളുടെ ആവശ്യപ്പെട്ടാൽ-അച്ചടിച്ചു-തരുന്ന പങ്കാളിയുടെ പക്കൽ നിന്നും അച്ചടിച്ച പുസ്തകം സ്വന്തമാക്കുക.',
63876456 'coll-order_from_pp' => '$1 വഴി എങ്ങനെയുണ്ടെന്നു കാണുക',
63886457 'coll-about_pp' => '$1-നെ കുറിച്ച്',
@@ -6409,6 +6478,7 @@
64106479 'coll-suggest_article_remove' => 'താൾ <strong>$1</strong>, താങ്കളുടെ പുസ്തകത്തിൽ നിന്നും നീക്കം ചെയ്തു ($2).',
64116480 'coll-suggest_undo_tooltip' => 'ഈ പ്രവൃത്തി തിരസ്കരിക്കുക',
64126481 'coll-suggest_undo' => 'പ്രവൃത്തി തിരസ്കരിക്കുക',
 6482+ 'coll-load_local_book' => '%NUMPAGES% വിക്കി താളുകൾ ഉൾക്കൊള്ളുന്ന %TITLE% പുസ്തകത്തിന്റെ പ്രവൃത്തികൾ തുടരാൻ ശരി എന്നത് ഞെക്കുക. അത് മായ്ച്ച് ശൂന്യമായ പുസ്തകത്തിൽ തുടങ്ങാൻ റദ്ദാക്കുക ഞെക്കുക.',
64136483 'right-collectionsaveasuserpage' => 'പുസ്തകങ്ങൾ ഉപയോക്തൃതാളായി സേവ് ചെയ്യുക',
64146484 'right-collectionsaveascommunitypage' => 'പുസ്തകങ്ങൾ സമൂഹ താളായി സേവ് ചെയ്യുക',
64156485 );
@@ -6615,6 +6685,7 @@
66166686 $messages['myv'] = array(
66176687 'coll-collection' => 'Кинига',
66186688 'coll-collections' => 'Кинигат',
 6689+ 'coll-download_title' => 'Таргамо',
66196690 'coll-download' => 'Таргамс',
66206691 'coll-remove' => 'Нардык',
66216692 'coll-title' => 'Коняксозо:',
@@ -6866,6 +6937,8 @@
68676938
68686939 Opmerkingen:
68696940 * Niet tevreden met de uitvoer? Op de [[{{MediaWiki:Coll-helppage}}|hulppagina over boeken]] staan tips om deze uitvoer te verbeteren.',
 6941+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informatietekst bij renderen pagina',
 6942+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Informatietekst bij renderen verzameling',
68706943 'coll-notfound_title' => 'Boek niet gevonden',
68716944 'coll-notfound_text' => 'Boekpagina is niet gevonden.',
68726945 'coll-download_notfound_title' => 'Het bestand is niet gevonden',
@@ -6906,6 +6979,7 @@
69076980 'coll-suggest_article_remove' => 'De pagina <strong>$1</strong> is verwijderd uit uw boek ($2).',
69086981 'coll-suggest_undo_tooltip' => 'Deze handeling ongedaan maken',
69096982 'coll-suggest_undo' => 'ongedaan maken',
 6983+ 'coll-load_local_book' => 'Klik "OK" om door te gaan met uw boek %TITLE% dat %NUMPAGES% wikipagina\'s bevat. Klik op "Annuleren" om het te verwijderen en opnieuw te beginnen met een leeg boek.',
69106984 'right-collectionsaveasuserpage' => 'Boeken opslaan als gebruikerspagina',
69116985 'right-collectionsaveascommunitypage' => 'Boeken opslaan als gemeenschapspagina',
69126986 );
@@ -7147,6 +7221,8 @@
71487222
71497223 Merk:
71507224 * Ikke fornøyd med resultatet? Se [[{{MediaWiki:Coll-helppage}}|hjelpsiden om samlinger]] for muligheter til å forbedre den.',
 7225+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Gjengir sideinformasjonstekst',
 7226+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Gjengir samlingsinformasjonstekst',
71517227 'coll-notfound_title' => 'Bok ikke funnet',
71527228 'coll-notfound_text' => 'Kunne ikke finne bokside.',
71537229 'coll-download_notfound_title' => 'Fil ikke funnet',
@@ -7285,6 +7361,8 @@
72867362
72877363 Nòtas :
72887364 * Pas satisfach(a) de la sortida ? Vejatz [[{{MediaWiki:Coll-helppage}}|la pagina d’ajuda que concernís las colleccions]] per las possibilitats de melhorament.',
 7365+ 'coll-finished_page_info_text_article' => "{{MediaWiki:Coll-helppage}}/Rendut del tèxte d'informacion de la pagina",
 7366+ 'coll-finished_collection_info_text_article' => "{{MediaWiki:Coll-helppage}}/Rendut del tèxte d'informacion de la colleccion",
72897367 'coll-notfound_title' => 'Libre pas trobat',
72907368 'coll-notfound_text' => 'Pòt pas trobar lo libre.',
72917369 'coll-download_notfound_title' => 'Fichièr introbable',
@@ -7470,6 +7548,8 @@
74717549
74727550 Uwaga:
74737551 * Nie jesteś zadowolony z wygenerowanego dokumentu? Zajrzyj na [[{{MediaWiki:Coll-helppage}}|stronę pomocy dotyczącą kolekcji]], aby dowiedzieć się jakie są możliwości poprawy dokumentu.',
 7552+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Tekst informacyjny przetwarzania strony',
 7553+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Tekst informacyjny przetwarzania kolekcji',
74747554 'coll-notfound_title' => 'Książki nie odnaleziono',
74757555 'coll-notfound_text' => 'Nie udało się odnaleźć strony z ksiązki.',
74767556 'coll-download_notfound_title' => 'Nie odnaleziono pliku',
@@ -7509,6 +7589,7 @@
75107590 'coll-suggest_article_remove' => 'Strona <strong>$1</strong> została usunięta z Twojej książki ($2).',
75117591 'coll-suggest_undo_tooltip' => 'Cofnij tę operację',
75127592 'coll-suggest_undo' => 'cofnij',
 7593+ 'coll-load_local_book' => 'Kliknij „OK” aby kontynuować tworzenie książki %TITLE% zawierającej %NUMPAGES% stron wiki. Kliknij „Anuluj” aby usunąć istniejącą i rozpocząć tworzenie nowej książki.',
75137594 'right-collectionsaveasuserpage' => 'Zapisywanie książek jako stronę użytkownika',
75147595 'right-collectionsaveascommunitypage' => 'Zapisywanie książek jako wspólną stronę',
75157596 );
@@ -7611,6 +7692,8 @@
76127693
76137694 Nòte:
76147695 * Pa sodisfàit ëd l'arzultà? Ch'a varda [[{{MediaWiki:Coll-helppage}}|la pàgina d'agiut an sij lìber]] për dle possibilità d'ameliorelo.",
 7696+ 'coll-finished_page_info_text_article' => "{{MediaWiki:Coll-helppage}}/Visualisassion dël test d'anformassion ëd la pàgina",
 7697+ 'coll-finished_collection_info_text_article' => "{{MediaWiki:Coll-helppage}}/Visualisassion dël test d'anformassion dla colession",
76157698 'coll-notfound_title' => 'Lìber pa trovà',
76167699 'coll-notfound_text' => "La pàgina dël lìber a l'é pa podusse trové.",
76177700 'coll-download_notfound_title' => 'Archivi pa trovà',
@@ -7735,7 +7818,7 @@
77367819 'coll-couldnotremovearticle_title' => 'Não foi possível remover a página wiki',
77377820 'coll-couldnotremovearticle_msg' => 'A página wiki não pôde ser removida.',
77387821 'coll-noscript_text' => '<h1>É necessário o JavaScript!</h1>
7739 -<strong>Ou o seu navegador não suporta JavaScript ou o JavaScript foi desactivado.
 7822+<strong>Ou o seu browser não suporta JavaScript ou o JavaScript foi desactivado.
77407823 Esta página não funcionará correctamente sem o JavaScript.</strong>',
77417824 'coll-savedbook_template' => 'livro_gravado',
77427825 'coll-your_book' => 'O seu livro',
@@ -7763,8 +7846,8 @@
77647847 'coll-notitle_title' => 'Não foi possível determinar o título da página.',
77657848 'coll-post_failed_title' => 'Pedido POST falhou',
77667849 'coll-post_failed_msg' => 'O pedido POST feito a $1 falhou ($2).',
7767 - 'coll-mwserve_failed_title' => 'Erro no servidor de renderização',
7768 - 'coll-mwserve_failed_msg' => 'Ocorreu um erro no servidor de renderização: <nowiki>$1</nowiki>',
 7850+ 'coll-mwserve_failed_title' => 'Erro no servidor de composição de imagem',
 7851+ 'coll-mwserve_failed_msg' => 'Ocorreu um erro no servidor de composição de imagem: <nowiki>$1</nowiki>',
77697852 'coll-error_reponse' => 'Resposta de erro do servidor',
77707853 'coll-empty_collection' => 'Livro vazio',
77717854 'coll-revision' => 'Revisão: $1',
@@ -7789,24 +7872,26 @@
77907873 'coll-limit_exceeded_title' => 'Livro demasiado grande',
77917874 'coll-limit_exceeded_text' => 'O seu livro é demasiado grande.
77927875 Não podem ser adicionadas mais páginas.',
7793 - 'coll-rendering_title' => 'Renderizando',
 7876+ 'coll-rendering_title' => 'A compor imagem',
77947877 'coll-rendering_text' => '<p><strong>Por favor, aguarde enquanto o documento é gerado.</strong></p>
77957878
77967879 <p><strong>Progresso:</strong> <span id="renderingProgress">$1</span>% <span id="renderingStatus">$2</span></p>
77977880
77987881 <p>Esta página deverá actualizar-se automaticamente com frequência.
7799 -Se não o fizer, por favor use o botão "actualizar" ("refresh") do seu navegador.</p>',
 7882+Se não o fizer, por favor use o botão "actualizar" ("refresh") do seu browser.</p>',
78007883 'coll-rendering_status' => '<strong>Estado:</strong> $1',
78017884 'coll-rendering_article' => '(página wiki: $1)',
78027885 'coll-rendering_page' => '(página: $1)',
7803 - 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Mostrando o texto de informação da página',
7804 - 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Mostrando o texto de informação do livro',
7805 - 'coll-rendering_finished_title' => 'Renderização concluída',
 7886+ 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/A compor o texto de informação da página',
 7887+ 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/A compor o texto de informação do livro',
 7888+ 'coll-rendering_finished_title' => 'Composição da imagem concluída',
78067889 'coll-rendering_finished_text' => '<strong>O ficheiro foi gerado.</strong>
78077890 <strong>[$1 Transfira o ficheiro]</strong> para o seu computador.
78087891
78097892 Notas:
78107893 * Não está satisfeito com o resultado? Consulte [[{{MediaWiki:Coll-helppage}}|a página de ajuda sobre livros]] para conhecer as possibilidades de aprimoramento.',
 7894+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/A compor o texto de informação da página',
 7895+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/A compor o texto de informação do livro',
78117896 'coll-notfound_title' => 'Livro não foi encontrado',
78127897 'coll-notfound_text' => 'Não foi possível encontrar a página do livro.',
78137898 'coll-download_notfound_title' => 'Ficheiro não encontrado',
@@ -7814,7 +7899,8 @@
78157900 Talvez tenha sido apagado e precise de ser regenerado.',
78167901 'coll-download_failed_title' => 'Erro durante o descarregamento',
78177902 'coll-download_failed_text' => 'Ocorreu um erro ao descarregar o ficheiro: $1',
7818 - 'coll-is_cached' => '<ul><li>Foi encontrada uma versão deste documento em cache, dispensando a renderização. <a href="$1"> Forçar nova renderização.</a></li></ul>',
 7903+ 'coll-is_cached' => '<ul><li>Foi encontrada uma versão deste documento em cache, dispensando a sua composição.
 7904+<a href="$1">Forçar nova composição.</a></li></ul>',
78197905 'coll-excluded-templates' => '* As predefinições na categoria [[:Category:$1|$1]] foram excluídas.',
78207906 'coll-blacklisted-templates' => '* As predefinições na lista negra [[:$1]] foram excluídas.',
78217907 'coll-return_to_collection' => '<p>Regressar a <a href="$1">$2</a></p>',
@@ -7846,6 +7932,7 @@
78477933 'coll-suggest_article_remove' => 'A página <strong>$1</strong> foi removida do seu livro ($2).',
78487934 'coll-suggest_undo_tooltip' => 'Desfazer esta acção',
78497935 'coll-suggest_undo' => 'desfazer',
 7936+ 'coll-load_local_book' => 'Clique OK para continuar com o seu livro %TITLE% que contém %NUMPAGES% páginas wiki. Clique Cancelar para apagá-lo e começar com um livro vazio.',
78507937 'right-collectionsaveasuserpage' => 'Gravar livros como página de utilizador',
78517938 'right-collectionsaveascommunitypage' => 'Gravar livros como página comunitária',
78527939 );
@@ -8263,14 +8350,16 @@
82648351 'coll-rendering_status' => '<strong>Статус:</strong> $1',
82658352 'coll-rendering_article' => '(статья: $1)',
82668353 'coll-rendering_page' => '(страница: $1)',
8267 - 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Отображение информации о странице',
8268 - 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Отображение информации о коллекции',
8269 - 'coll-rendering_finished_title' => 'Создание завершено',
 8354+ 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Отрисовка текста сведений о странице',
 8355+ 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Отрисовка текста сведений о коллекции',
 8356+ 'coll-rendering_finished_title' => 'Отрисовка завершена',
82708357 'coll-rendering_finished_text' => '<strong>Файл документа создан.</strong>
82718358 <strong>[$1 Скачать файл]</strong> на свой компьютер.
82728359
82738360 Замечание:
82748361 * Не удовлетворены результатом? Возможности его улучшения описаны на [[{{MediaWiki:Coll-helppage}}|справочной странице о книгах]].',
 8362+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Отрисовка текста сведений о странице',
 8363+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Отрисовка текста сведений о коллекции',
82758364 'coll-notfound_title' => 'Книга не найдена',
82768365 'coll-notfound_text' => 'Невозможно найти страницу книги.',
82778366 'coll-download_notfound_title' => 'Файл не найден',
@@ -8309,6 +8398,7 @@
83108399 'coll-suggest_article_remove' => 'Из вашей книги ($2) была удалена страница <strong>$1</strong>.',
83118400 'coll-suggest_undo_tooltip' => 'Отменить это действие',
83128401 'coll-suggest_undo' => 'отменить',
 8402+ 'coll-load_local_book' => 'Нажмите «ОК», чтобы продолжить работу с вашей книгой %TITLE%, содержащей %NUMPAGES% вики-страниц. Нажмите «Отмена», чтобы удалить её и начать с пустой книги.',
83138403 'right-collectionsaveasuserpage' => 'сохранение книг, как страницу участника',
83148404 'right-collectionsaveascommunitypage' => 'сохранение книг, как страницу сообщества',
83158405 );
@@ -10334,12 +10424,16 @@
1033510425 'coll-rendering_status' => '<strong>Trạng thái:</strong> $1',
1033610426 'coll-rendering_article' => '(trang wiki: $1)',
1033710427 'coll-rendering_page' => '(trang: $1)',
 10428+ 'coll-rendering_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Kết xuất văn bản thông tin trang',
 10429+ 'coll-rendering_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Kết xuất văn bản thông tin tuyển tập',
1033810430 'coll-rendering_finished_title' => 'Kết xuất xong',
1033910431 'coll-rendering_finished_text' => '<strong>Xong kết xuất tập tin tài liệu.</strong>
1034010432 <strong>[$1 Tải nó về]</strong> máy tính của mình.
1034110433
1034210434 Chú ý:
1034310435 * Không vừa lòng với bản kết xuất này? Hãy đọc [[{{MediaWiki:Coll-helppage}}|trợ giúp về tập hợp]] để biết về những cách để cải tiến nó.',
 10436+ 'coll-finished_page_info_text_article' => '{{MediaWiki:Coll-helppage}}/Kết xuất văn bản thông tin trang',
 10437+ 'coll-finished_collection_info_text_article' => '{{MediaWiki:Coll-helppage}}/Kết xuất văn bản thông tin tuyển tập',
1034410438 'coll-notfound_title' => 'Không tìm thấy sách',
1034510439 'coll-notfound_text' => 'Không tìm thấy trang sách.',
1034610440 'coll-download_notfound_title' => 'Không tìm thấy tập tin',
@@ -10378,6 +10472,7 @@
1037910473 'coll-suggest_article_remove' => 'Trang <strong>$1</strong> đã bị xóa ra khỏi cuốn sách ($2).',
1038010474 'coll-suggest_undo_tooltip' => 'Phục hồi tác vụ này',
1038110475 'coll-suggest_undo' => 'phục hồi',
 10476+ 'coll-load_local_book' => 'Nhấn OK để tiếp tục quyển sách %TITLE% hiện có %NUMPAGES% trang wiki. Nhấn Cancel để xóa và làm việc với quyển sách trắng.',
1038210477 'right-collectionsaveasuserpage' => 'Lưu sách vở thành trang cá nhân',
1038310478 'right-collectionsaveascommunitypage' => 'Lưu sách thành trang cộng đồng',
1038410479 );
@@ -10462,7 +10557,31 @@
1046310558 'coll-rendering_page' => '(בלאַט: $1)',
1046410559 );
1046510560
10466 -/** Yue (粵語)
 10561+/** Yoruba (Yorùbá)
 10562+ * @author Demmy
 10563+ */
 10564+$messages['yo'] = array(
 10565+ 'coll-desc' => '[[Special:Book|Dá àwọn ìwé]]',
 10566+ 'coll-book_creator_text_article' => '{{MediaWiki:Coll-helppage}}/Lẹ́tà ọ̀rọ̀ olùdá ìwé',
 10567+ 'coll-collection' => 'Ìwé',
 10568+ 'coll-collections' => 'Àwọn ìwé',
 10569+ 'coll-print_template_prefix' => 'Ìtẹ́síìwé',
 10570+ 'coll-print_template_pattern' => '$1/Ìtẹ́síìwé',
 10571+ 'coll-your_book' => 'Ìwé yín',
 10572+ 'coll-title' => 'Àkọlé:',
 10573+ 'coll-subtitle' => 'Àkọléabẹ́:',
 10574+ 'coll-contents' => 'Àwọn àkóónú',
 10575+ 'coll-create_chapter' => 'Dá orí ìwé',
 10576+ 'coll-sort_alphabetically' => 'Títò bi ABD',
 10577+ 'coll-rename' => 'Àtúnṣọlọ́rúkọ',
 10578+ 'coll-yes' => 'Bẹ́ẹ̀ni',
 10579+ 'coll-no' => 'Bẹ́ẹ̀kọ́',
 10580+ 'coll-cancel' => 'Fagilé',
 10581+ 'coll-about_pp' => 'Nípa $1',
 10582+ 'coll-return_to' => 'Padà sí [[:$1]]',
 10583+);
 10584+
 10585+/** Cantonese (粵語)
1046710586 * @author Shinjiman
1046810587 */
1046910588 $messages['yue'] = array(
Index: branches/wmf/1.16wmf4/extensions/Collection/Collection.php
@@ -30,7 +30,7 @@
3131 exit( 1 );
3232 }
3333
34 -$dir = dirname(__FILE__) . '/';
 34+$dir = dirname( __FILE__ ) . '/';
3535
3636 # Extension version
3737 $wgCollectionVersion = "1.4";
@@ -40,7 +40,7 @@
4141 # Configuration:
4242
4343 /** Bump the version number every time you change any of the JavaScript files */
44 -$wgCollectionStyleVersion = 6;
 44+$wgCollectionStyleVersion = 8;
4545
4646 /** URL of mw-serve render server */
4747 $wgCollectionMWServeURL = 'http://tools.pediapress.com/mw-serve/';
@@ -162,9 +162,9 @@
163163
164164 $wgAjaxExportList[] = 'wfAjaxGetCollection';
165165
166 -function wfAjaxPostCollection( $collection='' ) {
 166+function wfAjaxPostCollection( $collection = '' ) {
167167 $json = new Services_JSON( SERVICES_JSON_LOOSE_TYPE );
168 - if( session_id() == '' ) {
 168+ if ( session_id() == '' ) {
169169 wfSetupSession();
170170 }
171171 $collection = $json->decode( $collection );
@@ -176,12 +176,15 @@
177177
178178 $wgAjaxExportList[] = 'wfAjaxPostCollection';
179179
180 -function wfAjaxGetMWServeStatus( $collection_id='', $writer='rl' ) {
 180+function wfAjaxGetMWServeStatus( $collection_id = '', $writer = 'rl' ) {
181181 $json = new Services_JSON();
182182 $result = SpecialCollection::mwServeCommand( 'render_status', array(
183183 'collection_id' => $collection_id,
184184 'writer' => $writer
185185 ) );
 186+ if ( isset( $result['status']['progress'] ) ) {
 187+ $result['status']['progress'] = number_format( $result['status']['progress'], 2, '.', '' );
 188+ }
186189 $r = new AjaxResponse( $json->encode( $result ) );
187190 $r->setContentType( 'application/json' );
188191 return $r;
@@ -189,32 +192,39 @@
190193
191194 $wgAjaxExportList[] = 'wfAjaxGetMWServeStatus';
192195
193 -function wfAjaxCollectionAddArticle( $namespace=0, $title='', $oldid='' ) {
 196+function wfAjaxCollectionAddArticle( $namespace = 0, $title = '', $oldid = '' ) {
194197 SpecialCollection::addArticleFromName( $namespace, $title, $oldid );
195 - return '';
 198+ return wfAjaxCollectionGetItemList();
196199 }
197200
198201 $wgAjaxExportList[] = 'wfAjaxCollectionAddArticle';
199202
200 -function wfAjaxCollectionRemoveArticle( $namespace=0, $title='', $oldid='' ) {
 203+function wfAjaxCollectionRemoveArticle( $namespace = 0, $title = '', $oldid = '' ) {
201204 SpecialCollection::removeArticleFromName( $namespace, $title, $oldid );
202 - return '';
 205+ return wfAjaxCollectionGetItemList();
203206 }
204207
205208 $wgAjaxExportList[] = 'wfAjaxCollectionRemoveArticle';
206209
207 -function wfAjaxCollectionAddCategory( $title='' ) {
 210+function wfAjaxCollectionAddCategory( $title = '' ) {
208211 SpecialCollection::addCategoryFromName( $title );
209 - return '';
 212+ return wfAjaxCollectionGetItemList();
210213 }
211214
212215 $wgAjaxExportList[] = 'wfAjaxCollectionAddCategory';
213216
214 -function wfAjaxCollectionGetBookCreatorBoxContent( $ajaxHint='', $oldid=null ) {
215 - if( !is_null( $oldid ) ) {
 217+function wfAjaxCollectionGetBookCreatorBoxContent( $ajaxHint = '', $oldid = null ) {
 218+ if ( !is_null( $oldid ) ) {
216219 $oldid = intval( $oldid );
217220 }
218 - return CollectionHooks::getBookCreatorBoxContent( $ajaxHint, $oldid );
 221+ $html = CollectionHooks::getBookCreatorBoxContent( $ajaxHint, $oldid );
 222+
 223+ $json = new Services_JSON();
 224+ $result = array();
 225+ $result['html'] = $html;
 226+ $r = new AjaxResponse( $json->encode( $result ) );
 227+ $r->setContentType( 'application/json' );
 228+ return $r;
219229 }
220230
221231 $wgAjaxExportList[] = 'wfAjaxCollectionGetBookCreatorBoxContent';
@@ -222,14 +232,24 @@
223233 function wfAjaxCollectionGetItemList() {
224234 wfLoadExtensionMessages( 'CollectionCore' );
225235 wfLoadExtensionMessages( 'Collection' );
 236+
 237+ $collection = $_SESSION['wsCollection'];
 238+
226239 $template = new CollectionListTemplate();
227 - $template->set( 'collection', $_SESSION['wsCollection'] );
 240+ $template->set( 'collection', $collection );
228241 $template->set( 'is_ajax', true );
229242 ob_start();
230243 $template->execute();
231244 $html = ob_get_contents();
232245 ob_end_clean();
233 - return $html;
 246+
 247+ $json = new Services_JSON();
 248+ $result = array();
 249+ $result['html'] = $html;
 250+ $result['collection'] = $collection;
 251+ $r = new AjaxResponse( $json->encode( $result ) );
 252+ $r->setContentType( 'application/json' );
 253+ return $r;
234254 }
235255
236256 $wgAjaxExportList[] = 'wfAjaxCollectionGetItemList';
@@ -257,7 +277,7 @@
258278
259279 function wfAjaxCollectionSetTitles( $title, $subtitle ) {
260280 SpecialCollection::setTitles( $title, $subtitle );
261 - return '';
 281+ return wfAjaxCollectionGetItemList();
262282 }
263283
264284 $wgAjaxExportList[] = 'wfAjaxCollectionSetTitles';
@@ -292,7 +312,7 @@
293313 $json = new Services_JSON();
294314 $result = array();
295315 $imagePath = "$wgScriptPath/extensions/Collection/images";
296 - if ( CollectionSession::findArticle( $title ) == -1 ) {
 316+ if ( CollectionSession::findArticle( $title ) == - 1 ) {
297317 $result['action'] = 'add';
298318 $result['text'] = wfMsg( 'coll-add_linked_article' );
299319 $result['img'] = "$imagePath/silk-add.png";
@@ -324,7 +344,7 @@
325345 array(
326346 'href' => SkinTemplate::makeSpecialUrl(
327347 'Book',
328 - array('bookcmd' => 'suggest', 'undo' => $action, 'arttitle' => $article )
 348+ array( 'bookcmd' => 'suggest', 'undo' => $action, 'arttitle' => $article )
329349 ),
330350 'onclick' => "collectionSuggestCall('UndoArticle'," .
331351 Xml::encodeJsVar( array( $action, $article ) ) . "); return false;",
@@ -337,6 +357,7 @@
338358 htmlspecialchars( $article ),
339359 $undoLink
340360 );
 361+ $result['collection'] = CollectionSession::getCollection();
341362 $r = new AjaxResponse( $json->encode( $result ) );
342363 $r->setContentType( 'application/json' );
343364 return $r;
Index: branches/wmf/1.16wmf4/extensions/Collection/Collection.suggest.php
@@ -51,7 +51,7 @@
5252 * or a number of articles to add or a value (1 - 1.5) all articles with a
5353 * higher value will be added to the collection
5454 */
55 - public function run( $mode='', $param='' ) {
 55+ public function run( $mode = '', $param = '' ) {
5656 global $wgOut;
5757
5858 wfLoadExtensionMessages( 'CollectionCore' );
@@ -118,10 +118,10 @@
119119
120120 // remove the suggestion data from the session
121121 public static function clear() {
122 - if( isset( $_SESSION['wsCollectionSuggestBan'] ) ) {
 122+ if ( isset( $_SESSION['wsCollectionSuggestBan'] ) ) {
123123 unset( $_SESSION['wsCollectionSuggestBan'] );
124124 }
125 - if( isset( $_SESSION['wsCollectionSuggestProp'] ) ) {
 125+ if ( isset( $_SESSION['wsCollectionSuggestProp'] ) ) {
126126 unset( $_SESSION['wsCollectionSuggestProp'] );
127127 }
128128 }
@@ -161,20 +161,20 @@
162162 private static function getCollectionSuggestTemplate( $mode, $param ) {
163163 global $wgCollectionMaxSuggestions;
164164
165 - switch($mode) {
 165+ switch( $mode ) {
166166 case 'add':
167 - SpecialCollection::addArticleFromName(NS_MAIN, $param);
 167+ SpecialCollection::addArticleFromName( NS_MAIN, $param );
168168 self::unban( $param );
169169 break;
170170 case 'ban':
171171 $_SESSION['wsCollectionSuggestBan'][] = $param;
172172 break;
173173 case 'remove':
174 - SpecialCollection::removeArticleFromName(NS_MAIN, $param);
 174+ SpecialCollection::removeArticleFromName( NS_MAIN, $param );
175175 $_SESSION['wsCollectionSuggestBan'][] = $param;
176176 break;
177177 case 'removeonly': // remove w/out banning (for undo)
178 - SpecialCollection::removeArticleFromName(NS_MAIN, $param);
 178+ SpecialCollection::removeArticleFromName( NS_MAIN, $param );
179179 break;
180180 case 'unban': // for undo
181181 self::unban( $param );
@@ -209,7 +209,7 @@
210210 * @param $prop the proposal-Object
211211 */
212212 private static function addArticlesFromName( $articleList, $prop ) {
213 - foreach( $articleList as $article ) {
 213+ foreach ( $articleList as $article ) {
214214 SpecialCollection::addArticleFromName( NS_MAIN, $article );
215215 }
216216 $prop->setCollection( $_SESSION['wsCollection'] );
@@ -299,14 +299,14 @@
300300 * - 'val' : a value between 1 and 1.5, the higher the
301301 * more this article is proposed
302302 */
303 - public function getProposals( $num=0, $doUpdate=true ) {
 303+ public function getProposals( $num = 0, $doUpdate = true ) {
304304 if ( $doUpdate ) {
305305 $this->updateLinkList();
306306 }
307307
308308 $this->getPropList();
309309
310 - if ($num > 0) {
 310+ if ( $num > 0 ) {
311311 return array_slice( $this->mPropList, 0, $num );
312312 } else {
313313 return $this->mPropList;
@@ -314,7 +314,7 @@
315315 }
316316
317317 public function hasBans() {
318 - return count($this->mBanList) > 0;
 318+ return count( $this->mBanList ) > 0;
319319 }
320320
321321 /*
@@ -338,8 +338,8 @@
339339 return;
340340 }
341341
342 - foreach( $this->mColl['items'] as $item ) {
343 - if ( $this->searchEntry( $item['title'], $this->mLinkList ) === false
 342+ foreach ( $this->mColl['items'] as $item ) {
 343+ if ( $this->searchEntry( $item['title'], $this->mLinkList ) === false
344344 && $item['type'] == 'article'
345345 ) {
346346 $articleName = $item['title'];
@@ -362,7 +362,7 @@
363363 private function deleteUnusedArticles() {
364364 $newList = array();
365365 foreach ( $this->mLinkList as $item ) {
366 - if ( CollectionSession::findArticle( $item['name'] ) != -1 ) {
 366+ if ( CollectionSession::findArticle( $item['name'] ) != - 1 ) {
367367 $newList[] = $item;
368368 }
369369 }
@@ -423,7 +423,7 @@
424424 }
425425 $link = $this->resolveRedirects( $title )->getText();
426426
427 - if ( isset ($linkmap[$link] ) ) {
 427+ if ( isset ( $linkmap[$link] ) ) {
428428 $linkmap[$link][$link] = true;
429429 } else {
430430 $linkmap[$link] = array( $link => true );
@@ -465,7 +465,7 @@
466466 // normalize:
467467 $lc_max = 0;
468468 foreach ( $linkcount as $link => $count ) {
469 - if ( $count > $lc_max) {
 469+ if ( $count > $lc_max ) {
470470 $lc_max = $count;
471471 }
472472 }
@@ -473,7 +473,7 @@
474474 $result = array();
475475 if ( $norm > 0 ) {
476476 foreach ( $linkcount as $link => $count ) {
477 - $result[$link] = 1 + 0.5*log($count)/$norm;
 477+ $result[$link] = 1 + 0.5 * log( $count ) / $norm;
478478 }
479479 } else {
480480 foreach ( $linkcount as $link => $count ) {
@@ -485,7 +485,7 @@
486486 } else {
487487 // cheaper algorithm: just count links
488488 foreach ( $linkmap as $alias => $linked ) {
489 - foreach ( $linked as $link => $dummy) {
 489+ foreach ( $linked as $link => $dummy ) {
490490 $linkcount[$link] = 1;
491491 }
492492 }
@@ -498,8 +498,8 @@
499499 private function getPropList() {
500500 $prop = array();
501501 foreach ( $this->mLinkList as $article ) {
502 - foreach ( $article['links'] as $linkName => $val) {
503 - if ( !$this->checkLink( $linkName ) ) {
 502+ foreach ( $article['links'] as $linkName => $val ) {
 503+ if ( !$this->checkLink( $linkName ) ) {
504504 continue;
505505 }
506506 $key = $this->searchEntry( $linkName, $prop );
@@ -588,6 +588,6 @@
589589 if ( $a['val'] < $b['val'] ) {
590590 return 1;
591591 } else {
592 - return -1;
 592+ return - 1;
593593 }
594594 }
Index: branches/wmf/1.16wmf4/extensions/Collection/Collection.hooks.php
@@ -29,9 +29,9 @@
3030 global $wgUser;
3131 global $wgCollectionPortletForLoggedInUsersOnly;
3232
33 - if( !$wgCollectionPortletForLoggedInUsersOnly || $wgUser->isLoggedIn() ) {
 33+ if ( !$wgCollectionPortletForLoggedInUsersOnly || $wgUser->isLoggedIn() ) {
3434 $html = self::getPortlet();
35 - if( $html ) {
 35+ if ( $html ) {
3636 $bar[ 'coll-print_export' ] = $html;
3737 }
3838 }
@@ -42,8 +42,8 @@
4343 global $wgUser;
4444 global $wgCollectionPortletForLoggedInUsersOnly;
4545
46 - if( !$wgCollectionPortletForLoggedInUsersOnly || $wgUser->isLoggedIn() ) {
47 - if( isset( $navUrls['print'] ) ) {
 46+ if ( !$wgCollectionPortletForLoggedInUsersOnly || $wgUser->isLoggedIn() ) {
 47+ if ( isset( $navUrls['print'] ) ) {
4848 // We move this guy out to our own box
4949 unset( $navUrls['print'] );
5050 }
@@ -60,7 +60,7 @@
6161
6262 $html = self::getPortlet();
6363
64 - if( $html ) {
 64+ if ( $html ) {
6565 $portletTitle = wfMsg( 'coll-print_export' );
6666 print "<div id=\"p-coll-print_export\" class=\"portlet\">
6767 <h5>$portletTitle</h5>
@@ -92,8 +92,8 @@
9393 return false;
9494 }
9595
96 - $action = $wgRequest->getVal('action');
97 - if( $action != '' && $action != 'view' && $action != 'purge' ) {
 96+ $action = $wgRequest->getVal( 'action' );
 97+ if ( $action != '' && $action != 'view' && $action != 'purge' ) {
9898 return false;
9999 }
100100
@@ -133,12 +133,12 @@
134134 );
135135 }
136136
137 - $params = array(
 137+ $params = array(
138138 'bookcmd' => 'render_article',
139139 'arttitle' => $wgTitle->getPrefixedText(),
140140 );
141141
142 - if( $wgArticle ) {
 142+ if ( $wgArticle ) {
143143 $oldid = $wgArticle->getOldID();
144144 if ( $oldid ) {
145145 $params['oldid'] = $oldid;
@@ -166,7 +166,7 @@
167167
168168 // Move the 'printable' link into our section for consistency
169169 $action = $wgRequest->getVal( 'action', 'view' );
170 - if( $action == 'view' || $action == 'purge' ) {
 170+ if ( $action == 'view' || $action == 'purge' ) {
171171 global $wgOut;
172172 if ( !$wgOut->isPrintable() ) {
173173 $attribs = array(
@@ -199,8 +199,8 @@
200200 global $wgRequest;
201201 global $wgTitle;
202202
203 - $action = $wgRequest->getVal('action');
204 - if( $action != '' && $action != 'view' && $action != 'purge' ) {
 203+ $action = $wgRequest->getVal( 'action' );
 204+ if ( $action != '' && $action != 'view' && $action != 'purge' ) {
205205 return true;
206206 }
207207
@@ -211,7 +211,7 @@
212212
213213 $myTitle = SpecialPage::getTitleFor( 'Book' );
214214 if ( $myTitle->equals( $wgTitle ) ) {
215 - $cmd = $wgRequest->getVal('bookcmd', '');
 215+ $cmd = $wgRequest->getVal( 'bookcmd', '' );
216216 if ( $cmd == 'suggest' ) {
217217 $siteNotice .= self::renderBookCreatorBox( 'suggest' );
218218 } else if ( $cmd == '' ) {
@@ -234,7 +234,7 @@
235235 return true;
236236 }
237237
238 - static function renderBookCreatorBox( $mode='' ) {
 238+ static function renderBookCreatorBox( $mode = '' ) {
239239 global $wgArticle;
240240 global $wgCollectionArticleNamespaces;
241241 global $wgCollectionStyleVersion;
@@ -258,7 +258,7 @@
259259 $oldid = $wgArticle->getOldID();
260260 if ( !$oldid || $oldid == $wgArticle->getLatest() ) {
261261 $oldid = 0;
262 - }
 262+ }
263263 }
264264
265265 $html = '';
@@ -275,9 +275,25 @@
276276 );
277277 }
278278
279 - $html .= Xml::element( 'script',
 279+ $html .= Xml::element( 'script',
280280 array(
281281 'type' => $wgJsMimeType,
 282+ 'src' => "$jsPath/jquery.json.js?$wgCollectionStyleVersion",
 283+ ),
 284+ '', false
 285+ );
 286+
 287+ $html .= Xml::element( 'script',
 288+ array(
 289+ 'type' => $wgJsMimeType,
 290+ 'src' => "$jsPath/jstorage.js?$wgCollectionStyleVersion",
 291+ ),
 292+ '', false
 293+ );
 294+
 295+ $html .= Xml::element( 'script',
 296+ array(
 297+ 'type' => $wgJsMimeType,
282298 'src' => "$jsPath/bookcreator.js?$wgCollectionStyleVersion",
283299 ),
284300 '', false
@@ -323,7 +339,7 @@
324340 array( 'style' => 'float: right' ),
325341 $sk->link(
326342 Title::newFromText( wfMsg( 'coll-helppage' ) ),
327 - Xml::element('img',
 343+ Xml::element( 'img',
328344 array(
329345 'src' => "$imagePath/silk-help.png",
330346 'alt' => '',
@@ -333,7 +349,7 @@
334350 )
335351 )
336352 . '&nbsp;' . wfMsgHtml( 'coll-help' ),
337 - array(
 353+ array(
338354 'rel' => 'nofollow',
339355 'title' => wfMsg( 'coll-help_tooltip' ),
340356 ),
@@ -371,7 +387,7 @@
372388 return $html;
373389 }
374390
375 - static function getBookCreatorBoxContent( $ajaxHint=null, $oldid=null ) {
 391+ static function getBookCreatorBoxContent( $ajaxHint = null, $oldid = null ) {
376392 global $wgUser;
377393 global $wgScriptPath;
378394
@@ -398,7 +414,7 @@
399415 $oldid = $wgArticle->getOldID();
400416 if ( !$oldid || $oldid == $wgArticle->getLatest() ) {
401417 $oldid = 0;
402 - }
 418+ }
403419 }
404420
405421 if ( $ajaxHint == 'suggest' || $ajaxHint == 'showbook' ) {
@@ -409,7 +425,7 @@
410426 'src' => "$imagePath/disabled.png",
411427 'alt' => '',
412428 'width' => '16',
413 - 'height'=> '16',
 429+ 'height' => '16',
414430 'style' => 'vertical-align: text-bottom',
415431 )
416432 )
@@ -426,7 +442,7 @@
427443 $onclick = "collectionCall('AddCategory', ['addcategory', wgTitle]); return false;";
428444 } else {
429445 if ( $ajaxHint == 'addarticle'
430 - || ($ajaxHint == '' && CollectionSession::findArticle( $ptext, $oldid ) == -1) ) {
 446+ || ( $ajaxHint == '' && CollectionSession::findArticle( $ptext, $oldid ) == - 1 ) ) {
431447 $id = 'coll-add_article';
432448 $icon = 'silk-add.png';
433449 $captionMsg = 'coll-add_this_page';
@@ -447,7 +463,7 @@
448464
449465 return $sk->link(
450466 SpecialPage::getTitleFor( 'Book' ),
451 - Xml::element('img',
 467+ Xml::element( 'img',
452468 array(
453469 'src' => "$imagePath/$icon",
454470 'alt' => '',
@@ -476,7 +492,7 @@
477493 array(
478494 'style' => 'margin-left: 10px;',
479495 ),
480 - Xml::element('img',
 496+ Xml::element( 'img',
481497 array(
482498 'src' => "$imagePath/silk-book_open.png",
483499 'alt' => '',
@@ -491,7 +507,7 @@
492508 } else {
493509 return $sk->link(
494510 SpecialPage::getTitleFor( 'Book' ),
495 - Xml::element('img',
 511+ Xml::element( 'img',
496512 array(
497513 'src' => "$imagePath/silk-book_open.png",
498514 'alt' => '',
@@ -523,7 +539,7 @@
524540 array(
525541 'style' => 'margin-left: 10px;',
526542 ),
527 - Xml::element('img',
 543+ Xml::element( 'img',
528544 array(
529545 'src' => "$imagePath/silk-wand.png",
530546 'alt' => '',
@@ -537,7 +553,7 @@
538554 } else {
539555 return $sk->link(
540556 SpecialPage::getTitleFor( 'Book' ),
541 - Xml::element('img',
 557+ Xml::element( 'img',
542558 array(
543559 'src' => "$imagePath/silk-wand.png",
544560 'alt' => '',
Index: branches/wmf/1.16wmf4/extensions/Collection/Collection.session.php
@@ -27,7 +27,7 @@
2828 }
2929
3030 static function startSession() {
31 - if( session_id() == '' ) {
 31+ if ( session_id() == '' ) {
3232 wfSetupSession();
3333 }
3434 self::clearCollection();
@@ -78,20 +78,20 @@
7979 }
8080 $count = 0;
8181 foreach ( $_SESSION['wsCollection']['items'] as $item ) {
82 - if ( $item['type'] == 'article') {
 82+ if ( $item['type'] == 'article' ) {
8383 $count++;
8484 }
8585 }
8686 return $count;
8787 }
8888
89 - static function findArticle( $title, $oldid=0 ) {
 89+ static function findArticle( $title, $oldid = 0 ) {
9090 if ( !self::hasSession() ) {
91 - return -1;
 91+ return - 1;
9292 }
9393
9494 foreach ( $_SESSION['wsCollection']['items'] as $index => $item ) {
95 - if ( $item['type'] == 'article' && $item['title'] == $title) {
 95+ if ( $item['type'] == 'article' && $item['title'] == $title ) {
9696 if ( $oldid ) {
9797 if ( $item['revision'] == strval( $oldid ) ) {
9898 return $index;
@@ -103,20 +103,22 @@
104104 }
105105 }
106106 }
107 - return -1;
 107+ return - 1;
108108 }
109109
110110 static function purge() {
111111 $coll = $_SESSION['wsCollection'];
112112 $newitems = array();
113 - foreach ( $coll['items'] as $index => $item ) {
114 - if ( $item['type'] == 'article' ) {
115 - $t = Title::newFromText( $item['title'] );
116 - if ( $t->exists() ) {
 113+ if ( isset( $coll['items'] ) ) {
 114+ foreach ( $coll['items'] as $index => $item ) {
 115+ if ( $item['type'] == 'article' ) {
 116+ $t = Title::newFromText( $item['title'] );
 117+ if ( $t->exists() ) {
 118+ $newitems[] = $item;
 119+ }
 120+ } else {
117121 $newitems[] = $item;
118122 }
119 - } else {
120 - $newitems[] = $item;
121123 }
122124 }
123125 $coll['items'] = $newitems;
@@ -128,7 +130,7 @@
129131 return $_SESSION['wsCollection'];
130132 }
131133
132 - static function setCollection($collection) {
 134+ static function setCollection( $collection ) {
133135 $_SESSION['wsCollection'] = $collection;
134136 self::touchSession();
135137 }
Index: branches/wmf/1.16wmf4/extensions/Collection/CollectionCore.i18n.php
@@ -349,6 +349,8 @@
350350 'coll-disable' => 'diweredekaat',
351351 'coll-book_creator_disable' => 'Diweredekaat ar saver levrioù',
352352 'coll-book_creator_disable_tooltip' => "Paouez d'ober gant ar saver levrioù",
 353+ 'coll-add_linked_article' => 'Ouzhpennañ ar bajenn wiki liammet gant ho levr',
 354+ 'coll-remove_linked_article' => "Tennañ ar bajenn wiki liammet d'ho levr",
353355 'coll-add_category' => "Ouzhpennañ ar rummad-mañ d'ho levr",
354356 'coll-add_category_tooltip' => "Ouzhpennañ an holl pajennoù wiki er rummad-mañ d'ho levr",
355357 'coll-add_this_page' => "Ouzhpennañ ar bajenn-mañ d'ho levr",
@@ -1382,6 +1384,7 @@
13831385 * @author Bennylin
13841386 * @author Irwangatot
13851387 * @author IvanLanin
 1388+ * @author Iwan Novirion
13861389 * @author Rex
13871390 */
13881391 $messages['id'] = array(
@@ -1394,6 +1397,8 @@
13951398 'coll-disable' => 'matikan',
13961399 'coll-book_creator_disable' => 'Pembuatan buku dinonaktifkan',
13971400 'coll-book_creator_disable_tooltip' => 'Berhenti menggunakan pembuatan buku',
 1401+ 'coll-add_linked_article' => 'Tambahkan pranala halaman wiki ke buku Anda',
 1402+ 'coll-remove_linked_article' => 'Hapus pranala halaman wiki dari buku Anda',
13981403 'coll-add_category' => 'Tambahkan kategori ini ke buku Anda',
13991404 'coll-add_category_tooltip' => 'Tambahkan semua halaman wiki pada kategori ini ke buku Anda',
14001405 'coll-add_this_page' => 'Tambahkan halaman ini ke buku Anda',
@@ -1449,6 +1454,7 @@
14501455 );
14511456
14521457 /** Italian (Italiano)
 1458+ * @author Beta16
14531459 * @author BrokenArrow
14541460 * @author Darth Kule
14551461 * @author Melos
@@ -1464,6 +1470,8 @@
14651471 'coll-disable' => 'disattiva',
14661472 'coll-book_creator_disable' => 'Disattiva il creatore di libri',
14671473 'coll-book_creator_disable_tooltip' => 'Smetti di usare il creatore di libri',
 1474+ 'coll-add_linked_article' => 'Aggiungi le pagine collegate a questa al tuo libro.',
 1475+ 'coll-remove_linked_article' => 'Rimuovi le pagine collegate a questa dal tuo libro.',
14681476 'coll-add_category' => 'Aggiungi questa categoria al tuo libro',
14691477 'coll-add_category_tooltip' => 'Aggiungi tutte le pagine wiki di questa categoria al tuo libro',
14701478 'coll-add_this_page' => 'Aggiungi questa pagina al tuo libro',
@@ -1479,7 +1487,7 @@
14801488 'coll-load_collection_tooltip' => 'Carica questo libro come libro corrente',
14811489 'coll-n_pages' => '$1 {{PLURAL:$1|pagina|pagine}}',
14821490 'coll-printable_version_pdf' => 'Versione PDF',
1483 - 'coll-remove_this_page' => 'Rimuovi questa pagina del tuo libro',
 1491+ 'coll-remove_this_page' => 'Rimuovi questa pagina dal tuo libro',
14841492 'coll-remove_page_tooltip' => 'Rimuovi la pagina wiki corrente dal tuo libro',
14851493 'coll-show_collection' => 'Mostra libro',
14861494 'coll-show_collection_tooltip' => 'Fai clic per modificare, scaricare o ordinare il tuo libro',
@@ -1506,6 +1514,7 @@
15071515 'coll-disable' => '無効化',
15081516 'coll-book_creator_disable' => 'ブッククリエーターを無効化',
15091517 'coll-book_creator_disable_tooltip' => 'ブッククリエーターを使うのを止める',
 1518+ 'coll-add_linked_article' => 'リンクされているウィキページをブックに追加する',
15101519 'coll-remove_linked_article' => 'あなたの本からウィキページのリンクを削除',
15111520 'coll-add_category' => 'このカテゴリを自分のブックに追加する',
15121521 'coll-add_category_tooltip' => 'このカテゴリ中のすべてのページをあなたのブックに追加する',
@@ -1610,6 +1619,13 @@
16111620 'coll-show_collection_tooltip' => 'ចុច​ដើម្បី​កែប្រែ​/ទាញ​យក​/បញ្ជា​ទិញ​សៀវភៅ​របស់​អ្នក​',
16121621 );
16131622
 1623+/** Kannada (ಕನ್ನಡ)
 1624+ * @author Nayvik
 1625+ */
 1626+$messages['kn'] = array(
 1627+ 'coll-help' => 'ಸಹಾಯ',
 1628+);
 1629+
16141630 /** Korean (한국어)
16151631 * @author Ilovesabbath
16161632 * @author Klutzy
@@ -1617,6 +1633,7 @@
16181634 * @author Yknok29
16191635 */
16201636 $messages['ko'] = array(
 1637+ 'coll-print_export' => '인쇄/내보내기',
16211638 'coll-create_a_book' => '책 만들기',
16221639 'coll-download_as' => '$1로 다운로드',
16231640 'coll-add_category' => '이 분류를 책에 추가하기',
@@ -1646,7 +1663,7 @@
16471664 'coll-create_a_book' => 'Mek buk',
16481665 );
16491666
1650 -/** Ripoarisch (Ripoarisch)
 1667+/** Colognian (Ripoarisch)
16511668 * @author Purodha
16521669 */
16531670 $messages['ksh'] = array(
@@ -1813,7 +1830,7 @@
18141831 'coll-book_creator_disable_tooltip' => 'പുസ്തക സൃഷ്ടി ഉപകരണം ഉപയോഗിക്കുന്നതു നിർത്തുക',
18151832 'coll-add_linked_article' => 'താങ്കളുടെ പുസ്തകത്തിൽ കണ്ണിയുള്ള വിക്കിതാൾ കൂട്ടിച്ചേർക്കുക',
18161833 'coll-remove_linked_article' => 'താങ്കളുടെ പുസ്തകത്തിൽനിന്നും കണ്ണിചേർക്കപ്പെട്ട വിക്കിതാൾ നീക്കംചെയ്യുക',
1817 - 'coll-add_category' => 'താങ്കളുടെ പുസ്തകത്തിൽ ഈ വര്‍ഗ്ഗം ചേര്‍ക്കുക',
 1834+ 'coll-add_category' => 'താങ്കളുടെ പുസ്തകത്തിൽ ഈ വർഗ്ഗം ചേർക്കുക',
18181835 'coll-add_category_tooltip' => 'ഈ വർഗ്ഗത്തിലുള്ള എല്ലാ വിക്കി താളുകളും താങ്കളുടെ പുസ്തകത്തിലേയ്ക്ക് കൂട്ടിച്ചേർക്കുക',
18191836 'coll-add_this_page' => 'ഈ താൾ താങ്കളുടെ പുസ്തകത്തിലേയ്ക്ക് കൂട്ടിച്ചേർക്കുക',
18201837 'coll-add_page_tooltip' => 'ഇപ്പോഴത്തെ താൾ താങ്കളുടെ പുസ്തകത്തിലേയ്ക്ക് ചേർക്കുക',
@@ -1894,7 +1911,9 @@
18951912 * @author Botuzhaleny-sodamo
18961913 */
18971914 $messages['myv'] = array(
1898 - 'coll-add_category' => 'Поладомс категория',
 1915+ 'coll-create_a_book' => 'Шкамс кинига',
 1916+ 'coll-book_creator' => 'Кинигань шкиця',
 1917+ 'coll-add_category' => 'Поладомс кинигазот те категориянть',
18991918 'coll-bookscategory' => 'Кинигат',
19001919 'coll-helppage' => 'Help:Кинигат',
19011920 );
@@ -2075,6 +2094,8 @@
20762095 'coll-disable' => 'desactivar',
20772096 'coll-book_creator_disable' => 'Desactivar lo creator de libre',
20782097 'coll-book_creator_disable_tooltip' => "Quitar d'utilizar lo creator de libre",
 2098+ 'coll-add_linked_article' => 'Apondre la pagina wiki ligada a vòstre libre',
 2099+ 'coll-remove_linked_article' => 'Levar la pagina ligada de vòstre libre',
20792100 'coll-add_category' => 'Apondre una categoria a vòstre libre',
20802101 'coll-add_category_tooltip' => "Apondre totes los articles d'aquesta categoria a vòstre libre",
20812102 'coll-add_this_page' => 'Apondre aquesta pagina a vòstre libre',
@@ -2929,6 +2950,8 @@
29302951 'coll-disable' => 'tắt',
29312952 'coll-book_creator_disable' => 'Tắt bộ tạo sách',
29322953 'coll-book_creator_disable_tooltip' => 'Ngừng sử dụng bộ tạo sách',
 2954+ 'coll-add_linked_article' => 'Thêm trang wiki được liên kết vào quyển sách',
 2955+ 'coll-remove_linked_article' => 'Bỏ trang wiki được liên kết khỏi quyển sách',
29332956 'coll-add_category' => 'Thêm thể loại này vào cuốn sách',
29342957 'coll-add_category_tooltip' => 'Thêm vào sách các trang wiki thuộc thể loại được liên kết',
29352958 'coll-add_this_page' => 'Thêm trang này vào cuốn sách',
@@ -2979,7 +3002,39 @@
29803003 'coll-help' => 'הילף',
29813004 );
29823005
2983 -/** Yue (粵語) */
 3006+/** Yoruba (Yorùbá)
 3007+ * @author Demmy
 3008+ */
 3009+$messages['yo'] = array(
 3010+ 'coll-print_export' => 'Ìtẹ́síìwé/ìkójáde',
 3011+ 'coll-create_a_book' => 'Dá ìwé',
 3012+ 'coll-create_a_book_tooltip' => 'Dá ìwé tàbí ìkójọ ojúewé',
 3013+ 'coll-book_creator' => 'Olùdá ìwé',
 3014+ 'coll-download_as' => 'Rùsílẹ̀ gẹ́gẹ́ bíi $1',
 3015+ 'coll-download_as_tooltip' => 'Rùsílẹ̀ àtẹ́jáde $1 ojúewé wiki yìí',
 3016+ 'coll-disable' => 'ìdálẹ́kun',
 3017+ 'coll-book_creator_disable' => 'Ìdálẹ́kun olùdá ìwé',
 3018+ 'coll-book_creator_disable_tooltip' => 'Jáwọ́ lílo olùdá ìwé',
 3019+ 'coll-add_linked_article' => 'Ṣàfikún ojúewé wiki jíjápọ̀ mọ́ ìwé yín',
 3020+ 'coll-add_category' => 'Ṣàfikún ẹ̀ka yìí mọ́ ìwé yín',
 3021+ 'coll-add_this_page' => 'Ṣàfikún ojúewé yìí mọ́ ìwé yín',
 3022+ 'coll-bookscategory' => 'Àwọn ìwé',
 3023+ 'coll-help' => 'Ìrànwọ́',
 3024+ 'coll-help_tooltip' => 'Àfihàn ìránwọ́ nípa dídá àwọn ìwé',
 3025+ 'coll-helppage' => 'Help:Àwọn ìwé',
 3026+ 'coll-load_collection' => 'Gbé ìwé síta',
 3027+ 'coll-load_collection_tooltip' => 'Gbé ìwé yìí síta bíi ìwé yín lọ́wọ́lọ́wọ́',
 3028+ 'coll-n_pages' => '{{PLURAL:$1|ojúewé|àwọn ojúewé}} $1',
 3029+ 'coll-printable_version_pdf' => 'Àtẹ̀jáde PDF',
 3030+ 'coll-remove_this_page' => 'Ẹ yọ ojúewé yìí kúrò nínú ìwé yín',
 3031+ 'coll-remove_page_tooltip' => 'Ẹ yọ ojúewé wiki lọ́wọ́lọ́wó yìí kúrò nínú ìwé yín',
 3032+ 'coll-show_collection' => 'Àfihàn ìwé',
 3033+ 'coll-not_addable' => 'Ojúewé yìí kò ṣe é ṣàfikún',
 3034+ 'coll-make_suggestions' => 'Ìdámọ́ràn ojúewé',
 3035+ 'coll-make_suggestions_tooltip' => 'Àfihàn àwọn ìdámọ̀ràn nípa àwọn ojúewé inú ìwé yín',
 3036+);
 3037+
 3038+/** Cantonese (粵語) */
29843039 $messages['yue'] = array(
29853040 'coll-create_a_book' => '整一本書',
29863041 'coll-download_as' => '下載做$1',
Index: branches/wmf/1.16wmf4/extensions/Collection/js/json2.js
@@ -1,273 +0,0 @@
2 -/*
3 - json2.js
4 - 2008-01-17
5 -
6 - Public Domain
7 -
8 - No warranty expressed or implied. Use at your own risk.
9 -
10 - See http://www.JSON.org/js.html
11 -
12 - This file creates a global JSON object containing two methods:
13 -
14 - JSON.stringify(value, whitelist)
15 - value any JavaScript value, usually an object or array.
16 -
17 - whitelist an optional array prameter that determines how object
18 - values are stringified.
19 -
20 - This method produces a JSON text from a JavaScript value.
21 - There are three possible ways to stringify an object, depending
22 - on the optional whitelist parameter.
23 -
24 - If an object has a toJSON method, then the toJSON() method will be
25 - called. The value returned from the toJSON method will be
26 - stringified.
27 -
28 - Otherwise, if the optional whitelist parameter is an array, then
29 - the elements of the array will be used to select members of the
30 - object for stringification.
31 -
32 - Otherwise, if there is no whitelist parameter, then all of the
33 - members of the object will be stringified.
34 -
35 - Values that do not have JSON representaions, such as undefined or
36 - functions, will not be serialized. Such values in objects will be
37 - dropped; in arrays will be replaced with null.
38 - JSON.stringify(undefined) returns undefined. Dates will be
39 - stringified as quoted ISO dates.
40 -
41 - Example:
42 -
43 - var text = JSON.stringify(['e', {pluribus: 'unum'}]);
44 - // text is '["e",{"pluribus":"unum"}]'
45 -
46 - JSON.parse(text, filter)
47 - This method parses a JSON text to produce an object or
48 - array. It can throw a SyntaxError exception.
49 -
50 - The optional filter parameter is a function that can filter and
51 - transform the results. It receives each of the keys and values, and
52 - its return value is used instead of the original value. If it
53 - returns what it received, then structure is not modified. If it
54 - returns undefined then the member is deleted.
55 -
56 - Example:
57 -
58 - // Parse the text. If a key contains the string 'date' then
59 - // convert the value to a date.
60 -
61 - myData = JSON.parse(text, function (key, value) {
62 - return key.indexOf('date') >= 0 ? new Date(value) : value;
63 - });
64 -
65 - This is a reference implementation. You are free to copy, modify, or
66 - redistribute.
67 -
68 - Use your own copy. It is extremely unwise to load third party
69 - code into your pages.
70 -*/
71 -
72 -/*jslint evil: true */
73 -
74 -/*global JSON */
75 -
76 -/*members "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
77 - charCodeAt, floor, getUTCDate, getUTCFullYear, getUTCHours,
78 - getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, length,
79 - parse, propertyIsEnumerable, prototype, push, replace, stringify, test,
80 - toJSON, toString
81 -*/
82 -
83 -if (!this.JSON) {
84 -
85 - JSON = function () {
86 -
87 - function f(n) { // Format integers to have at least two digits.
88 - return n < 10 ? '0' + n : n;
89 - }
90 -
91 - Date.prototype.toJSON = function () {
92 -
93 -// Eventually, this method will be based on the date.toISOString method.
94 -
95 - return this.getUTCFullYear() + '-' +
96 - f(this.getUTCMonth() + 1) + '-' +
97 - f(this.getUTCDate()) + 'T' +
98 - f(this.getUTCHours()) + ':' +
99 - f(this.getUTCMinutes()) + ':' +
100 - f(this.getUTCSeconds()) + 'Z';
101 - };
102 -
103 -
104 - var m = { // table of character substitutions
105 - '\b': '\\b',
106 - '\t': '\\t',
107 - '\n': '\\n',
108 - '\f': '\\f',
109 - '\r': '\\r',
110 - '"' : '\\"',
111 - '\\': '\\\\'
112 - };
113 -
114 - function stringify(value, whitelist) {
115 - var a, // The array holding the partial texts.
116 - i, // The loop counter.
117 - k, // The member key.
118 - l, // Length.
119 - r = /["\\\x00-\x1f\x7f-\x9f]/g,
120 - v; // The member value.
121 -
122 - switch (typeof value) {
123 - case 'string':
124 -
125 -// If the string contains no control characters, no quote characters, and no
126 -// backslash characters, then we can safely slap some quotes around it.
127 -// Otherwise we must also replace the offending characters with safe sequences.
128 -
129 - return r.test(value) ?
130 - '"' + value.replace(r, function (a) {
131 - var c = m[a];
132 - if (c) {
133 - return c;
134 - }
135 - c = a.charCodeAt();
136 - return '\\u00' + Math.floor(c / 16).toString(16) +
137 - (c % 16).toString(16);
138 - }) + '"' :
139 - '"' + value + '"';
140 -
141 - case 'number':
142 -
143 -// JSON numbers must be finite. Encode non-finite numbers as null.
144 -
145 - return isFinite(value) ? String(value) : 'null';
146 -
147 - case 'boolean':
148 - case 'null':
149 - return String(value);
150 -
151 - case 'object':
152 -
153 -// Due to a specification blunder in ECMAScript,
154 -// typeof null is 'object', so watch out for that case.
155 -
156 - if (!value) {
157 - return 'null';
158 - }
159 -
160 -// If the object has a toJSON method, call it, and stringify the result.
161 -
162 - if (typeof value.toJSON === 'function') {
163 - return stringify(value.toJSON());
164 - }
165 - a = [];
166 - if (typeof value.length === 'number' &&
167 - !(value.propertyIsEnumerable('length'))) {
168 -
169 -// The object is an array. Stringify every element. Use null as a placeholder
170 -// for non-JSON values.
171 -
172 - l = value.length;
173 - for (i = 0; i < l; i += 1) {
174 - a.push(stringify(value[i], whitelist) || 'null');
175 - }
176 -
177 -// Join all of the elements together and wrap them in brackets.
178 -
179 - return '[' + a.join(',') + ']';
180 - }
181 - if (whitelist) {
182 -
183 -// If a whitelist (array of keys) is provided, use it to select the components
184 -// of the object.
185 -
186 - l = whitelist.length;
187 - for (i = 0; i < l; i += 1) {
188 - k = whitelist[i];
189 - if (typeof k === 'string') {
190 - v = stringify(value[k], whitelist);
191 - if (v) {
192 - a.push(stringify(k) + ':' + v);
193 - }
194 - }
195 - }
196 - } else {
197 -
198 -// Otherwise, iterate through all of the keys in the object.
199 -
200 - for (k in value) {
201 - if (typeof k === 'string') {
202 - v = stringify(value[k], whitelist);
203 - if (v) {
204 - a.push(stringify(k) + ':' + v);
205 - }
206 - }
207 - }
208 - }
209 -
210 -// Join all of the member texts together and wrap them in braces.
211 -
212 - return '{' + a.join(',') + '}';
213 - }
214 - }
215 -
216 - return {
217 - stringify: stringify,
218 - parse: function (text, filter) {
219 - var j;
220 -
221 - function walk(k, v) {
222 - var i, n;
223 - if (v && typeof v === 'object') {
224 - for (i in v) {
225 - if (Object.prototype.hasOwnProperty.apply(v, [i])) {
226 - n = walk(i, v[i]);
227 - if (n !== undefined) {
228 - v[i] = n;
229 - }
230 - }
231 - }
232 - }
233 - return filter(k, v);
234 - }
235 -
236 -
237 -// Parsing happens in three stages. In the first stage, we run the text against
238 -// regular expressions that look for non-JSON patterns. We are especially
239 -// concerned with '()' and 'new' because they can cause invocation, and '='
240 -// because it can cause mutation. But just to be safe, we want to reject all
241 -// unexpected forms.
242 -
243 -// We split the first stage into 4 regexp operations in order to work around
244 -// crippling inefficiencies in IE's and Safari's regexp engines. First we
245 -// replace all backslash pairs with '@' (a non-JSON character). Second, we
246 -// replace all simple value tokens with ']' characters. Third, we delete all
247 -// open brackets that follow a colon or comma or that begin the text. Finally,
248 -// we look to see that the remaining characters are only whitespace or ']' or
249 -// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
250 -
251 - if (/^[\],:{}\s]*$/.test(text.replace(/\\./g, '@').
252 -replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
253 -replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
254 -
255 -// In the second stage we use the eval function to compile the text into a
256 -// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
257 -// in JavaScript: it can begin a block or an object literal. We wrap the text
258 -// in parens to eliminate the ambiguity.
259 -
260 - j = eval('(' + text + ')');
261 -
262 -// In the optional third stage, we recursively walk the new structure, passing
263 -// each name/value pair to a filter function for possible transformation.
264 -
265 - return typeof filter === 'function' ? walk('', j) : j;
266 - }
267 -
268 -// If the text is not JSON parseable, then a SyntaxError is thrown.
269 -
270 - throw new SyntaxError('parseJSON');
271 - }
272 - };
273 - }();
274 -}
Index: branches/wmf/1.16wmf4/extensions/Collection/js/jquery.json.js
@@ -0,0 +1,178 @@
 2+/*
 3+ * jQuery JSON Plugin
 4+ * version: 2.1 (2009-08-14)
 5+ *
 6+ * This document is licensed as free software under the terms of the
 7+ * MIT License: http://www.opensource.org/licenses/mit-license.php
 8+ *
 9+ * Brantley Harris wrote this plugin. It is based somewhat on the JSON.org
 10+ * website's http://www.json.org/json2.js, which proclaims:
 11+ * "NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.", a sentiment that
 12+ * I uphold.
 13+ *
 14+ * It is also influenced heavily by MochiKit's serializeJSON, which is
 15+ * copyrighted 2005 by Bob Ippolito.
 16+ */
 17+
 18+(function($) {
 19+ /** jQuery.toJSON( json-serializble )
 20+ Converts the given argument into a JSON respresentation.
 21+
 22+ If an object has a "toJSON" function, that will be used to get the representation.
 23+ Non-integer/string keys are skipped in the object, as are keys that point to a function.
 24+
 25+ json-serializble:
 26+ The *thing* to be converted.
 27+ **/
 28+ $.toJSON = function(o)
 29+ {
 30+ if (typeof(JSON) == 'object' && JSON.stringify)
 31+ return JSON.stringify(o);
 32+
 33+ var type = typeof(o);
 34+
 35+ if (o === null)
 36+ return "null";
 37+
 38+ if (type == "undefined")
 39+ return undefined;
 40+
 41+ if (type == "number" || type == "boolean")
 42+ return o + "";
 43+
 44+ if (type == "string")
 45+ return $.quoteString(o);
 46+
 47+ if (type == 'object')
 48+ {
 49+ if (typeof o.toJSON == "function")
 50+ return $.toJSON( o.toJSON() );
 51+
 52+ if (o.constructor === Date)
 53+ {
 54+ var month = o.getUTCMonth() + 1;
 55+ if (month < 10) month = '0' + month;
 56+
 57+ var day = o.getUTCDate();
 58+ if (day < 10) day = '0' + day;
 59+
 60+ var year = o.getUTCFullYear();
 61+
 62+ var hours = o.getUTCHours();
 63+ if (hours < 10) hours = '0' + hours;
 64+
 65+ var minutes = o.getUTCMinutes();
 66+ if (minutes < 10) minutes = '0' + minutes;
 67+
 68+ var seconds = o.getUTCSeconds();
 69+ if (seconds < 10) seconds = '0' + seconds;
 70+
 71+ var milli = o.getUTCMilliseconds();
 72+ if (milli < 100) milli = '0' + milli;
 73+ if (milli < 10) milli = '0' + milli;
 74+
 75+ return '"' + year + '-' + month + '-' + day + 'T' +
 76+ hours + ':' + minutes + ':' + seconds +
 77+ '.' + milli + 'Z"';
 78+ }
 79+
 80+ if (o.constructor === Array)
 81+ {
 82+ var ret = [];
 83+ for (var i = 0; i < o.length; i++)
 84+ ret.push( $.toJSON(o[i]) || "null" );
 85+
 86+ return "[" + ret.join(",") + "]";
 87+ }
 88+
 89+ var pairs = [];
 90+ for (var k in o) {
 91+ var name;
 92+ var type = typeof k;
 93+
 94+ if (type == "number")
 95+ name = '"' + k + '"';
 96+ else if (type == "string")
 97+ name = $.quoteString(k);
 98+ else
 99+ continue; //skip non-string or number keys
 100+
 101+ if (typeof o[k] == "function")
 102+ continue; //skip pairs where the value is a function.
 103+
 104+ var val = $.toJSON(o[k]);
 105+
 106+ pairs.push(name + ":" + val);
 107+ }
 108+
 109+ return "{" + pairs.join(", ") + "}";
 110+ }
 111+ };
 112+
 113+ /** jQuery.evalJSON(src)
 114+ Evaluates a given piece of json source.
 115+ **/
 116+ $.evalJSON = function(src)
 117+ {
 118+ if (typeof(JSON) == 'object' && JSON.parse)
 119+ return JSON.parse(src);
 120+ return eval("(" + src + ")");
 121+ };
 122+
 123+ /** jQuery.secureEvalJSON(src)
 124+ Evals JSON in a way that is *more* secure.
 125+ **/
 126+ $.secureEvalJSON = function(src)
 127+ {
 128+ if (typeof(JSON) == 'object' && JSON.parse)
 129+ return JSON.parse(src);
 130+
 131+ var filtered = src;
 132+ filtered = filtered.replace(/\\["\\\/bfnrtu]/g, '@');
 133+ filtered = filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']');
 134+ filtered = filtered.replace(/(?:^|:|,)(?:\s*\[)+/g, '');
 135+
 136+ if (/^[\],:{}\s]*$/.test(filtered))
 137+ return eval("(" + src + ")");
 138+ else
 139+ throw new SyntaxError("Error parsing JSON, source is not valid.");
 140+ };
 141+
 142+ /** jQuery.quoteString(string)
 143+ Returns a string-repr of a string, escaping quotes intelligently.
 144+ Mostly a support function for toJSON.
 145+
 146+ Examples:
 147+ >>> jQuery.quoteString("apple")
 148+ "apple"
 149+
 150+ >>> jQuery.quoteString('"Where are we going?", she asked.')
 151+ "\"Where are we going?\", she asked."
 152+ **/
 153+ $.quoteString = function(string)
 154+ {
 155+ if (string.match(_escapeable))
 156+ {
 157+ return '"' + string.replace(_escapeable, function (a)
 158+ {
 159+ var c = _meta[a];
 160+ if (typeof c === 'string') return c;
 161+ c = a.charCodeAt();
 162+ return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
 163+ }) + '"';
 164+ }
 165+ return '"' + string + '"';
 166+ };
 167+
 168+ var _escapeable = /["\\\x00-\x1f\x7f-\x9f]/g;
 169+
 170+ var _meta = {
 171+ '\b': '\\b',
 172+ '\t': '\\t',
 173+ '\n': '\\n',
 174+ '\f': '\\f',
 175+ '\r': '\\r',
 176+ '"' : '\\"',
 177+ '\\': '\\\\'
 178+ };
 179+})(jQuery);
Property changes on: branches/wmf/1.16wmf4/extensions/Collection/js/jquery.json.js
___________________________________________________________________
Name: svn:eol-style
1180 + native
Index: branches/wmf/1.16wmf4/extensions/Collection/js/bookcreator.js
@@ -21,23 +21,38 @@
2222
2323 (function($) {
2424
 25+var script_url = wgServer + ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript);
 26+
 27+function save_collection(collection) {
 28+ $.jStorage.set('collection', collection);
 29+}
 30+
 31+window.wfCollectionSave = save_collection;
 32+
2533 function refreshBookCreatorBox(hint, oldid) {
26 - sajax_request_type = 'GET';
27 - sajax_do_call('wfAjaxCollectionGetBookCreatorBoxContent', [hint, oldid], function(xhr) {
28 - $('#coll-book_creator_box').html(xhr.responseText);
29 - });
 34+ $.getJSON(script_url, {
 35+ 'action': 'ajax',
 36+ 'rs': 'wfAjaxCollectionGetBookCreatorBoxContent',
 37+ 'rsargs[]': [hint, oldid]
 38+ }, function(result) {
 39+ $('#coll-book_creator_box').html(result.html);
 40+ });
3041 }
3142
3243 function collectionCall(func, args) {
3344 var hint = args.shift();
34 - sajax_request_type = 'POST';
35 - sajax_do_call('wfAjaxCollection' + func, args, function() {
 45+ $.post(script_url, {
 46+ 'action': 'ajax',
 47+ 'rs': 'wfAjaxCollection' + func,
 48+ 'rsargs[]': args
 49+ }, function(result) {
3650 var oldid = null;
3751 if (args.length == 3) {
3852 oldid = args[2];
3953 }
4054 refreshBookCreatorBox(hint, oldid);
41 - });
 55+ save_collection(result.collection);
 56+ }, 'json');
4257 }
4358
4459 window.collectionCall = collectionCall; // public
@@ -49,7 +64,6 @@
5065 var visible = false;
5166 var show_soon_timeout = null;
5267 var get_data_xhr = null;
53 -var script_url = wgServer + ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript);
5468 var current_link = null;
5569 var title = null;
5670
@@ -66,10 +80,11 @@
6781 'action': 'ajax',
6882 'rs': 'wfAjaxCollection' + action.charAt(0).toUpperCase() + action.slice(1) + 'Article',
6983 'rsargs[]': [0, title, '']
70 - }, function() {
 84+ }, function(result) {
7185 hide();
7286 refreshBookCreatorBox(null, null);
73 - });
 87+ save_collection(result.collection);
 88+ }, 'json');
7489 }
7590
7691 function show(link) {
Index: branches/wmf/1.16wmf4/extensions/Collection/js/collection.js
@@ -19,10 +19,8 @@
2020 * http://www.gnu.org/copyleft/gpl.html
2121 */
2222
23 -(function() {
 23+(function($) {
2424
25 -var jQuery = collection_jQuery;
26 -
2725 /******************************************************************************/
2826
2927 var requiredVersion = '1.4';
@@ -45,20 +43,28 @@
4644 return txt;
4745 }
4846
 47+function req(func, args, callback) {
 48+ $.post(script_url, {
 49+ 'action': 'ajax',
 50+ 'rs': 'wfAjaxCollection' + func,
 51+ 'rsargs[]': args
 52+ }, callback, 'json');
 53+}
 54+
4955 var script_url = wgServer +
5056 ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript);
5157
5258 /******************************************************************************/
5359
5460 function getMWServeStatus() {
55 - jQuery.getJSON(script_url, {
 61+ $.getJSON(script_url, {
5662 'action': 'ajax',
5763 'rs': 'wfAjaxGetMWServeStatus',
5864 'rsargs[]': [collection_id, writer]
5965 }, function(result) {
6066 if (result.state == 'progress' ) {
6167 if ( result.status.progress ) {
62 - jQuery('#renderingProgress').html('' + result.status.progress);
 68+ $('#renderingProgress').html('' + result.status.progress);
6369 }
6470 if (result.status.status) {
6571 var status = result.status.status;
@@ -67,7 +73,7 @@
6874 } else if (result.status.page) {
6975 status += gettext('#renderingPage', result.status.page);
7076 }
71 - jQuery('#renderingStatus').html(gettext('#renderingStatusText', status));
 77+ $('#renderingStatus').html(gettext('#renderingStatusText', status));
7278 }
7379 setTimeout(getMWServeStatus, 500);
7480 } else {
@@ -80,13 +86,12 @@
8187
8288 function clear_collection() {
8389 if (confirm(gettext('#clearCollectionConfirmText'))) {
84 - sajax_request_type = "POST";
85 - sajax_do_call('wfAjaxCollectionClear',
 90+ req('Clear',
8691 [],
87 - function(xhr) {
88 - refresh_list(xhr);
89 - sajax_do_call('wfAjaxCollectionGetBookCreatorBoxContent', ['showbook', null], function(xhr2) {
90 - jQuery('#coll-book_creator_box').html(xhr2.responseText);
 92+ function(result) {
 93+ refresh_list(result);
 94+ req('GetBookCreatorBoxContent', ['showbook', null], function(result2) {
 95+ $('#coll-book_creator_box').html(result2.html);
9196 });
9297 });
9398 }
@@ -96,10 +101,7 @@
97102 function create_chapter() {
98103 var name = prompt(gettext('#newChapterText'));
99104 if (name) {
100 - sajax_request_type = "POST";
101 - sajax_do_call('wfAjaxCollectionAddChapter',
102 - [name],
103 - refresh_list);
 105+ req('AddChapter', [name], refresh_list);
104106 }
105107 return false;
106108 }
@@ -107,109 +109,105 @@
108110 function rename_chapter(index, old_name) {
109111 var new_name = prompt(gettext('#renameChapterText'), old_name);
110112 if (new_name) {
111 - sajax_request_type = "POST";
112 - sajax_do_call('wfAjaxCollectionRenameChapter',
113 - [index, new_name],
114 - refresh_list);
 113+ req('RenameChapter', [index, new_name], refresh_list);
115114 }
116115 return false;
117116 }
118117
119118 function remove_item(index) {
120 - sajax_request_type = "POST";
121 - sajax_do_call('wfAjaxCollectionRemoveItem',
 119+ req('RemoveItem',
122120 [index],
123 - function(xhr) {
124 - refresh_list(xhr);
125 - sajax_do_call('wfAjaxCollectionGetBookCreatorBoxContent', ['showbook', null], function(xhr2) {
126 - jQuery('#coll-book_creator_box').html(xhr2.responseText);
 121+ function(result) {
 122+ refresh_list(result);
 123+ req('GetBookCreatorBoxContent', ['showbook', null], function(result2) {
 124+ $('#coll-book_creator_box').html(result2.html);
127125 });
128126 });
129127 return false;
130128 }
131129
132130 function set_titles() {
133 - sajax_request_type = "POST";
134 - sajax_do_call('wfAjaxCollectionSetTitles',
135 - [jQuery('#titleInput').val(), jQuery('#subtitleInput').val()], function() {});
 131+ req('SetTitles', [$('#titleInput').val(), $('#subtitleInput').val()], function(result) {
 132+ wfCollectionSave(result.collection);
 133+ });
136134 return false;
137135 }
138136
139137 function set_sorting(items_string) {
140 - sajax_request_type = "POST";
141 - sajax_do_call('wfAjaxCollectionSetSorting', [items_string], refresh_list);
 138+ req('SetSorting', [items_string], refresh_list);
142139 return false;
143140 }
144141
145142 function update_save_button() {
146 - if (!jQuery('#saveButton').length) {
 143+ if (!$('#saveButton').length) {
147144 return;
148145 }
149 - if (jQuery('#collectionList .article').length == 0) {
150 - jQuery('#saveButton').attr('disabled', 'disabled');
 146+ if ($('#collectionList .article').length == 0) {
 147+ $('#saveButton').attr('disabled', 'disabled');
151148 return;
152149 }
153 - if (!jQuery('#communityCollTitle').length || jQuery('#personalCollType:checked').val()) {
154 - jQuery('#personalCollTitle').attr('disabled', '');
155 - jQuery('#communityCollTitle').attr('disabled', 'disabled');
156 - if (!jQuery.trim(jQuery('#personalCollTitle').val())) {
157 - jQuery('#saveButton').attr('disabled', 'disabled');
 150+ if (!$('#communityCollTitle').length || $('#personalCollType:checked').val()) {
 151+ $('#personalCollTitle').attr('disabled', '');
 152+ $('#communityCollTitle').attr('disabled', 'disabled');
 153+ if (!$.trim($('#personalCollTitle').val())) {
 154+ $('#saveButton').attr('disabled', 'disabled');
158155 return;
159156 }
160 - } else if (!jQuery('#personalCollTitle').length || jQuery('#communityCollType:checked').val()) {
161 - jQuery('#communityCollTitle').attr('disabled', '');
162 - jQuery('#personalCollTitle').attr('disabled', 'disabled');
163 - if (!jQuery.trim(jQuery('#communityCollTitle').val())) {
164 - jQuery('#saveButton').attr('disabled', 'disabled');
 157+ } else if (!$('#personalCollTitle').length || $('#communityCollType:checked').val()) {
 158+ $('#communityCollTitle').attr('disabled', '');
 159+ $('#personalCollTitle').attr('disabled', 'disabled');
 160+ if (!$.trim($('#communityCollTitle').val())) {
 161+ $('#saveButton').attr('disabled', 'disabled');
165162 return;
166163 }
167164 }
168 - jQuery('#saveButton').attr('disabled', '');
 165+ $('#saveButton').attr('disabled', '');
169166 }
170167
171168 function make_sortable() {
172 - jQuery('#collectionList').sortable({
 169+ $('#collectionList').sortable({
173170 axis: 'y',
174171 update: function(evt, ui) {
175 - set_sorting(jQuery('#collectionList').sortable('serialize'));
 172+ set_sorting($('#collectionList').sortable('serialize'));
176173 }
177174 });
178 - jQuery('#collectionList .sortableitem').css('cursor', 'move');
 175+ $('#collectionList .sortableitem').css('cursor', 'move');
179176 }
180177
181 -function refresh_list(xhr) {
182 - jQuery('#collectionListContainer').html(xhr.responseText);
183 - jQuery('.makeVisible').css('display', 'inline');
 178+function refresh_list(data) {
 179+ wfCollectionSave(data.collection);
 180+ $('#collectionListContainer').html(data.html);
 181+ $('.makeVisible').css('display', 'inline');
184182 make_sortable();
185 - if (jQuery('#collectionList .article').length == 0) {
186 - jQuery('#downloadButton').attr('disabled', 'disabled');
187 - jQuery('input.order').attr('disabled', 'disabled');
 183+ if ($('#collectionList .article').length == 0) {
 184+ $('#downloadButton').attr('disabled', 'disabled');
 185+ $('input.order').attr('disabled', 'disabled');
188186 } else {
189 - jQuery('#downloadButton').attr('disabled', '');
190 - jQuery('input.order').attr('disabled', '');
 187+ $('#downloadButton').attr('disabled', '');
 188+ $('input.order').attr('disabled', '');
191189 }
192190 update_save_button();
193191 }
194192
195193 function toggle_order_info(flag) {
196194 if (flag) {
197 - jQuery('#coll-more_info').css('display', 'none');
198 - jQuery('#coll-order_info').css('display', 'block');
199 - jQuery('#coll-hide_info').css('display', 'block');
 195+ $('#coll-more_info').css('display', 'none');
 196+ $('#coll-order_info').css('display', 'block');
 197+ $('#coll-hide_info').css('display', 'block');
200198 } else {
201 - jQuery('#coll-more_info').css('display', 'block');
202 - jQuery('#coll-order_info').css('display', 'none');
203 - jQuery('#coll-hide_info').css('display', 'none');
 199+ $('#coll-more_info').css('display', 'block');
 200+ $('#coll-order_info').css('display', 'none');
 201+ $('#coll-hide_info').css('display', 'none');
204202 }
205203 }
206204
207 -jQuery(function() {
 205+$(function() {
208206 if (requiredVersion != wgCollectionVersion) {
209207 alert('ERROR: Version mismatch between Javascript and PHP code. Contact admin to fix the installation of Collection extension for MediaWiki.');
210208 return;
211209 }
212 - if (jQuery('#collectionList').length) {
213 - jQuery('.makeVisible').css('display', 'inline');
 210+ if ($('#collectionList').length) {
 211+ $('.makeVisible').css('display', 'inline');
214212 window.coll_create_chapter = create_chapter;
215213 window.coll_remove_item = remove_item;
216214 window.coll_rename_chapter = rename_chapter;
@@ -218,18 +216,18 @@
219217 toggle_order_info(false);
220218 update_save_button();
221219 make_sortable();
222 - jQuery('#personalCollTitle').keyup(update_save_button);
223 - jQuery('#personalCollTitle').change(update_save_button);
224 - jQuery('#communityCollTitle').keyup(update_save_button);
225 - jQuery('#communityCollTitle').change(update_save_button);
226 - jQuery('#personalCollType').change(update_save_button);
227 - jQuery('#communityCollType').change(update_save_button);
228 - jQuery('#titleInput').change(set_titles);
229 - jQuery('#subtitleInput').change(set_titles);
 220+ $('#personalCollTitle').keyup(update_save_button);
 221+ $('#personalCollTitle').change(update_save_button);
 222+ $('#communityCollTitle').keyup(update_save_button);
 223+ $('#communityCollTitle').change(update_save_button);
 224+ $('#personalCollType').change(update_save_button);
 225+ $('#communityCollType').change(update_save_button);
 226+ $('#titleInput').change(set_titles);
 227+ $('#subtitleInput').change(set_titles);
230228 }
231229 if (typeof collection_rendering != 'undefined') {
232230 getMWServeStatus();
233231 }
234232 });
235233
236 -})();
 234+})(collection_jQuery);
Index: branches/wmf/1.16wmf4/extensions/Collection/js/check_load_from_localstorage.js
@@ -0,0 +1,37 @@
 2+(function($) {
 3+
 4+var script_url = wgServer + ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript);
 5+
 6+function count_articles(items) {
 7+ var count = 0;
 8+ return count;
 9+}
 10+
 11+$(function() {
 12+ var c = $.jStorage.get('collection');
 13+ if (c) {
 14+ var num_pages = 0;
 15+ for (var i = 0; i < c.items.length; i++) {
 16+ if (c.items[i]['type'] == 'article') {
 17+ num_pages++;
 18+ }
 19+ }
 20+ if (num_pages) {
 21+ var txt = collection_dialogtxt;
 22+ txt = txt.replace(/%TITLE%/, c.title ? '("' + c.title + '")' : '');
 23+ txt = txt.replace(/%NUMPAGES%/, num_pages);
 24+ if (confirm(txt)) {
 25+ $.post(script_url, {
 26+ 'action': 'ajax',
 27+ 'rs': 'wfAjaxPostCollection',
 28+ 'rsargs[]': [JSON.stringify(c)]
 29+ }, function() {
 30+ window.location.href = collection_redirect_url;
 31+ }, 'json');
 32+ }
 33+ }
 34+ }
 35+});
 36+
 37+})(jQuery);
 38+
Property changes on: branches/wmf/1.16wmf4/extensions/Collection/js/check_load_from_localstorage.js
___________________________________________________________________
Name: svn:eol-style
139 + native
Index: branches/wmf/1.16wmf4/extensions/Collection/js/jstorage.js
@@ -0,0 +1,212 @@
 2+/**
 3+ * ----------------------------- JSTORAGE -------------------------------------
 4+ * Simple local storage wrapper to save data on the browser side, supporting
 5+ * all major browsers - IE6+, Firefox2+, Safari4+, Chrome4+ and Opera 10.5+
 6+ *
 7+ * Copyright (c) 2010 Andris Reinman, andris.reinman@gmail.com
 8+ * Project homepage: www.jstorage.info
 9+ *
 10+ * Licensed under MIT-style license:
 11+ *
 12+ * Permission is hereby granted, free of charge, to any person obtaining a copy
 13+ * of this software and associated documentation files (the "Software"), to deal
 14+ * in the Software without restriction, including without limitation the rights
 15+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 16+ * copies of the Software, and to permit persons to whom the Software is
 17+ * furnished to do so, subject to the following conditions:
 18+ *
 19+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 20+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 21+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 22+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 23+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 24+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 25+ * SOFTWARE.
 26+ */
 27+
 28+/**
 29+ * USAGE:
 30+ *
 31+ * jStorage requires Prototype, MooTools or jQuery! If jQuery is used, then
 32+ * jQuery-JSON (http://code.google.com/p/jquery-json/) is also needed.
 33+ * (jQuery-JSON needs to be loaded BEFORE jStorage!)
 34+ *
 35+ * Methods:
 36+ *
 37+ * -set(key, value)
 38+ * $.jStorage.set(key, value) -> saves a value
 39+ *
 40+ * -get(key[, default])
 41+ * value = $.jStorage.get(key [, default]) ->
 42+ * retrieves value if key exists, or default if it doesn't
 43+ *
 44+ * -deleteKey(key)
 45+ * $.jStorage.deleteKey(key) -> removes a key from the storage
 46+ *
 47+ * -flush()
 48+ * $.jStorage.flush() -> clears the cache
 49+ *
 50+ * <value> can be any JSON-able value, including objects and arrays.
 51+ *
 52+ */
 53+
 54+(function($){
 55+ if(!$ || !($.toJSON || Object.toJSON || window.JSON)){
 56+ throw new Error("jQuery, MooTools or Prototype needs to be loaded before jStorage!");
 57+ }
 58+ $.jStorage = {
 59+
 60+ /* Version number */
 61+ version: "0.1.2",
 62+
 63+ /* This is the object, that holds the cached values */
 64+ _storage: {},
 65+
 66+ /* Actual browser storage (localStorage or globalStorage['domain']) */
 67+ _storage_service: {jStorage:"{}"},
 68+
 69+ /* DOM element for older IE versions, holds userData behavior */
 70+ _storage_elm: null,
 71+
 72+ /* function to encode objects to JSON strings */
 73+ json_encode: $.toJSON || Object.toJSON || (window.JSON && JSON.encode),
 74+
 75+ /* function to decode objects from JSON strings */
 76+ json_decode: $.evalJSON || (window.JSON && JSON.decode) || function(str){
 77+ return String(str).evalJSON();
 78+ },
 79+
 80+ ////////////////////////// PRIVATE METHODS ////////////////////////
 81+
 82+ /**
 83+ * Initialization function. Detects if the browser supports DOM Storage
 84+ * or userData behavior and behaves accordingly.
 85+ * @returns undefined
 86+ */
 87+ _init: function(){
 88+ /* Check if browser supports localStorage */
 89+ if("localStorage" in window){
 90+ this._storage_service = window.localStorage;
 91+ }
 92+ /* Check if browser supports globalStorage */
 93+ else if("globalStorage" in window){
 94+ this._storage_service = window.globalStorage[document.domain]
 95+ }
 96+ /* Check if browser supports userData behavior */
 97+ else{
 98+ this._storage_elm = document.createElement('link')
 99+ if("addBehavior" in this._storage_elm){
 100+
 101+ /* Use a DOM element to act as userData storage */
 102+ this._storage_elm.style.behavior = 'url(#default#userData)';
 103+
 104+ /* userData element needs to be inserted into the DOM! */
 105+ document.getElementsByTagName('head')[0].appendChild(this._storage_elm);
 106+
 107+ this._storage_elm.load("jStorage");
 108+ try{
 109+ var data = this._storage_elm.getAttribute("jStorage")
 110+ }catch(E){var data = "{}"}
 111+ if(data && data.length){
 112+ this._storage_service.jStorage = data;
 113+ }
 114+ }else{
 115+ this._storage_elm = null;
 116+ return;
 117+ }
 118+ }
 119+ /* if jStorage string is retrieved, then decode it */
 120+ if("jStorage" in this._storage_service && this._storage_service.jStorage){
 121+ try{
 122+ this._storage = this.json_decode(this._storage_service.jStorage);
 123+ }catch(E){this._storage_service.jStorage = "{}";}
 124+ }else{
 125+ this._storage_service.jStorage = "{}";
 126+ }
 127+ },
 128+
 129+ /**
 130+ * This functions provides the "save" mechanism to store the jStorage object
 131+ * @returns undefined
 132+ */
 133+ _save:function(){
 134+ if(this._storage_service){
 135+ try{
 136+ this._storage_service.jStorage = this.json_encode(this._storage);
 137+ }catch(E){/* probably cache is full, nothing is saved this way*/}
 138+ // If userData is used as the storage engine, additional
 139+ if(this._storage_elm){
 140+ try{
 141+ this._storage_elm.setAttribute("jStorage",this._storage_service.jStorage)
 142+ this._storage_elm.save("jStorage");
 143+ }catch(E){/* probably cache is full, nothing is saved this way*/}
 144+ }
 145+ }
 146+ },
 147+
 148+ /**
 149+ * Function checks if a key is set and is string or numberic
 150+ */
 151+ _checkKey: function(key){
 152+ if(!key || (typeof key != "string" && typeof key != "number")){
 153+ throw new TypeError('Key name must be string or numeric');
 154+ }
 155+ return true;
 156+ },
 157+
 158+ ////////////////////////// PUBLIC METHODS /////////////////////////
 159+
 160+ /**
 161+ * Sets a key's value.
 162+ * @param {String} key - Key to set. If this value is not set or not
 163+ * a string an exception is raised.
 164+ * @param value - Value to set. This can be any value that is JSON
 165+ * compatible (Numbers, Strings, Objects etc.).
 166+ * @returns the used value
 167+ */
 168+ set: function(key, value){
 169+ this._checkKey(key);
 170+ this._storage[key] = value;
 171+ this._save();
 172+ return value;
 173+ },
 174+ /**
 175+ * Looks up a key in cache
 176+ * @param {String} key - Key to look up.
 177+ * @param {mixed} def - Default value to return, if key didn't exist.
 178+ * @returns the key value, default value or <null>
 179+ */
 180+ get: function(key, def){
 181+ this._checkKey(key);
 182+ if(key in this._storage){
 183+ return this._storage[key];
 184+ }
 185+ return def?def:null;
 186+ },
 187+ /**
 188+ * Deletes a key from cache.
 189+ * @param {String} key - Key to delete.
 190+ * @returns true if key existed or false if it didn't
 191+ */
 192+ deleteKey: function(key){
 193+ this._checkKey(key);
 194+ if(key in this._storage){
 195+ delete this._storage[key];
 196+ this._save();
 197+ return true;
 198+ }
 199+ return false;
 200+ },
 201+ /**
 202+ * Deletes everything in cache.
 203+ * @returns true
 204+ */
 205+ flush: function(){
 206+ this._storage = {};
 207+ this._save();
 208+ return true;
 209+ }
 210+ }
 211+ // load saved data from browser
 212+ $.jStorage._init();
 213+})(typeof jQuery != "undefined" && jQuery || $);
\ No newline at end of file
Property changes on: branches/wmf/1.16wmf4/extensions/Collection/js/jstorage.js
___________________________________________________________________
Name: svn:eol-style
1214 + native
Index: branches/wmf/1.16wmf4/extensions/Collection/js/suggest.js
@@ -1,40 +1,43 @@
2 -(function() {
 2+(function($) {
33
4 -var jQuery = collection_jQuery;
5 -
64 var script_url = wgServer +
75 ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript);
86
97 function set_status(html) {
108 if (html) {
11 - jQuery('#collectionSuggestStatus').css('visibility', 'visible').html(html);
 9+ $('#collectionSuggestStatus').css('visibility', 'visible').html(html);
1210 } else {
13 - jQuery('#collectionSuggestStatus').css('visibility', 'hidden').html('&nbsp;');
 11+ $('#collectionSuggestStatus').css('visibility', 'hidden').html('&nbsp;');
1412 }
1513 }
1614
1715 function collectionSuggestCall(func, args) {
1816 set_status('...');
19 - jQuery.post(script_url, {
 17+ $.post(script_url, {
2018 'action': 'ajax',
2119 'rs': 'wfAjaxCollectionSuggest' + func,
2220 'rsargs[]': args
2321 }, function(result) {
 22+ wfCollectionSave(result.collection);
2423 if (func == 'undo') {
2524 set_status(false);
2625 } else {
2726 set_status(result.last_action);
2827 }
29 - jQuery('#collectionSuggestions').html(result.suggestions_html);
30 - jQuery('#collectionMembers').html(result.members_html);
31 - jQuery('#coll-num_pages').text(result.num_pages);
32 - sajax_do_call('wfAjaxCollectionGetBookCreatorBoxContent', ['suggest', null], function(xhr) {
33 - jQuery('#coll-book_creator_box').html(xhr.responseText);
 28+ $('#collectionSuggestions').html(result.suggestions_html);
 29+ $('#collectionMembers').html(result.members_html);
 30+ $('#coll-num_pages').text(result.num_pages);
 31+ $.getJSON(script_url, {
 32+ 'action': 'ajax',
 33+ 'rs': 'wfAjaxCollectionGetBookCreatorBoxContent',
 34+ 'rsargs[]': ['suggest', null]
 35+ }, function(result) {
 36+ $('#coll-book_creator_box').html(result.html);
3437 });
3538 }, 'json');
3639 }
3740
3841 window.collectionSuggestCall = collectionSuggestCall;
3942
40 -})();
 43+})(collection_jQuery);
4144
Index: branches/wmf/1.16wmf4/extensions/Collection/Collection.body.php
@@ -146,7 +146,7 @@
147147 $wgOut->redirect( $redirectURL );
148148 return;
149149 case 'set_titles':
150 - self::setTitles( $wgRequest->getText( 'collectionTitle', '' ), $wgRequest->getText( 'collectionSubtitle', '') );
 150+ self::setTitles( $wgRequest->getText( 'collectionTitle', '' ), $wgRequest->getText( 'collectionSubtitle', '' ) );
151151 $wgOut->redirect( SkinTemplate::makeSpecialUrl( 'Book' ) );
152152 return;
153153 case 'sort_items':
@@ -262,7 +262,7 @@
263263 $this->renderArticle( $title, $oldid, $wgRequest->getVal( 'writer', 'rl' ) );
264264 return;
265265 case 'render_collection':
266 - $title = Title::newFromText( $wgRequest->getVal( 'colltitle', '' ));
 266+ $title = Title::newFromText( $wgRequest->getVal( 'colltitle', '' ) );
267267 if ( !$title ) {
268268 return;
269269 }
@@ -286,7 +286,7 @@
287287 } else if ( isset( $add ) ) {
288288 CollectionSuggest::run( 'add', $add );
289289 } else if ( isset( $ban ) ) {
290 - CollectionSuggest::run('ban', $ban );
 290+ CollectionSuggest::run( 'ban', $ban );
291291 } else if ( isset( $remove ) ) {
292292 CollectionSuggest::run( 'remove', $remove );
293293 } else if ( isset( $addselected ) ) {
@@ -310,6 +310,7 @@
311311 }
312312
313313 function renderBookCreatorPage( $referer ) {
 314+ global $wgCollectionStyleVersion;
314315 global $wgOut;
315316 global $wgScriptPath;
316317 global $wgTitle;
@@ -321,7 +322,31 @@
322323 $wgOut->addWikiMsg( 'coll-book_creator_intro' );
323324
324325 $imagepath = "$wgScriptPath/extensions/Collection/images";
 326+ $jspath = "$wgScriptPath/extensions/Collection/js";
325327
 328+ if ( method_exists( $wgOut, 'includeJQuery' ) ) {
 329+ $wgOut->includeJQuery();
 330+ } else {
 331+ $wgOut->addScript( "<script type=\"$wgJsMimeType\" src=\"$jspath/jquery.js?" .
 332+ "$wgCollectionStyleVersion\"></script>" );
 333+ }
 334+ $wgOut->addScript( "<script type=\"$wgJsMimeType\" src=\"$jspath/jquery.json.js?" .
 335+ "$wgCollectionStyleVersion\"></script>" );
 336+ $wgOut->addScript( "<script type=\"$wgJsMimeType\" src=\"$jspath/jstorage.js?" .
 337+ "$wgCollectionStyleVersion\"></script>" );
 338+ $wgOut->addScript( "<script type=\"$wgJsMimeType\" src=\"$jspath/check_load_from_localstorage.js?" .
 339+ "$wgCollectionStyleVersion\"></script>" );
 340+
 341+ $coll = CollectionSession::getCollection();
 342+ $dialogtxt = wfMsg( 'coll-load_local_book' );
 343+ $redirecturl = SkinTemplate::makeSpecialUrl( 'Book' );
 344+
 345+ $wgOut->addScript(
 346+ "<script type=\"$wgJsMimeType\">\n" .
 347+ "var collection_dialogtxt = " . Xml::encodeJsVar( $dialogtxt ) . ";\n" .
 348+ "var collection_redirect_url = " . Xml::encodeJsVar( $redirecturl ) . ";\n" .
 349+ "</script>" );
 350+
326351 $wgOut->mScripts .= <<<EOS
327352 <style type="text/css">
328353 .collection-button {
@@ -411,7 +436,7 @@
412437
413438 $title_string = wfMsgForContent( 'coll-book_creator_text_article' );
414439 $t = Title::newFromText( $title_string );
415 - if ( !is_null($t) ) {
 440+ if ( !is_null( $t ) ) {
416441 $a = new Article( $t );
417442 if ( $a->exists() ) {
418443 $wgOut->addWikiText( '{{:' . $title_string . '}}' );
@@ -480,7 +505,7 @@
481506 }
482507
483508 $t = wfMsgForContent( 'coll-community_book_prefix' );
484 - if ( wfEmptyMsg( 'coll-community_book_prefix', $t) || $t == '-' ) {
 509+ if ( wfEmptyMsg( 'coll-community_book_prefix', $t ) || $t == '-' ) {
485510 $title = Title::makeTitle(
486511 $wgCommunityCollectionNamespace,
487512 wfMsgForContent( 'coll-collections' )
@@ -517,7 +542,7 @@
518543 $template = new CollectionPageTemplate();
519544 $template->set( 'collection', CollectionSession::getCollection() );
520545 $template->set( 'podpartners', $this->mPODPartners );
521 - $template->set( 'formats', $wgCollectionFormats);
 546+ $template->set( 'formats', $wgCollectionFormats );
522547 $prefixes = self::getBookPagePrefixes();
523548 $template->set( 'user-book-prefix', $prefixes['user-prefix'] );
524549 $template->set( 'community-book-prefix', $prefixes['community-prefix'] );
@@ -531,8 +556,8 @@
532557 CollectionSession::setCollection( $collection );
533558 }
534559
535 - static function title_cmp($a, $b) {
536 - return strcasecmp($a['title'], $b['title']);
 560+ static function title_cmp( $a, $b ) {
 561+ return strcasecmp( $a['title'], $b['title'] );
537562 }
538563
539564 static function sortItems() {
@@ -563,7 +588,7 @@
564589 }
565590
566591 static function renameChapter( $index, $name ) {
567 - if (!is_int( $index ) ) {
 592+ if ( !is_int( $index ) ) {
568593 return;
569594 }
570595 $collection = CollectionSession::getCollection();
@@ -574,13 +599,13 @@
575600 CollectionSession::setCollection( $collection );
576601 }
577602
578 - static function addArticleFromName( $namespace, $name, $oldid=0 ) {
 603+ static function addArticleFromName( $namespace, $name, $oldid = 0 ) {
579604 $title = Title::makeTitleSafe( $namespace, $name );
580 - if (!$title) return false;
 605+ if ( !$title ) return false;
581606 return self::addArticle( $title, $oldid );
582607 }
583608
584 - static function addArticle( $title, $oldid=0 ) {
 609+ static function addArticle( $title, $oldid = 0 ) {
585610 $article = new Article( $title, $oldid );
586611 $latest = $article->getLatest();
587612
@@ -590,7 +615,7 @@
591616 $oldid = $latest;
592617 }
593618 $index = CollectionSession::findArticle( $title->getPrefixedText(), $oldid );
594 - if ( $index != -1 ) {
 619+ if ( $index != - 1 ) {
595620 return false;
596621 }
597622
@@ -613,18 +638,18 @@
614639 return true;
615640 }
616641
617 - static function removeArticleFromName( $namespace, $name, $oldid=0 ) {
 642+ static function removeArticleFromName( $namespace, $name, $oldid = 0 ) {
618643 $title = Title::makeTitleSafe( $namespace, $name );
619644 return self::removeArticle( $title, $oldid );
620645 }
621646
622 - static function removeArticle( $title, $oldid=0 ) {
 647+ static function removeArticle( $title, $oldid = 0 ) {
623648 if ( !CollectionSession::hasSession() ) {
624649 return false;
625650 }
626651 $collection = CollectionSession::getCollection();
627652 $index = CollectionSession::findArticle( $title->getPrefixedText(), $oldid );
628 - if ( $index != -1 ) {
 653+ if ( $index != - 1 ) {
629654 array_splice( $collection['items'], $index, 1 );
630655 }
631656 CollectionSession::setCollection( $collection );
@@ -669,7 +694,7 @@
670695 }
671696 if ( in_array( $row->page_namespace, $wgCollectionArticleNamespaces ) ) {
672697 $articleTitle = Title::makeTitle( $row->page_namespace, $row->page_title );
673 - if ( CollectionSession::findArticle( $articleTitle->getPrefixedText() ) == -1 ) {
 698+ if ( CollectionSession::findArticle( $articleTitle->getPrefixedText() ) == - 1 ) {
674699 self::addArticle( $articleTitle );
675700 }
676701 }
@@ -685,7 +710,7 @@
686711 }
687712
688713 static function removeItem( $index ) {
689 - if (!is_int( $index ) ) {
 714+ if ( !is_int( $index ) ) {
690715 return false;
691716 }
692717 if ( !CollectionSession::hasSession() ) {
@@ -716,7 +741,7 @@
717742 $collection = CollectionSession::getCollection();
718743 $old_items = $collection['items'];
719744 $new_items = array();
720 - foreach ($items as $new_index => $old_index) {
 745+ foreach ( $items as $new_index => $old_index ) {
721746 $new_items[$new_index] = $old_items[$old_index];
722747 }
723748 $collection['items'] = $new_items;
@@ -725,11 +750,11 @@
726751
727752 function parseCollectionLine( &$collection, $line, $append ) {
728753 $line = trim( $line );
729 - if ( !$append && preg_match( '/^===\s*(.*?)\s*===$/', $line, $match) ) {
 754+ if ( !$append && preg_match( '/^===\s*(.*?)\s*===$/', $line, $match ) ) {
730755 $collection['subtitle'] = $match[ 1 ];
731 - } elseif ( !$append && preg_match( '/^==\s*(.*?)\s*==$/', $line, $match) ) {
 756+ } elseif ( !$append && preg_match( '/^==\s*(.*?)\s*==$/', $line, $match ) ) {
732757 $collection['title'] = $match[ 1 ];
733 - } elseif (substr( $line, 0, 1 ) == ';') { // chapter
 758+ } elseif ( substr( $line, 0, 1 ) == ';' ) { // chapter
734759 return array(
735760 'type' => 'chapter',
736761 'title' => trim( substr( $line, 1 ) ),
@@ -743,7 +768,7 @@
744769 } else {
745770 $displayTitle = null;
746771 }
747 - $oldid = -1;
 772+ $oldid = - 1;
748773 $currentVersion = 1;
749774 } elseif ( preg_match( '/^\[\{\{fullurl:(.*?)\|oldid=(.*?)\}\}\s+(.*?)\]$/', $articleTitle, $match ) ) {
750775 $articleTitle = $match[1];
@@ -759,10 +784,10 @@
760785 }
761786
762787 $articleTitle = Title::newFromText( $articleTitle );
763 - if( !$articleTitle ) {
 788+ if ( !$articleTitle ) {
764789 return null;
765790 }
766 - if ($oldid < 0) {
 791+ if ( $oldid < 0 ) {
767792 $article = new Article( $articleTitle );
768793 } else {
769794 $article = new Article( $articleTitle, $oldid );
@@ -794,7 +819,7 @@
795820 return null;
796821 }
797822
798 - function loadCollection( $title, $append=false ) {
 823+ function loadCollection( $title, $append = false ) {
799824 global $wgOut;
800825
801826 if ( is_null( $title ) ) {
@@ -820,7 +845,7 @@
821846
822847 $article = new Article( $title );
823848
824 - foreach( preg_split( '/[\r\n]+/', $article->getContent() ) as $line ) {
 849+ foreach ( preg_split( '/[\r\n]+/', $article->getContent() ) as $line ) {
825850 $item = $this->parseCollectionLine( $collection, $line, $append );
826851 if ( !is_null( $item ) ) {
827852 $items[] = $item;
@@ -830,7 +855,7 @@
831856 return $collection;
832857 }
833858
834 - function saveCollection( $title, $forceOverwrite=false ) {
 859+ function saveCollection( $title, $forceOverwrite = false ) {
835860 global $wgUser;
836861
837862 $article = new Article( $title );
@@ -839,7 +864,7 @@
840865 }
841866 $articleText = "{{" . wfMsgForContent( 'coll-savedbook_template' ) . "}}\n\n";
842867 $collection = CollectionSession::getCollection();
843 - if( $collection['title'] ) {
 868+ if ( $collection['title'] ) {
844869 $articleText .= '== ' . $collection['title'] . " ==\n";
845870 }
846871 if ( $collection['subtitle'] ) {
@@ -850,7 +875,7 @@
851876 if ( $item['type'] == 'chapter' ) {
852877 $articleText .= ';' . $item['title'] . "\n";
853878 } elseif ( $item['type'] == 'article' ) {
854 - if ($item['currentVersion'] == 1) {
 879+ if ( $item['currentVersion'] == 1 ) {
855880 $articleText .= ":[[" . $item['title'];
856881 if ( $item['displaytitle'] ) {
857882 $articleText .= "|" . $item['displaytitle'];
@@ -867,7 +892,7 @@
868893 $articleText .= "]\n";
869894 }
870895 }
871 - //$articleText .= $item['revision'] . "/" . $item['latest']."\n";
 896+ // $articleText .= $item['revision'] . "/" . $item['latest']."\n";
872897 }
873898 }
874899 $t = wfMsgForContent( 'coll-bookscategory' );
@@ -878,13 +903,13 @@
879904 }
880905 }
881906
882 - $req = new FauxRequest(array(
 907+ $req = new FauxRequest( array(
883908 'action' => 'edit',
884909 'title' => $title->getPrefixedText(),
885910 'text' => $articleText,
886911 'token' => $wgUser->editToken(),
887 - ), true);
888 - $api = new ApiMain($req, true);
 912+ ), true );
 913+ $api = new ApiMain( $req, true );
889914 $api->execute();
890915 return true;
891916 }
@@ -1071,9 +1096,9 @@
10721097 switch ( $response['state'] ) {
10731098 case 'progress':
10741099 $url = htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', 'bookcmd=rendering&' . $query ) );
1075 - $wgOut->addHeadItem( 'refresh-nojs', '<noscript><meta http-equiv="refresh" content="2" /></noscript>');
1076 - $wgOut->addInlineScript( 'var collection_id = "' . urlencode( $response['collection_id']) . '";' );
1077 - $wgOut->addInlineScript( 'var writer = "' . urlencode( $response['writer']) . '";' );
 1100+ $wgOut->addHeadItem( 'refresh-nojs', '<noscript><meta http-equiv="refresh" content="2" /></noscript>' );
 1101+ $wgOut->addInlineScript( 'var collection_id = "' . urlencode( $response['collection_id'] ) . '";' );
 1102+ $wgOut->addInlineScript( 'var writer = "' . urlencode( $response['writer'] ) . '";' );
10781103 $wgOut->addInlineScript( 'var collection_rendering = true;' );
10791104 $wgOut->addInlineScript( "var wgCollectionVersion = \"$wgCollectionVersion\";" );
10801105 $wgOut->addScript( "<script type=\"$wgJsMimeType\" src=\"$wgScriptPath/extensions/Collection/js/jquery.js?$wgCollectionStyleVersion\"></script>" );
@@ -1081,7 +1106,7 @@
10821107 $wgOut->addScript( "<script type=\"$wgJsMimeType\" src=\"$wgScriptPath/extensions/Collection/js/collection.js?$wgCollectionStyleVersion\"></script>" );
10831108 $wgOut->setPageTitle( wfMsg( 'coll-rendering_title' ) );
10841109
1085 - if ( isset($response['status']['status'] ) && $response['status']['status'] ) {
 1110+ if ( isset( $response['status']['status'] ) && $response['status']['status'] ) {
10861111 $statusText = $response['status']['status'];
10871112 if ( isset( $response['status']['article'] ) && $response['status']['article'] ) {
10881113 $statusText .= ' ' . wfMsg( 'coll-rendering_article', $response['status']['article'] );
@@ -1126,7 +1151,7 @@
11271152 $errorMessage = '';
11281153 $info = false;
11291154 if ( isset( $r['url'] ) ) {
1130 - self::curlreq( 'GET', $r['url'], array(), $errorMessage, $info, $timeout=false, $toFile=$tempfile );
 1155+ self::curlreq( 'GET', $r['url'], array(), $errorMessage, $info, $timeout = false, $toFile = $tempfile );
11311156 $content_type = $r['content_type'];
11321157 $content_length = $r['content_length'];
11331158 $content_disposition = $r['content_disposition'];
@@ -1134,7 +1159,7 @@
11351160 $info = self::mwServeCommand( 'download', array(
11361161 'collection_id' => $wgRequest->getVal( 'collection_id' ),
11371162 'writer' => $wgRequest->getVal( 'writer' ),
1138 - ), $timeout=false, $toFile=$tempfile );
 1163+ ), $timeout = false, $toFile = $tempfile );
11391164 $content_type = $info['content_type'];
11401165 $content_length = $info['download_content_length'];
11411166 $content_disposition = null;
@@ -1145,9 +1170,15 @@
11461171 }
11471172 wfResetOutputBuffers();
11481173 header( 'Content-Type: ' . $content_type );
1149 - header( 'Content-Length: ' . $content_length);
 1174+ header( 'Content-Length: ' . $content_length );
11501175 if ( $content_disposition ) {
11511176 header( 'Content-Disposition: ' . $content_disposition );
 1177+ } else {
 1178+ $ct_enc = split( ';', $content_type );
 1179+ $ct = $ct_enc[0];
 1180+ if ( isset( $wgCollectionContentTypeToFilename[$ct] ) ) {
 1181+ header( 'Content-Disposition: ' . 'inline; filename=' . $wgCollectionContentTypeToFilename[$ct] );
 1182+ }
11521183 }
11531184 fseek( $tempfile, 0 );
11541185 fpassthru( $tempfile );
@@ -1230,7 +1261,7 @@
12311262 $wgOut->addTemplate( $template );
12321263 }
12331264
1234 - static function mwServeCommand( $command, $args, $timeout=true, $toFile=null ) {
 1265+ static function mwServeCommand( $command, $args, $timeout = true, $toFile = null ) {
12351266 global $wgOut;
12361267 global $wgCollectionMWServeURL;
12371268 global $wgCollectionMWServeCredentials;
@@ -1284,22 +1315,22 @@
12851316 }
12861317
12871318 static function curlreq( $method, $url, $postFields, &$errorMessage, &$info,
1288 - $timeout=true, $toFile=null ) {
 1319+ $timeout = true, $toFile = null ) {
12891320 global $wgHTTPTimeout, $wgHTTPProxy, $wgTitle, $wgVersion;
12901321 global $wgCollectionMWServeCert;
12911322 global $wgCollectionVersion;
12921323
1293 - if ( $method == 'GET') {
 1324+ if ( $method == 'GET' ) {
12941325 $url = wfAppendQuery( $url, wfArrayToCGI( $postFields ) );
12951326 }
12961327 $c = curl_init( $url );
1297 - curl_setopt($c, CURLOPT_PROXY, $wgHTTPProxy);
 1328+ curl_setopt( $c, CURLOPT_PROXY, $wgHTTPProxy );
12981329 $userAgent = wfGetAgent();
12991330 if ( !$userAgent ) {
13001331 $userAgent = "Unknown user agent";
13011332 }
13021333 $userAgent .= " (via MediaWiki/$wgVersion, Collection/$wgCollectionVersion)";
1303 - curl_setopt( $c, CURLOPT_USERAGENT, $userAgent);
 1334+ curl_setopt( $c, CURLOPT_USERAGENT, $userAgent );
13041335 if ( $method == 'POST' ) {
13051336 curl_setopt( $c, CURLOPT_POST, true );
13061337 curl_setopt( $c, CURLOPT_POSTFIELDS, $postFields );
@@ -1315,9 +1346,9 @@
13161347 /* Allow the use of self-signed certificates by referencing
13171348 * a local (to the mediawiki install) copy of the signing
13181349 * certificate */
1319 - if ( !($wgCollectionMWServeCert === null) ) {
1320 - curl_setopt ($c, CURLOPT_SSL_VERIFYPEER, TRUE);
1321 - curl_setopt ($c, CURLOPT_CAINFO, $wgCollectionMWServeCert);
 1350+ if ( !( $wgCollectionMWServeCert === null ) ) {
 1351+ curl_setopt ( $c, CURLOPT_SSL_VERIFYPEER, TRUE );
 1352+ curl_setopt ( $c, CURLOPT_CAINFO, $wgCollectionMWServeCert );
13221353 }
13231354
13241355 if ( $toFile ) {
Index: branches/wmf/1.16wmf4/extensions/Collection/Collection.templates.php
@@ -4,35 +4,35 @@
55 * @file
66 * @ingroup Templates
77 */
8 -if( !defined( 'MEDIAWIKI' ) ) die( -1 );
 8+if ( !defined( 'MEDIAWIKI' ) ) die( - 1 );
99
1010 /**
1111 * HTML template for Special:Book
1212 * @ingroup Templates
1313 */
1414 class CollectionPageTemplate extends QuickTemplate {
15 - function execute() {
 15+ function execute() {
1616 $mediapath = $GLOBALS['wgScriptPath'] . '/extensions/Collection/images/';
1717 ?>
1818
1919 <div style="width: 47%; float: left; margin-right: 5%">
2020
21 -<form action="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book')) ?>" method="post" id="mw-collection-title-form">
 21+<form action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post" id="mw-collection-title-form">
2222 <table id="mw-collection-title-table" style="width: 80%; background-color: transparent;" align="center">
2323 <tbody>
2424 <tr>
25 - <td class="mw-label"><label for="titleInput"><?php $this->msg('coll-title') ?></label></td>
26 - <td class="mw-input"><input id="titleInput" type="text" name="collectionTitle" value="<?php echo htmlspecialchars($this->data['collection']['title']) ?>" /></td>
 25+ <td class="mw-label"><label for="titleInput"><?php $this->msg( 'coll-title' ) ?></label></td>
 26+ <td class="mw-input"><input id="titleInput" type="text" name="collectionTitle" value="<?php echo htmlspecialchars( $this->data['collection']['title'] ) ?>" /></td>
2727 </tr>
2828 <tr>
29 - <td class="mw-label"><label for="subtitleInput"><?php $this->msg('coll-subtitle') ?></label></td>
30 - <td class="mw-input"><input id="subtitleInput" type="text" name="collectionSubtitle" value="<?php echo htmlspecialchars($this->data['collection']['subtitle']) ?>" /></td>
 29+ <td class="mw-label"><label for="subtitleInput"><?php $this->msg( 'coll-subtitle' ) ?></label></td>
 30+ <td class="mw-input"><input id="subtitleInput" type="text" name="collectionSubtitle" value="<?php echo htmlspecialchars( $this->data['collection']['subtitle'] ) ?>" /></td>
3131 </tr>
3232 </tbody>
3333 </table>
3434 <input type="hidden" name="bookcmd" value="set_titles" />
3535 <noscript>
36 - <input type="submit" value="<?php $this->msg('coll-update') ?>" />
 36+ <input type="submit" value="<?php $this->msg( 'coll-update' ) ?>" />
3737 </noscript>
3838 </form>
3939
@@ -44,9 +44,9 @@
4545 ?>
4646 </div>
4747 <div style="display:none">
48 - <span id="newChapterText"><?php $this->msg('coll-new_chapter') ?></span>
49 - <span id="renameChapterText"><?php $this->msg('coll-rename_chapter') ?></span>
50 - <span id="clearCollectionConfirmText"><?php $this->msg('coll-clear_collection_confirm') ?></span>
 48+ <span id="newChapterText"><?php $this->msg( 'coll-new_chapter' ) ?></span>
 49+ <span id="renameChapterText"><?php $this->msg( 'coll-rename_chapter' ) ?></span>
 50+ <span id="clearCollectionConfirmText"><?php $this->msg( 'coll-clear_collection_confirm' ) ?></span>
5151 </div>
5252
5353 </div>
@@ -54,37 +54,37 @@
5555 <div style="width: 47%; float: left">
5656
5757 <div style="margin-bottom: 10px; padding: 10px; border: 1px solid #aaa; background-color: #f9f9f9;">
58 - <h2><span class="mw-headline"><?php $this->msg('coll-book_title') ?></span></h2>
 58+ <h2><span class="mw-headline"><?php $this->msg( 'coll-book_title' ) ?></span></h2>
5959 <?php
6060 $partnerData = $this->data['podpartners']['pediapress'];
61 -$this->msgWiki('coll-book_text');
 61+$this->msgWiki( 'coll-book_text' );
6262 ?>
6363 <div>
6464 <div style="float:right">
65 - <form action="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book')) ?>" method="post">
 65+ <form action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post">
6666 <input type="hidden" name="bookcmd" value="post_zip" />
6767 <input type="hidden" name="partner" value="pediapress" />
68 - <input type="submit" value="<?php echo wfMsgHtml('coll-order_from_pp', htmlspecialchars($partnerData['name'])) ?>" class="order" <?php if (count($this->data['collection']['items']) == 0) { ?> disabled="disabled"<?php } ?> />
 68+ <input type="submit" value="<?php echo wfMsgHtml( 'coll-order_from_pp', htmlspecialchars( $partnerData['name'] ) ) ?>" class="order" <?php if ( count( $this->data['collection']['items'] ) == 0 ) { ?> disabled="disabled"<?php } ?> />
6969 </form>
7070 </div>
7171 <?php
72 -$t = Title::newFromText(wfMsgForContent('coll-order_info_article'));
 72+$t = Title::newFromText( wfMsgForContent( 'coll-order_info_article' ) );
7373 if ( $t && $t->exists() ) { ?>
7474 <div id="coll-more_info" style="display:none">
75 - <a href="javascript:void(0)" onclick="coll_toggle_order_info(true);"><img src="<?php echo htmlspecialchars($mediapath . "collapse.png") ?>" width="10" height="10" alt="" />&nbsp;<?php $this->msg('coll-more_info') ?></a>
 75+ <a href="javascript:void(0)" onclick="coll_toggle_order_info(true);"><img src="<?php echo htmlspecialchars( $mediapath . "collapse.png" ) ?>" width="10" height="10" alt="" />&nbsp;<?php $this->msg( 'coll-more_info' ) ?></a>
7676 </div>
7777 <div id="coll-hide_info" style="display:none">
78 - <a href="javascript:void(0)" onclick="coll_toggle_order_info(false);"><img src="<?php echo htmlspecialchars($mediapath . "expand.png") ?>" width="10" height="10" alt="" />&nbsp;<?php $this->msg('coll-hide_info') ?></a>
 78+ <a href="javascript:void(0)" onclick="coll_toggle_order_info(false);"><img src="<?php echo htmlspecialchars( $mediapath . "expand.png" ) ?>" width="10" height="10" alt="" />&nbsp;<?php $this->msg( 'coll-hide_info' ) ?></a>
7979 </div>
8080 <?php } else { ?>
81 - <a href="<?php echo htmlspecialchars($partnerData['url']) ?>" target="_blank"><?php echo wfMsgHtml('coll-about_pp', htmlspecialchars($partnerData['name'])) ?></a>
 81+ <a href="<?php echo htmlspecialchars( $partnerData['url'] ) ?>" target="_blank"><?php echo wfMsgHtml( 'coll-about_pp', htmlspecialchars( $partnerData['name'] ) ) ?></a>
8282 <?php } ?>
8383 </div>
8484 <?php
85 -if ($t && $t->exists() ) { ?>
 85+if ( $t && $t->exists() ) { ?>
8686 <div id="coll-order_info" style="display:none; margin-top: 2em;">
8787 <?php
88 -echo $GLOBALS['wgParser']->parse('{{:' . $t . '}}',
 88+echo $GLOBALS['wgParser']->parse( '{{:' . $t . '}}',
8989 $GLOBALS['wgTitle'],
9090 $GLOBALS['wgOut']->parserOptions(),
9191 true
@@ -95,92 +95,92 @@
9696 </div>
9797
9898 <div style="margin-bottom: 10px; padding: 10px; border: 1px solid #aaa; background-color: #f9f9f9;">
99 - <h2><span class="mw-headline"><?php $this->msg('coll-download_title') ?></span></h2>
100 - <?php if (count($this->data['formats']) == 1) {
101 - $writer = array_rand($this->data['formats']);
 99+ <h2><span class="mw-headline"><?php $this->msg( 'coll-download_title' ) ?></span></h2>
 100+ <?php if ( count( $this->data['formats'] ) == 1 ) {
 101+ $writer = array_rand( $this->data['formats'] );
102102 echo $GLOBALS['wgParser']->parse(
103 - wfMsgNoTrans('coll-download_as_text', $this->data['formats'][$writer]),
 103+ wfMsgNoTrans( 'coll-download_as_text', $this->data['formats'][$writer] ),
104104 $GLOBALS['wgTitle'],
105105 $GLOBALS['wgOut']->parserOptions(),
106106 true
107107 )->getText();
108 - $buttonLabel = wfMsgHtml('coll-download_as', htmlspecialchars($this->data['formats'][$writer]));
 108+ $buttonLabel = wfMsgHtml( 'coll-download_as', htmlspecialchars( $this->data['formats'][$writer] ) );
109109 } else {
110 - $this->msgWiki('coll-download_text');
111 - $buttonLabel = wfMsgHtml('coll-download');
 110+ $this->msgWiki( 'coll-download_text' );
 111+ $buttonLabel = wfMsgHtml( 'coll-download' );
112112 } ?>
113 - <form id="downloadForm" action="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book')) ?>" method="post">
 113+ <form id="downloadForm" action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post">
114114 <table style="width:100%; background-color: transparent;"><tr><td><tbody><tr><td>
115 - <?php if (count($this->data['formats']) == 1) { ?>
116 - <input type="hidden" name="writer" value="<?php echo htmlspecialchars($writer) ?>" />
 115+ <?php if ( count( $this->data['formats'] ) == 1 ) { ?>
 116+ <input type="hidden" name="writer" value="<?php echo htmlspecialchars( $writer ) ?>" />
117117 <?php } else { ?>
118 - <label for="formatSelect"><?php $this->msg('coll-format_label') ?></label>
 118+ <label for="formatSelect"><?php $this->msg( 'coll-format_label' ) ?></label>
119119 <select id="formatSelect" name="writer">
120 - <?php foreach ($this->data['formats'] as $writer => $name) { ?>
121 - <option value="<?php echo htmlspecialchars($writer) ?>"><?php echo htmlspecialchars($name) ?></option>
 120+ <?php foreach ( $this->data['formats'] as $writer => $name ) { ?>
 121+ <option value="<?php echo htmlspecialchars( $writer ) ?>"><?php echo htmlspecialchars( $name ) ?></option>
122122 <?php } ?>
123123 </select>
124124 <?php } ?>
125125 </td><td style="text-align:right; vertical-align:bottom;">
126126 <input type="hidden" name="bookcmd" value="render" />
127 - <input id="downloadButton" type="submit" value="<?php echo $buttonLabel ?>"<?php if (count($this->data['collection']['items']) == 0) { ?> disabled="disabled"<?php } ?> />
 127+ <input id="downloadButton" type="submit" value="<?php echo $buttonLabel ?>"<?php if ( count( $this->data['collection']['items'] ) == 0 ) { ?> disabled="disabled"<?php } ?> />
128128 </td></tr></tbody></table>
129129 </form>
130130 </div>
131131
132132 <?php
133 - if ($GLOBALS['wgUser']->isLoggedIn()) {
134 - $canSaveUserPage = $GLOBALS['wgUser']->isAllowed('collectionsaveasuserpage');
135 - $canSaveCommunityPage = $GLOBALS['wgUser']->isAllowed('collectionsaveascommunitypage');
 133+ if ( $GLOBALS['wgUser']->isLoggedIn() ) {
 134+ $canSaveUserPage = $GLOBALS['wgUser']->isAllowed( 'collectionsaveasuserpage' );
 135+ $canSaveCommunityPage = $GLOBALS['wgUser']->isAllowed( 'collectionsaveascommunitypage' );
136136 }
137 - if ($GLOBALS['wgEnableWriteAPI'] && ($canSaveUserPage || $canSaveCommunityPage)) {
 137+ if ( $GLOBALS['wgEnableWriteAPI'] && ( $canSaveUserPage || $canSaveCommunityPage ) ) {
138138 ?>
139139 <div id="coll-savebox" style="margin-bottom: 10px; padding: 10px; border: 1px solid #aaa; background-color: #f9f9f9;">
140 - <h2><span class="mw-headline"><?php $this->msg('coll-save_collection_title') ?></span></h2>
 140+ <h2><span class="mw-headline"><?php $this->msg( 'coll-save_collection_title' ) ?></span></h2>
141141 <?php
142 - $this->msgWiki('coll-save_collection_text');
143 - $bookname = wfMsgForContent('coll-collections');
 142+ $this->msgWiki( 'coll-save_collection_text' );
 143+ $bookname = wfMsgForContent( 'coll-collections' );
144144 $communityCollNS = $GLOBALS['wgCommunityCollectionNamespace'];
145145 ?>
146 - <form id="saveForm" action="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book')) ?>" method="post">
 146+ <form id="saveForm" action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post">
147147 <table style="width:100%; background-color: transparent;"><tbody>
148 - <?php if ($canSaveUserPage) { ?>
 148+ <?php if ( $canSaveUserPage ) { ?>
149149 <tr><td>
150 - <?php if ($canSaveCommunityPage) { ?>
 150+ <?php if ( $canSaveCommunityPage ) { ?>
151151 <input id="personalCollType" type="radio" name="colltype" value="personal" checked="checked" />
152152 <?php } else { ?>
153153 <input type="hidden" name="colltype" value="personal" />
154154 <?php } ?>
155 - <label for="personalCollTitle"><a href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Prefixindex', 'prefix=' . wfUrlencode($this->data['user-book-prefix']))) ?>"><?php echo htmlspecialchars($this->data['user-book-prefix']) ?></a></label>
 155+ <label for="personalCollTitle"><a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Prefixindex', 'prefix=' . wfUrlencode( $this->data['user-book-prefix'] ) ) ) ?>"><?php echo htmlspecialchars( $this->data['user-book-prefix'] ) ?></a></label>
156156 </td>
157157 <td style="text-align:right;">
158158 <input id="personalCollTitle" type="text" name="pcollname" />
159159 </td></tr>
160160 <?php } // if ($canSaveUserPage) ?>
161 - <?php if ($canSaveCommunityPage) { ?>
 161+ <?php if ( $canSaveCommunityPage ) { ?>
162162 <tr><td>
163 - <?php if ($canSaveUserPage) { ?>
 163+ <?php if ( $canSaveUserPage ) { ?>
164164 <input id="communityCollType" type="radio" name="colltype" value="community" />
165165 <?php } else { ?>
166166 <input type="hidden" name="colltype" value="community" />
167167 <?php } ?>
168 - <label for="communityCollTitle"><a href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Prefixindex', 'prefix=' . wfUrlencode($this->data['community-book-prefix']))) ?>"><?php echo htmlspecialchars($this->data['community-book-prefix']) ?></a></label>
 168+ <label for="communityCollTitle"><a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Prefixindex', 'prefix=' . wfUrlencode( $this->data['community-book-prefix'] ) ) ) ?>"><?php echo htmlspecialchars( $this->data['community-book-prefix'] ) ?></a></label>
169169 </td>
170170 <td style="text-align:right;">
171171 <input id="communityCollTitle" type="text" name="ccollname" disabled="disabled" />
172172 </td></tr>
173173 <?php } // if ($canSaveCommunityPage) ?>
174174 <tr><td>&nbsp;</td><td style="text-align:right;">
175 - <input id="saveButton" type="submit" value="<?php $this->msg('coll-save_collection') ?>"<?php if (count($this->data['collection']['items']) == 0) { ?> disabled="disabled"<?php } ?> />
 175+ <input id="saveButton" type="submit" value="<?php $this->msg( 'coll-save_collection' ) ?>"<?php if ( count( $this->data['collection']['items'] ) == 0 ) { ?> disabled="disabled"<?php } ?> />
176176 </tr></tbody></table>
177 - <input name="token" type="hidden" value="<?php echo htmlspecialchars($GLOBALS['wgUser']->editToken()) ?>" />
 177+ <input name="token" type="hidden" value="<?php echo htmlspecialchars( $GLOBALS['wgUser']->editToken() ) ?>" />
178178 <input name="bookcmd" type="hidden" value="save_collection" />
179179 </form>
180180
181181 <?php
182 - $t = wfMsgForContent('coll-bookscategory');
183 - if ( !wfEmptyMsg('coll-bookscategory', $t) && $t != '-') {
184 - $this->msgWiki('coll-save_category');
 182+ $t = wfMsgForContent( 'coll-bookscategory' );
 183+ if ( !wfEmptyMsg( 'coll-bookscategory', $t ) && $t != '-' ) {
 184+ $this->msgWiki( 'coll-save_category' );
185185 }
186186 ?>
187187 </div>
@@ -199,16 +199,16 @@
200200 * @ingroup Templates
201201 */
202202 class CollectionListTemplate extends QuickTemplate {
203 - function execute() {
 203+ function execute() {
204204 $mediapath = $GLOBALS['wgScriptPath'] . '/extensions/Collection/images/';
205205 ?>
206206
207207 <div style="text-align: center; padding: 2px; margin-top: 20px; margin-bottom: 2px; border: 1px solid #aaa; background-color: #f9f9f9;">
208208 <div>
209 -<a class="makeVisible" style="margin-right: 3em;<?php if (!isset($this->data['is_ajax'])) { echo ' display:none;'; } ?>" onclick="return coll_create_chapter()" href="javascript:void(0);"><?php $this->msg('coll-create_chapter') ?></a>
210 -<?php if (count($this->data['collection']['items']) > 0) { ?>
211 -<a style="margin-right: 3em" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'sort_items'))) ?>"><?php $this->msg('coll-sort_alphabetically') ?></a>
212 -<a onclick="return coll_clear_collection()" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'clear_collection'))) ?>"><?php $this->msg('coll-clear_collection') ?></a>
 209+<a class="makeVisible" style="margin-right: 3em;<?php if ( !isset( $this->data['is_ajax'] ) ) { echo ' display:none;'; } ?>" onclick="return coll_create_chapter()" href="javascript:void(0);"><?php $this->msg( 'coll-create_chapter' ) ?></a>
 210+<?php if ( count( $this->data['collection']['items'] ) > 0 ) { ?>
 211+<a style="margin-right: 3em" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'sort_items' ) ) ) ?>"><?php $this->msg( 'coll-sort_alphabetically' ) ?></a>
 212+<a onclick="return coll_clear_collection()" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'clear_collection' ) ) ) ?>"><?php $this->msg( 'coll-clear_collection' ) ?></a>
213213 <?php } ?>
214214 </div>
215215 </div>
@@ -217,66 +217,66 @@
218218 <div style="padding: 10px 20px; border: 1px solid rgb(170, 170, 170)">
219219
220220 <?php
221 -if (count($this->data['collection']['items']) == 0) { ?>
222 -<em id="emptyCollection"><?php $this->msg('coll-empty_collection'); ?></em>
 221+if ( count( $this->data['collection']['items'] ) == 0 ) { ?>
 222+<em id="emptyCollection"><?php $this->msg( 'coll-empty_collection' ); ?></em>
223223 <?php } else { ?>
224224 <div style="text-align: center; margin-bottom: 10px">
225 -<em class="makeVisible" style="display:none; font-size: 95%"><?php $this->msg('coll-drag_and_drop') ?></em>
 225+<em class="makeVisible" style="display:none; font-size: 95%"><?php $this->msg( 'coll-drag_and_drop' ) ?></em>
226226 </div>
227 -<?php }?>
 227+<?php } ?>
228228
229229 <ul id="collectionList" style="list-style: none; margin-left: 0;">
230230
231231 <?php
232 -foreach($this->data['collection']['items'] as $index => $item) {
233 - if ($item['type'] == 'article') { ?>
 232+foreach ( $this->data['collection']['items'] as $index => $item ) {
 233+ if ( $item['type'] == 'article' ) { ?>
234234 <li id="item-<?php echo intval( $index ) ?>" class="article">
235 - <a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'remove_item', 'index' => $index))) ?>" title="<?php $this->msg('coll-remove') ?>"><img src="<?php echo htmlspecialchars($mediapath . "remove.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-remove') ?>" /></a><a>
 235+ <a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'remove_item', 'index' => $index ) ) ) ?>" title="<?php $this->msg( 'coll-remove' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "remove.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-remove' ) ?>" /></a><a>
236236 <noscript>
237 - <?php if ($index == 0) { ?>
238 - <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" />
 237+ <?php if ( $index == 0 ) { ?>
 238+ <img src="<?php echo htmlspecialchars( $mediapath . "trans.png" ) ?>" width="10" height="10" alt="" />
239239 <?php } else { ?>
240 - <a onclick="return coll_move_item(<?php echo intval( $index ) . ', -1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array( 'bookcmd' => 'move_item', 'delta' => '-1', 'index' => $index))) ?>" title="<?php $this->msg('coll-move_up') ?>"><img src="<?php echo htmlspecialchars($mediapath . "up.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_up') ?>" /></a>
 240+ <a onclick="return coll_move_item(<?php echo intval( $index ) . ', -1' ?>)" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'move_item', 'delta' => '-1', 'index' => $index ) ) ) ?>" title="<?php $this->msg( 'coll-move_up' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "up.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-move_up' ) ?>" /></a>
241241 <?php }
242 - if ($index == count($this->data['collection']['items']) - 1) { ?>
243 - <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" />
 242+ if ( $index == count( $this->data['collection']['items'] ) - 1 ) { ?>
 243+ <img src="<?php echo htmlspecialchars( $mediapath . "trans.png" ) ?>" width="10" height="10" alt="" />
244244 <?php } else { ?>
245 - <a onclick="return coll_move_item(<?php echo intval( $index ) . ', 1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'move_item', 'delta' => '1', 'index' => $index))) ?>" title="<?php $this->msg('coll-move_down') ?>"><img src="<?php echo htmlspecialchars($mediapath . "down.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_down') ?>" /></a>
 245+ <a onclick="return coll_move_item(<?php echo intval( $index ) . ', 1' ?>)" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'move_item', 'delta' => '1', 'index' => $index ) ) ) ?>" title="<?php $this->msg( 'coll-move_down' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "down.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-move_down' ) ?>" /></a>
246246 <?php } ?>
247247 </noscript>
248 - <?php if ($item['currentVersion'] == 0) {
 248+ <?php if ( $item['currentVersion'] == 0 ) {
249249 $url = $item['url'] . '?oldid=' . $item['revision'];
250250 } else {
251251 $url = $item['url'];
252252 }
253253 ?>
254 - <a href="<?php echo htmlspecialchars( $url ) ?>" title="<?php $this->msg('coll-show') ?>"><img src="<?php echo htmlspecialchars($mediapath . "show.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-show') ?>" /></a>
 254+ <a href="<?php echo htmlspecialchars( $url ) ?>" title="<?php $this->msg( 'coll-show' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "show.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-show' ) ?>" /></a>
255255 <span class="title sortableitem" style="margin-left: 1em;">
256 - <?php if (isset($item['displaytitle']) && $item['displaytitle'] != '') {
257 - echo htmlspecialchars($item['displaytitle']);
 256+ <?php if ( isset( $item['displaytitle'] ) && $item['displaytitle'] != '' ) {
 257+ echo htmlspecialchars( $item['displaytitle'] );
258258 } else {
259 - echo htmlspecialchars($item['title']);
 259+ echo htmlspecialchars( $item['title'] );
260260 } ?>
261261 </span>
262262 </li>
263 - <?php } elseif ($item['type'] == 'chapter') { ?>
 263+ <?php } elseif ( $item['type'] == 'chapter' ) { ?>
264264 <li id="item-<?php echo intval( $index ) ?>" class="chapter" style="margin-top:0.3em;">
265 - <a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'remove_item', 'index=' => $index))) ?>" title="<?php $this->msg('coll-remove') ?>"><img src="<?php echo htmlspecialchars($mediapath . "remove.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-remove') ?>" /></a>
 265+ <a onclick="return coll_remove_item(<?php echo intval( $index ) ?>)" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'remove_item', 'index=' => $index ) ) ) ?>" title="<?php $this->msg( 'coll-remove' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "remove.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-remove' ) ?>" /></a>
266266 <noscript>
267 - <?php if ($index == 0) { ?>
268 - <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" />
 267+ <?php if ( $index == 0 ) { ?>
 268+ <img src="<?php echo htmlspecialchars( $mediapath . "trans.png" ) ?>" width="10" height="10" alt="" />
269269 <?php } else { ?>
270 - <a onclick="return coll_move_item(<?php echo intval( $index ) . ', -1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'move_item', 'delta' => '-1', 'index' => $index))) ?>" title="<?php $this->msg('coll-move_up') ?>"><img src="<?php echo htmlspecialchars($mediapath . "up.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_up') ?>" /></a>
 270+ <a onclick="return coll_move_item(<?php echo intval( $index ) . ', -1' ?>)" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'move_item', 'delta' => '-1', 'index' => $index ) ) ) ?>" title="<?php $this->msg( 'coll-move_up' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "up.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-move_up' ) ?>" /></a>
271271 <?php }
272 - if ($index == count($this->data['collection']['items']) - 1) { ?>
273 - <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" />
 272+ if ( $index == count( $this->data['collection']['items'] ) - 1 ) { ?>
 273+ <img src="<?php echo htmlspecialchars( $mediapath . "trans.png" ) ?>" width="10" height="10" alt="" />
274274 <?php } else { ?>
275 - <a onclick="return coll_move_item(<?php echo intval( $index ) . ', 1' ?>)" href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'move_item', 'delta' => '1', 'index' => $index))) ?>" title="<?php $this->msg('coll-move_down') ?>"><img src="<?php echo htmlspecialchars($mediapath . "down.png") ?>" width="10" height="10" alt="<?php $this->msg('coll-move_down') ?>" /></a>
 275+ <a onclick="return coll_move_item(<?php echo intval( $index ) . ', 1' ?>)" href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'move_item', 'delta' => '1', 'index' => $index ) ) ) ?>" title="<?php $this->msg( 'coll-move_down' ) ?>"><img src="<?php echo htmlspecialchars( $mediapath . "down.png" ) ?>" width="10" height="10" alt="<?php $this->msg( 'coll-move_down' ) ?>" /></a>
276276 <?php } ?>
277277 </noscript>
278 - <img src="<?php echo htmlspecialchars($mediapath . "trans.png") ?>" width="10" height="10" alt="" />
279 - <strong class="title sortableitem" style="margin-left: 0.2em;"><?php echo htmlspecialchars($item['title']) ?></strong>
280 - <a class="makeVisible" <?php if (!isset($this->data['is_ajax'])) { echo 'style="display:none"'; } ?> onclick="<?php echo htmlspecialchars('return coll_rename_chapter(' . intval($index) . ', ' . Xml::encodeJsVar($item['title']) . ')') ?>" href="javascript:void(0)">[<?php $this->msg('coll-rename') ?>]</a>
 278+ <img src="<?php echo htmlspecialchars( $mediapath . "trans.png" ) ?>" width="10" height="10" alt="" />
 279+ <strong class="title sortableitem" style="margin-left: 0.2em;"><?php echo htmlspecialchars( $item['title'] ) ?></strong>
 280+ <a class="makeVisible" <?php if ( !isset( $this->data['is_ajax'] ) ) { echo 'style="display:none"'; } ?> onclick="<?php echo htmlspecialchars( 'return coll_rename_chapter(' . intval( $index ) . ', ' . Xml::encodeJsVar( $item['title'] ) . ')' ) ?>" href="javascript:void(0)">[<?php $this->msg( 'coll-rename' ) ?>]</a>
281281 </li>
282282 <?php }
283283 } ?>
@@ -296,14 +296,14 @@
297297 function execute() {
298298 ?>
299299
300 -<?php $this->msgWiki('coll-load_overwrite_text'); ?>
 300+<?php $this->msgWiki( 'coll-load_overwrite_text' ); ?>
301301
302 -<form action="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book')) ?>" method="post">
303 - <input name="overwrite" type="submit" value="<?php $this->msg('coll-overwrite') ?>" />
304 - <input name="append" type="submit" value="<?php $this->msg('coll-append') ?>" />
305 - <input name="cancel" type="submit" value="<?php $this->msg('coll-cancel') ?>" />
 302+<form action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post">
 303+ <input name="overwrite" type="submit" value="<?php $this->msg( 'coll-overwrite' ) ?>" />
 304+ <input name="append" type="submit" value="<?php $this->msg( 'coll-append' ) ?>" />
 305+ <input name="cancel" type="submit" value="<?php $this->msg( 'coll-cancel' ) ?>" />
306306 <input name="bookcmd" type="hidden" value="load_collection" />
307 - <input name="colltitle" type="hidden" value="<?php echo htmlspecialchars($this->data['title']->getPrefixedText()) ?>" />
 307+ <input name="colltitle" type="hidden" value="<?php echo htmlspecialchars( $this->data['title']->getPrefixedText() ) ?>" />
308308 </form>
309309
310310 <?php
@@ -318,17 +318,17 @@
319319 function execute() {
320320 ?>
321321
322 -<h2><span class="mw-headline"><?php $this->msg('coll-overwrite_title') ?></span></h2>
 322+<h2><span class="mw-headline"><?php $this->msg( 'coll-overwrite_title' ) ?></span></h2>
323323
324 -<p><?php echo $GLOBALS['wgParser']->parse(wfMsgNoTrans('coll-overwrite_text', $this->data['title']->getPrefixedText()), $GLOBALS['wgTitle'], $GLOBALS['wgOut']->parserOptions(), true)->getText() ?></p>
 324+<p><?php echo $GLOBALS['wgParser']->parse( wfMsgNoTrans( 'coll-overwrite_text', $this->data['title']->getPrefixedText() ), $GLOBALS['wgTitle'], $GLOBALS['wgOut']->parserOptions(), true )->getText() ?></p>
325325
326 -<form action="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book')) ?>" method="post">
327 - <input name="overwrite" type="submit" value="<?php $this->msg('coll-yes') ?>" />
328 - <input name="abort" type="submit" value="<?php $this->msg('coll-no') ?>" />
329 - <input name="pcollname" type="hidden" value="<?php echo htmlspecialchars($this->data['pcollname']) ?>" />
330 - <input name="ccollname" type="hidden" value="<?php echo htmlspecialchars($this->data['ccollname']) ?>" />
331 - <input name="colltype" type="hidden" value="<?php echo htmlspecialchars($this->data['colltype']) ?>" />
332 - <input name="token" type="hidden" value="<?php echo htmlspecialchars($GLOBALS['wgUser']->editToken()) ?>" />
 326+<form action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" method="post">
 327+ <input name="overwrite" type="submit" value="<?php $this->msg( 'coll-yes' ) ?>" />
 328+ <input name="abort" type="submit" value="<?php $this->msg( 'coll-no' ) ?>" />
 329+ <input name="pcollname" type="hidden" value="<?php echo htmlspecialchars( $this->data['pcollname'] ) ?>" />
 330+ <input name="ccollname" type="hidden" value="<?php echo htmlspecialchars( $this->data['ccollname'] ) ?>" />
 331+ <input name="colltype" type="hidden" value="<?php echo htmlspecialchars( $this->data['colltype'] ) ?>" />
 332+ <input name="token" type="hidden" value="<?php echo htmlspecialchars( $GLOBALS['wgUser']->editToken() ) ?>" />
333333 <input name="bookcmd" type="hidden" value="save_collection" />
334334 </form>
335335
@@ -345,21 +345,21 @@
346346 ?>
347347
348348
349 -<span style="display:none" id="renderingStatusText"><?php echo wfMsg('coll-rendering_status', '%PARAM%') ?></span>
350 -<span style="display:none" id="renderingArticle"><?php echo ' ' . wfMsg('coll-rendering_article', '%PARAM%') ?></span>
351 -<span style="display:none" id="renderingPage"><?php echo ' ' . wfMsg('coll-rendering_page', '%PARAM%') ?></span>
 349+<span style="display:none" id="renderingStatusText"><?php echo wfMsg( 'coll-rendering_status', '%PARAM%' ) ?></span>
 350+<span style="display:none" id="renderingArticle"><?php echo ' ' . wfMsg( 'coll-rendering_article', '%PARAM%' ) ?></span>
 351+<span style="display:none" id="renderingPage"><?php echo ' ' . wfMsg( 'coll-rendering_page', '%PARAM%' ) ?></span>
352352
353 -<?php echo wfMsg('coll-rendering_text', $GLOBALS['wgLang']->formatNum($this->data['progress']), $this->data['status']) ?>
 353+<?php echo wfMsg( 'coll-rendering_text', number_format( $this->data['progress'], 2, '.', '' ), $this->data['status'] ) ?>
354354
355355 <?php
356356 if ( CollectionSession::isEnabled() ) {
357 - $title_string = wfMsgForContent('coll-rendering_collection_info_text_article');
 357+ $title_string = wfMsgForContent( 'coll-rendering_collection_info_text_article' );
358358 } else {
359 - $title_string = wfMsgForContent('coll-rendering_page_info_text_article');
 359+ $title_string = wfMsgForContent( 'coll-rendering_page_info_text_article' );
360360 }
361 - $t = Title::newFromText($title_string);
 361+ $t = Title::newFromText( $title_string );
362362 if ( $t && $t->exists() ) {
363 - echo $GLOBALS['wgParser']->parse('{{:' . $t . '}}',
 363+ echo $GLOBALS['wgParser']->parse( '{{:' . $t . '}}',
364364 $GLOBALS['wgTitle'],
365365 $GLOBALS['wgOut']->parserOptions(),
366366 true
@@ -376,42 +376,56 @@
377377 function execute() {
378378
379379 echo $GLOBALS['wgParser']->parse(
380 - wfMsgNoTrans('coll-rendering_finished_text', $this->data['download_url']),
 380+ wfMsgNoTrans( 'coll-rendering_finished_text', $this->data['download_url'] ),
381381 $GLOBALS['wgTitle'],
382382 $GLOBALS['wgOut']->parserOptions(),
383383 true
384384 )->getText();
385385
386 -if ($this->data['is_cached']) {
387 - $forceRenderURL = SkinTemplate::makeSpecialUrl('Book', 'bookcmd=forcerender&' . $this->data['query']);
388 - echo wfMsg('coll-is_cached', htmlspecialchars($forceRenderURL));
 386+if ( $this->data['is_cached'] ) {
 387+ $forceRenderURL = SkinTemplate::makeSpecialUrl( 'Book', 'bookcmd=forcerender&' . $this->data['query'] );
 388+ echo wfMsg( 'coll-is_cached', htmlspecialchars( $forceRenderURL ) );
389389 }
390390 echo $GLOBALS['wgParser']->parse(
391 - wfMsgNoTrans('coll-excluded-templates', wfMsgForContent('coll-exclusion_category_title')),
 391+ wfMsgNoTrans( 'coll-excluded-templates', wfMsgForContent( 'coll-exclusion_category_title' ) ),
392392 $GLOBALS['wgTitle'],
393393 $GLOBALS['wgOut']->parserOptions(),
394394 true
395395 )->getText();
396 -$title_string = wfMsgForContent('coll-template_blacklist_title');
397 -$t = Title::newFromText($title_string);
 396+$title_string = wfMsgForContent( 'coll-template_blacklist_title' );
 397+$t = Title::newFromText( $title_string );
398398 if ( $t && $t->exists() ) {
399399 echo $GLOBALS['wgParser']->parse(
400 - wfMsgNoTrans('coll-blacklisted-templates', $title_string),
 400+ wfMsgNoTrans( 'coll-blacklisted-templates', $title_string ),
401401 $GLOBALS['wgTitle'],
402402 $GLOBALS['wgOut']->parserOptions(),
403403 true
404404 )->getText();
405405 }
406 -if ($this->data['return_to']) {
 406+if ( $this->data['return_to'] ) {
407407 // We are doing this the hard way (i.e. via the HTML detour), to prevent
408408 // the parser from replacing [[:Special:Book]] with a selflink.
409 - $t = Title::newFromText($this->data['return_to']);
 409+ $t = Title::newFromText( $this->data['return_to'] );
410410 echo wfMsg(
411411 'coll-return_to_collection',
412 - htmlspecialchars($t->getFullURL()),
413 - htmlspecialchars($this->data['return_to'])
 412+ htmlspecialchars( $t->getFullURL() ),
 413+ htmlspecialchars( $this->data['return_to'] )
414414 );
415415 }
 416+
 417+if ( CollectionSession::isEnabled() ) {
 418+ $title_string = wfMsgForContent( 'coll-finished_collection_info_text_article' );
 419+} else {
 420+ $title_string = wfMsgForContent( 'coll-finished_page_info_text_article' );
 421+}
 422+$t = Title::newFromText( $title_string );
 423+if ( $t && $t->exists() ) {
 424+ echo $GLOBALS['wgParser']->parse( '{{:' . $t . '}}',
 425+ $GLOBALS['wgTitle'],
 426+ $GLOBALS['wgOut']->parserOptions(),
 427+ true
 428+ )->getText();
 429+}
416430 ?>
417431
418432 <?php
@@ -430,7 +444,7 @@
431445 class CollectionSuggestTemplate extends QuickTemplate {
432446 function execute () {
433447 ?>
434 -<script src="<?php echo htmlspecialchars($GLOBALS['wgScriptPath'] . "/extensions/Collection/js/jquery.js?" . $GLOBALS['wgCollectionStyleVersion']) ?>" type="<?php echo $GLOBALS['wgJsMimeType']; ?>"></script>
 448+<script src="<?php echo htmlspecialchars( $GLOBALS['wgScriptPath'] . "/extensions/Collection/js/jquery.js?" . $GLOBALS['wgCollectionStyleVersion'] ) ?>" type="<?php echo $GLOBALS['wgJsMimeType']; ?>"></script>
435449 <script type="<?php echo $GLOBALS['wgJsMimeType']; ?>">
436450 /*<![CDATA[*/
437451 var collection_jQuery = jQuery.noConflict();
@@ -442,13 +456,13 @@
443457 <div id="collectionSuggestStatus" style="text-align: center; margin: 5px auto 10px auto; padding: 0 4px; border: 1px solid #ed9; background-color: #fea; visibility: hidden;">&nbsp;</div>
444458 <table style="width: 100%; border-spacing: 10px;"><tbody><tr>
445459 <td style="padding: 10px; vertical-align: top;">
446 - <form method="post" action="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'suggest'))) ?>">
447 - <strong style="font-size: 1.2em;"><?php $this->msg('coll-suggested_articles') ?></strong>
448 - (<a href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'suggest', 'resetbans' => '1'))) ?>" title="<?php $this->msg('coll-suggest_reset_bans_tooltip') ?>"><?php $this->msg('coll-suggest_reset_bans') ?></a>)
449 - <?php if (count($this->data['proposals']) > 0) { ?>
 460+ <form method="post" action="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'suggest' ) ) ) ?>">
 461+ <strong style="font-size: 1.2em;"><?php $this->msg( 'coll-suggested_articles' ) ?></strong>
 462+ (<a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'suggest', 'resetbans' => '1' ) ) ) ?>" title="<?php $this->msg( 'coll-suggest_reset_bans_tooltip' ) ?>"><?php $this->msg( 'coll-suggest_reset_bans' ) ?></a>)
 463+ <?php if ( count( $this->data['proposals'] ) > 0 ) { ?>
450464 <noscript>
451465 <div style="float: right;">
452 - <input type="submit" value="<?php $this->msg('coll-suggest_add_selected') ?>" name="addselected" />
 466+ <input type="submit" value="<?php $this->msg( 'coll-suggest_add_selected' ) ?>" name="addselected" />
453467 </div>
454468 </noscript>
455469 <?php } ?>
@@ -459,8 +473,8 @@
460474 </td>
461475 <td style="width: 45%; vertical-align: top;">
462476 <div style="padding: 10px; border: 1px solid #aaa; background-color: #f9f9f9;">
463 - <strong style="font-size: 1.2em;"><?php $this->msg('coll-suggest_your_book') ?></strong>
464 - (<span id="coll-num_pages"><?php echo wfMsgExt( 'coll-n_pages', 'parsemag', $GLOBALS['wgLang']->formatNum( $this->data['num_pages'] ) )?></span><?php echo wfMsg( 'pipe-separator' )?><a href="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrl('Book')) ?>" title="<?php $this->msg('coll-show_collection_tooltip') ?>"><?php $this->msg('coll-suggest_show') ?></a>)
 477+ <strong style="font-size: 1.2em;"><?php $this->msg( 'coll-suggest_your_book' ) ?></strong>
 478+ (<span id="coll-num_pages"><?php echo wfMsgExt( 'coll-n_pages', 'parsemag', $GLOBALS['wgLang']->formatNum( $this->data['num_pages'] ) )?></span><?php echo wfMsg( 'pipe-separator' )?><a href="<?php echo htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book' ) ) ?>" title="<?php $this->msg( 'coll-show_collection_tooltip' ) ?>"><?php $this->msg( 'coll-suggest_show' ) ?></a>)
465479 <ul id="collectionMembers" style="list-style: none; margin-left: 0;">
466480 <?php echo $this->getMemberList(); ?>
467481 </ul>
@@ -473,38 +487,38 @@
474488
475489 // needed for Ajax functions
476490 function getProposalList () {
477 - global $wgServer;
 491+ global $wgServer;
478492 global $wgScript;
479493
480494 $mediapath = $GLOBALS['wgScriptPath'] . '/extensions/Collection/images/';
481 - $baseUrl = $wgServer . $wgScript ."/";
 495+ $baseUrl = $wgServer . $wgScript . "/";
482496
483497 $prop = $this->data['proposals'];
484498 $out = '';
485499
486 - $num = count($prop);
487 - if ($num == 0) {
 500+ $num = count( $prop );
 501+ if ( $num == 0 ) {
488502 return "<li>" . wfMsgHtml( 'coll-suggest_empty' ) . "</li>";
489503 }
490504
491 - $artName= $prop[0]['name'];
 505+ $artName = $prop[0]['name'];
492506 $title = Title::newFromText( $artName );
493507 $url = $title->getLocalUrl();
494508 $out .= '<li style="margin-bottom: 10px; padding: 4px 4px; background-color: #ddddff; font-size: 1.4em; font-weight: bold;">';
495 - $out .= '<noscript><input type="checkbox" value="' . htmlspecialchars($artName) . '" name="articleList[]" /></noscript>';
496 - $out .= '<a onclick="' . htmlspecialchars('collectionSuggestCall("AddArticle", ' . Xml::encodeJsVar(array($artName)) . '); return false;') . '" href="' . htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'suggest', 'add' => $artName))) . '" title="' . wfMsgHtml('coll-add_this_page') . '"><img src="' . htmlspecialchars($mediapath . 'silk-add.png') . '" width="16" height="16" alt=""></a> ';
497 - $out .= '<a onclick="' . htmlspecialchars('collectionSuggestCall("BanArticle", ' . Xml::encodeJsVar(array($artName)) . '); return false;') . '" href="' . htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'suggest', 'ban' => $artName))) . '" title="' . wfMsgHtml('coll-suggest_ban_tooltip') . '"><img src="' . htmlspecialchars($mediapath . 'silk-cancel.png') . '" width="16" height="16" alt=""></a> ';
498 - $out .= '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($artName) . '">' . htmlspecialchars($artName) . '</a>';
 509+ $out .= '<noscript><input type="checkbox" value="' . htmlspecialchars( $artName ) . '" name="articleList[]" /></noscript>';
 510+ $out .= '<a onclick="' . htmlspecialchars( 'collectionSuggestCall("AddArticle", ' . Xml::encodeJsVar( array( $artName ) ) . '); return false;' ) . '" href="' . htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'suggest', 'add' => $artName ) ) ) . '" title="' . wfMsgHtml( 'coll-add_this_page' ) . '"><img src="' . htmlspecialchars( $mediapath . 'silk-add.png' ) . '" width="16" height="16" alt=""></a> ';
 511+ $out .= '<a onclick="' . htmlspecialchars( 'collectionSuggestCall("BanArticle", ' . Xml::encodeJsVar( array( $artName ) ) . '); return false;' ) . '" href="' . htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'suggest', 'ban' => $artName ) ) ) . '" title="' . wfMsgHtml( 'coll-suggest_ban_tooltip' ) . '"><img src="' . htmlspecialchars( $mediapath . 'silk-cancel.png' ) . '" width="16" height="16" alt=""></a> ';
 512+ $out .= '<a href="' . htmlspecialchars( $url ) . '" title="' . htmlspecialchars( $artName ) . '">' . htmlspecialchars( $artName ) . '</a>';
499513 $out .= '</li>';
500514
501 - for ($i = 1; $i < $num; $i++) {
502 - $artName= $prop[$i]['name'];
 515+ for ( $i = 1; $i < $num; $i++ ) {
 516+ $artName = $prop[$i]['name'];
503517 $url = $baseUrl . $artName;
504 - $url = str_replace(" ", "_", $url);
 518+ $url = str_replace( " ", "_", $url );
505519 $out .= '<li style="padding-left: 4px;">';
506 - $out .= '<noscript><input type="checkbox" value="' . htmlspecialchars($artName) . '" name="articleList[]" /></noscript>';
507 - $out .= '<a onclick="' . htmlspecialchars('collectionSuggestCall("AddArticle", ' . Xml::encodeJsVar(array($artName)) . '); return false;') . '" href="' . htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array('bookcmd' => 'suggest', 'add' => $artName))) . '" title="' . wfMsgHtml('coll-add_this_page') . '"><img src="' . htmlspecialchars($mediapath . 'silk-add.png') . '" width="16" height="16" alt=""></a> ';
508 - $out .= '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($artName) . '">' . htmlspecialchars($artName) . '</a>';
 520+ $out .= '<noscript><input type="checkbox" value="' . htmlspecialchars( $artName ) . '" name="articleList[]" /></noscript>';
 521+ $out .= '<a onclick="' . htmlspecialchars( 'collectionSuggestCall("AddArticle", ' . Xml::encodeJsVar( array( $artName ) ) . '); return false;' ) . '" href="' . htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'suggest', 'add' => $artName ) ) ) . '" title="' . wfMsgHtml( 'coll-add_this_page' ) . '"><img src="' . htmlspecialchars( $mediapath . 'silk-add.png' ) . '" width="16" height="16" alt=""></a> ';
 522+ $out .= '<a href="' . htmlspecialchars( $url ) . '" title="' . htmlspecialchars( $artName ) . '">' . htmlspecialchars( $artName ) . '</a>';
509523 $out .= '</li>';
510524 }
511525
@@ -517,14 +531,14 @@
518532 $coll = $this->data['collection'];
519533 $out = '';
520534
521 - $num = count($coll['items']);
522 - if ($num == 0) $out .= "<li>" . wfMsgHtml( 'coll-suggest_empty' ) . "</li>";
 535+ $num = count( $coll['items'] );
 536+ if ( $num == 0 ) $out .= "<li>" . wfMsgHtml( 'coll-suggest_empty' ) . "</li>";
523537
524 - for ($i = 0; $i < $num; $i++) {
 538+ for ( $i = 0; $i < $num; $i++ ) {
525539 $artName = $coll['items'][$i]['title'];
526 - if ($coll['items'][$i]['type'] == 'article') {
527 - $out .= '<li><a href="' . htmlspecialchars(SkinTemplate::makeSpecialUrl('Book', array( 'bookcmd' => 'suggest', 'remove' => $artName))) . '" onclick="' . htmlspecialchars('collectionSuggestCall("RemoveArticle", ' . Xml::encodeJsVar(array($artName)) . '); return false;') . '" title="' . wfMsgHtml('coll-remove_this_page') . '"><img src="'.htmlspecialchars($mediapath . 'remove.png').'" width="10" height="10" alt=""></a> ';
528 - $out .= '<a href="' . htmlspecialchars($coll['items'][$i]['url']) . '" title="' . htmlspecialchars($artName) . '">' . htmlspecialchars($artName) . '</a></li>';
 540+ if ( $coll['items'][$i]['type'] == 'article' ) {
 541+ $out .= '<li><a href="' . htmlspecialchars( SkinTemplate::makeSpecialUrl( 'Book', array( 'bookcmd' => 'suggest', 'remove' => $artName ) ) ) . '" onclick="' . htmlspecialchars( 'collectionSuggestCall("RemoveArticle", ' . Xml::encodeJsVar( array( $artName ) ) . '); return false;' ) . '" title="' . wfMsgHtml( 'coll-remove_this_page' ) . '"><img src="' . htmlspecialchars( $mediapath . 'remove.png' ) . '" width="10" height="10" alt=""></a> ';
 542+ $out .= '<a href="' . htmlspecialchars( $coll['items'][$i]['url'] ) . '" title="' . htmlspecialchars( $artName ) . '">' . htmlspecialchars( $artName ) . '</a></li>';
529543 }
530544 }
531545
Property changes on: branches/wmf/1.16wmf4/extensions/Collection
___________________________________________________________________
Name: svn:mergeinfo
532546 - /branches/wmf-deployment/extensions/Collection:60970
/trunk/extensions/Collection:62820-64656
533547 + /branches/wmf-deployment/extensions/Collection:60970
/trunk/extensions/Collection:62820-65974

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65974MFT r64113, bug 22905: incorrect DML regex causing mishandling of <abbr>tstarling00:31, 6 May 2010

Status & tagging log