r36258 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36257‎ | r36258 | r36259 >
Date:14:00, 13 June 2008
Author:jojo
Status:old
Tags:
Comment:
changed help page handling
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)
  • /trunk/extensions/Collection/Collection.i18n.php (modified) (history)
  • /trunk/extensions/Collection/Collection.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.i18n.php
@@ -42,9 +42,8 @@
4343 <strong>Your browser does not support JavaScript or JavaScript has been turned off.
4444 This page will not work correctly, unless JavaScript is enabled.</strong>',
4545 'coll-intro_text' => "You can collect pages, generate and download a PDF file from page collections and save page collections for later use or to share them.
46 -
47 -See the [[{{MediaWiki:Coll-helppage}}|help page about collections]] for more information.",
48 - 'coll-helppage' => 'Help:Collections',
 46+
 47+See the [[$1|help page about collections]] for more information.",
4948 'coll-pdftoobigcat' => 'The category contains more than %PARAM% pages, only the first %PARAM% pages can be added to your collection.
5049 Do you want to add them?',
5150 'coll-my_collection' => 'My Collection',
@@ -108,7 +107,7 @@
109108 [$1 Click here] to download it to your computer.
110109
111110 Not satisfied with the PDF output?
112 -See [[{{MediaWiki:Coll-helppage}}|the help page about collections]] for possibilities to improve it.",
 111+See [[$2|the help page about collections]] for possibilities to improve it.",
113112 'coll-notfound_title' => 'Collection not found',
114113 'coll-notfound_text' => 'Could not find collection page.',
115114 'coll-return_to_collection' => 'Return to <a href="$1">$2</a>',
Index: trunk/extensions/Collection/Collection.php
@@ -55,6 +55,9 @@
5656 /** Template blacklist article */
5757 $wgPDFTemplateBlacklist = 'MediaWiki:PDF Template Blacklist';
5858
 59+/** Help page for the Collection extension */
 60+$wgCollectionHelpPage = 'mw:Extension:Collection/Help';
 61+
5962 # ==============================================================================
6063
6164
Index: trunk/extensions/Collection/Collection.body.php
@@ -507,6 +507,7 @@
508508 }
509509
510510 function generatingPDF() {
 511+ global $wgCollectionHelpPage;
511512 global $wgOut;
512513 global $wgRequest;
513514
@@ -543,7 +544,7 @@
544545 SkinTemplate::makeSpecialUrlSubpage( 'Collection', 'download_pdf/' ),
545546 'collection_id=' . urlencode( $response->collection_id )
546547 );
547 - $wgOut->addWikiMsg( 'coll-pdf_finished_text', wfExpandUrl( $url ) );
 548+ $wgOut->addWikiMsg( 'coll-pdf_finished_text', wfExpandUrl( $url ), $wgCollectionHelpPage );
548549 if ( $return_to ) {
549550 // We are doing this the hard way (i.e. via the HTML detour), to prevent
550551 // the parser from replacing [[:Special:Collection]] with a selflink.
@@ -661,12 +662,13 @@
662663 }
663664
664665 private function outputIntro() {
 666+ global $wgCollectionHelpPage;
665667 global $wgOut;
666668
667669 $wgOut->addHTML( '<noscript>' );
668670 $wgOut->addWikiMsg( 'coll-noscript_text' );
669671 $wgOut->addHTML( '</noscript>' );
670 - $wgOut->addWikiMsg( 'coll-intro_text' );
 672+ $wgOut->addWikiMsg( 'coll-intro_text', $wgCollectionHelpPage );
671673 }
672674
673675 private function outputArticleList() {
@@ -982,6 +984,7 @@
983985 */
984986 static function printPortlet() {
985987 global $wgArticle;
 988+ global $wgCollectionHelpPage;
986989 global $wgTitle;
987990 global $wgOut;
988991
@@ -1059,7 +1062,8 @@
10601063 EOS
10611064 ;
10621065 $helpCollections = wfMsgHtml( 'coll-help_collections' );
1063 - $helpURL = htmlspecialchars( Title::makeTitle( NS_HELP, wfMsg( 'coll-collections' ) )->getFullURL() );
 1066+ $t = Title::newFromText( $wgCollectionHelpPage );
 1067+ $helpURL = htmlspecialchars( $t->getPrefixedUrl() );
10641068 print <<<EOS
10651069 <li><a href="$helpURL">$helpCollections</a></li>
10661070 </ul>

Status & tagging log