Revision: 43673
Author:   jojo
Date:     2008-11-18 13:47:11 +0000 (Tue, 18 Nov 2008)

Log Message:
-----------
fix for http://code.pediapress.com/wiki/ticket/365: use wfMsgForContent() and 
system messages for template blacklist, template exclusion category and print 
template prefix.

Modified Paths:
--------------
    trunk/extensions/Collection/Collection.body.php
    trunk/extensions/Collection/Collection.i18n.php
    trunk/extensions/Collection/Collection.php
    trunk/extensions/Collection/README.txt

Modified: trunk/extensions/Collection/Collection.body.php
===================================================================
--- trunk/extensions/Collection/Collection.body.php     2008-11-18 12:54:53 UTC 
(rev 43672)
+++ trunk/extensions/Collection/Collection.body.php     2008-11-18 13:47:11 UTC 
(rev 43673)
@@ -672,8 +672,6 @@
        function renderCollection( $collection, $referrer, $writer ) {
                global $wgOut;
                global $wgContLang;
-               global $wgCollectionTemplateExclusionCategory;
-               global $wgPDFTemplateBlacklist;
                global $wgServer;
                global $wgScriptPath;
                global $wgScriptExtension;
@@ -686,8 +684,9 @@
                        'metabook' => $this->buildJSONCollection( $collection ),
                        'base_url' => $wgServer . $wgScriptPath,
                        'script_extension' => $wgScriptExtension,
-                       'template_blacklist' => $wgPDFTemplateBlacklist,
-                       'template_exclusion_category' => 
$wgCollectionTemplateExclusionCategory,
+                       'template_blacklist' => wfMsgForContent( 
'coll-template_blacklist_title' ),
+                       'template_exclusion_category' => wfMsgForContent( 
'coll-exclusion_category_title' ),
+                       'print_template_prefix' => wfMsgForContent( 
'coll-print_template_prefix' ),
                        'language' => $wgContLang->getCode(),
                        'writer' => $writer,
                ) );
@@ -709,8 +708,6 @@
        function forceRenderCollection() {
                global $wgOut;
                global $wgContLang;
-               global $wgCollectionTemplateExclusionCategory;
-               global $wgPDFTemplateBlacklist;
                global $wgRequest;
                global $wgServer;
                global $wgScriptPath;
@@ -723,8 +720,9 @@
                        'collection_id' => $collectionID,
                        'base_url' => $wgServer . $wgScriptPath,
                        'script_extension' => $wgScriptExtension,
-                       'template_blacklist' => $wgPDFTemplateBlacklist,
-                       'template_exclusion_category' => 
$wgCollectionTemplateExclusionCategory,
+                       'template_blacklist' => wfMsgForContent( 
'coll-template_blacklist_title' ),
+                       'template_exclusion_category' => wfMsgForContent( 
'coll-exclusion_category_title' ),
+                       'print_template_prefix' => wfMsgForContent( 
'coll-print_template_prefix' ),
                        'language' => $wgContLang->getCode(),
                        'writer' => $writer,
                        'force_render' => true
@@ -865,8 +863,6 @@
                global $wgScriptPath;
                global $wgScriptExtension;
                global $wgOut;
-               global $wgPDFTemplateBlacklist;
-               global $wgCollectionTemplateExclusionCategory;
                
                $json = new Services_JSON();
 
@@ -879,8 +875,9 @@
                        'metabook' => $this->buildJSONCollection( $collection ),
                        'base_url' => $wgServer . $wgScriptPath,
                        'script_extension' => $wgScriptExtension,
-                       'template_blacklist' => $wgPDFTemplateBlacklist,
-                       'template_exclusion_category' => 
$wgCollectionTemplateExclusionCategory,
+                       'template_blacklist' => wfMsgForContent( 
'coll-template_blacklist_title' ),
+                       'template_exclusion_category' => wfMsgForContent( 
'coll-exclusion_category_title' ),
+                       'print_template_prefix' => wfMsgForContent( 
'coll-print_template_prefix' ),
                        'pod_api_url' => 
$this->mPODPartners[$partner]['posturl'],
                ) );
                if ( !$response ) {

Modified: trunk/extensions/Collection/Collection.i18n.php
===================================================================
--- trunk/extensions/Collection/Collection.i18n.php     2008-11-18 12:54:53 UTC 
(rev 43672)
+++ trunk/extensions/Collection/Collection.i18n.php     2008-11-18 13:47:11 UTC 
(rev 43673)
@@ -27,6 +27,9 @@
        'coll-desc'                       => '[[Special:Collection|Collect 
pages]], generate PDFs',
        'coll-collection'                 => 'Collection',
        'coll-collections'                => 'Collections',
+       'coll-exclusion_category_title'   => 'Exclude in print',
+       'coll-template_blacklist_title'   => 'MediaWiki:PDF Template Blacklist',
+       'coll-print_template_prefix'      => 'Print',
        'coll-portlet_title'              => 'Create a book',
        'coll-add_page'                   => 'Add wiki page',
        'coll-remove_page'                => 'Remove wiki page',

Modified: trunk/extensions/Collection/Collection.php
===================================================================
--- trunk/extensions/Collection/Collection.php  2008-11-18 12:54:53 UTC (rev 
43672)
+++ trunk/extensions/Collection/Collection.php  2008-11-18 13:47:11 UTC (rev 
43673)
@@ -77,12 +77,6 @@
 /** HTTP(s) URL pointing to license in wikitext format: */
 $wgLicenseURL = null;
 
-/** Template blacklist article */
-$wgPDFTemplateBlacklist = 'MediaWiki:PDF Template Blacklist';
-
-/** Template exclusion category */
-$wgCollectionTemplateExclusionCategory = "Exclude in print";
-
 /** List of available download formats,
     as mapping of mwlib writer to format name */
 $wgCollectionFormats = array(

Modified: trunk/extensions/Collection/README.txt
===================================================================
--- trunk/extensions/Collection/README.txt      2008-11-18 12:54:53 UTC (rev 
43672)
+++ trunk/extensions/Collection/README.txt      2008-11-18 13:47:11 UTC (rev 
43673)
@@ -168,28 +168,8 @@
    
    If your MediaWiki contains articles with different licenses, make sure
    that each article contains the name of the license and set $wgLicenseURL
-   to an article that contains all needed licenses.
+   to an article that contains all needed licenses.   
    
-  *$wgCollectionTemplateExclusionCategory (string)*
-   Name of a category which marks templates (or transcluded articles) to be
-   excluded for document generation.
-   
-   Default value is ``"Exclude in print"``
-  
-  *$wgPDFTemplateBlackList (string)*
-   Title of an article containing blacklisted templates, i.e. templates that
-   should be excluded for document generation.
-
-   Default value is ``"MediaWiki:PDF Template Blacklist"``
-
-   The template blacklist page should contain a list of links to the
-   blacklisted templates in the following form::
-   
-        * [[Template:Templatename]]
-        * [[Template:SomeOtherTemplatename]]
-        
-   
-   
 * This step is needed for MediaWiki version < 1.14 (at the time of writing
   version 1.14 has not been released):
   



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to