[svn r43673] fix for http://code.pediapress.com/wiki/ticket/365: use wfMsgForContent() and system messages for template blacklist, template exclusion category and print template prefix. Collection svn.43673
authorjojo
Tue Nov 18 14:47:11 2008 +0100 (6 weeks ago)
branchCollection
changeset 4032b7ee08e284a
parent 402342709d58886
child 404bc595494a855
[svn r43673] fix for http://code.pediapress.com/wiki/ticket/365: use wfMsgForContent() and system messages for template blacklist, template exclusion category and print template prefix.
Collection.body.php
Collection.i18n.php
Collection.php
README.txt
       1 --- a/Collection.body.php	Tue Nov 18 13:29:11 2008 +0100
       2 +++ b/Collection.body.php	Tue Nov 18 14:47:11 2008 +0100
       3 @@ -672,8 +672,6 @@
       4  	function renderCollection( $collection, $referrer, $writer ) {
       5  		global $wgOut;
       6  		global $wgContLang;
       7 -		global $wgCollectionTemplateExclusionCategory;
       8 -		global $wgPDFTemplateBlacklist;
       9  		global $wgServer;
      10  		global $wgScriptPath;
      11  		global $wgScriptExtension;
      12 @@ -686,8 +684,9 @@
      13  			'metabook' => $this->buildJSONCollection( $collection ),
      14  			'base_url' => $wgServer . $wgScriptPath,
      15  			'script_extension' => $wgScriptExtension,
      16 -			'template_blacklist' => $wgPDFTemplateBlacklist,
      17 -			'template_exclusion_category' => $wgCollectionTemplateExclusionCategory,
      18 +			'template_blacklist' => wfMsgForContent( 'coll-template_blacklist_title' ),
      19 +			'template_exclusion_category' => wfMsgForContent( 'coll-exclusion_category_title' ),
      20 +			'print_template_prefix' => wfMsgForContent( 'coll-print_template_prefix' ),
      21  			'language' => $wgContLang->getCode(),
      22  			'writer' => $writer,
      23  		) );
      24 @@ -709,8 +708,6 @@
      25  	function forceRenderCollection() {
      26  		global $wgOut;
      27  		global $wgContLang;
      28 -		global $wgCollectionTemplateExclusionCategory;
      29 -		global $wgPDFTemplateBlacklist;
      30  		global $wgRequest;
      31  		global $wgServer;
      32  		global $wgScriptPath;
      33 @@ -723,8 +720,9 @@
      34  			'collection_id' => $collectionID,
      35  			'base_url' => $wgServer . $wgScriptPath,
      36  			'script_extension' => $wgScriptExtension,
      37 -			'template_blacklist' => $wgPDFTemplateBlacklist,
      38 -			'template_exclusion_category' => $wgCollectionTemplateExclusionCategory,
      39 +			'template_blacklist' => wfMsgForContent( 'coll-template_blacklist_title' ),
      40 +			'template_exclusion_category' => wfMsgForContent( 'coll-exclusion_category_title' ),
      41 +			'print_template_prefix' => wfMsgForContent( 'coll-print_template_prefix' ),
      42  			'language' => $wgContLang->getCode(),
      43  			'writer' => $writer,
      44  			'force_render' => true
      45 @@ -865,8 +863,6 @@
      46  		global $wgScriptPath;
      47  		global $wgScriptExtension;
      48  		global $wgOut;
      49 -		global $wgPDFTemplateBlacklist;
      50 -		global $wgCollectionTemplateExclusionCategory;
      51  		
      52  		$json = new Services_JSON();
      53  
      54 @@ -879,8 +875,9 @@
      55  			'metabook' => $this->buildJSONCollection( $collection ),
      56  			'base_url' => $wgServer . $wgScriptPath,
      57  			'script_extension' => $wgScriptExtension,
      58 -			'template_blacklist' => $wgPDFTemplateBlacklist,
      59 -			'template_exclusion_category' => $wgCollectionTemplateExclusionCategory,
      60 +			'template_blacklist' => wfMsgForContent( 'coll-template_blacklist_title' ),
      61 +			'template_exclusion_category' => wfMsgForContent( 'coll-exclusion_category_title' ),
      62 +			'print_template_prefix' => wfMsgForContent( 'coll-print_template_prefix' ),
      63  			'pod_api_url' => $this->mPODPartners[$partner]['posturl'],
      64  		) );
      65  		if ( !$response ) {
     1.1 --- a/Collection.i18n.php	Tue Nov 18 13:29:11 2008 +0100
     1.2 +++ b/Collection.i18n.php	Tue Nov 18 14:47:11 2008 +0100
     1.3 @@ -27,6 +27,9 @@
     1.4  	'coll-desc'                       => '[[Special:Collection|Collect pages]], generate PDFs',
     1.5  	'coll-collection'                 => 'Collection',
     1.6  	'coll-collections'                => 'Collections',
     1.7 +	'coll-exclusion_category_title'   => 'Exclude in print',
     1.8 +	'coll-template_blacklist_title'   => 'MediaWiki:PDF Template Blacklist',
     1.9 +	'coll-print_template_prefix'      => 'Print',
    1.10  	'coll-portlet_title'              => 'Create a book',
    1.11  	'coll-add_page'                   => 'Add wiki page',
    1.12  	'coll-remove_page'                => 'Remove wiki page',
     2.1 --- a/Collection.php	Tue Nov 18 13:29:11 2008 +0100
     2.2 +++ b/Collection.php	Tue Nov 18 14:47:11 2008 +0100
     2.3 @@ -77,12 +77,6 @@
     2.4  /** HTTP(s) URL pointing to license in wikitext format: */
     2.5  $wgLicenseURL = null;
     2.6  
     2.7 -/** Template blacklist article */
     2.8 -$wgPDFTemplateBlacklist = 'MediaWiki:PDF Template Blacklist';
     2.9 -
    2.10 -/** Template exclusion category */
    2.11 -$wgCollectionTemplateExclusionCategory = "Exclude in print";
    2.12 -
    2.13  /** List of available download formats,
    2.14      as mapping of mwlib writer to format name */
    2.15  $wgCollectionFormats = array(
    2.16 @@ -98,8 +92,8 @@
    2.17  	'name' => 'Collection',
    2.18  	'version' => '1.1',
    2.19  	'author' => 'PediaPress GmbH',
    2.20 -	'svn-date' => '$LastChangedDate: 2008-11-17 18:26:26 +0100 (Mon, 17 Nov 2008) $',
    2.21 -	'svn-revision' => '$LastChangedRevision: 43610 $',
    2.22 +	'svn-date' => '$LastChangedDate: 2008-11-18 14:47:11 +0100 (Tue, 18 Nov 2008) $',
    2.23 +	'svn-revision' => '$LastChangedRevision: 43673 $',
    2.24  	'url' => 'http://www.mediawiki.org/wiki/Extension:Collection',
    2.25  	'description' => 'Collect articles, generate PDFs',
    2.26  	'descriptionmsg' => 'coll-desc',
     3.1 --- a/README.txt	Tue Nov 18 13:29:11 2008 +0100
     3.2 +++ b/README.txt	Tue Nov 18 14:47:11 2008 +0100
     3.3 @@ -168,27 +168,7 @@
     3.4     
     3.5     If your MediaWiki contains articles with different licenses, make sure
     3.6     that each article contains the name of the license and set $wgLicenseURL
     3.7 -   to an article that contains all needed licenses.
     3.8 -   
     3.9 -  *$wgCollectionTemplateExclusionCategory (string)*
    3.10 -   Name of a category which marks templates (or transcluded articles) to be
    3.11 -   excluded for document generation.
    3.12 -   
    3.13 -   Default value is ``"Exclude in print"``
    3.14 -  
    3.15 -  *$wgPDFTemplateBlackList (string)*
    3.16 -   Title of an article containing blacklisted templates, i.e. templates that
    3.17 -   should be excluded for document generation.
    3.18 -
    3.19 -   Default value is ``"MediaWiki:PDF Template Blacklist"``
    3.20 -
    3.21 -   The template blacklist page should contain a list of links to the
    3.22 -   blacklisted templates in the following form::
    3.23 -   
    3.24 -	 * [[Template:Templatename]]
    3.25 -	 * [[Template:SomeOtherTemplatename]]
    3.26 -	 
    3.27 -   
    3.28 +   to an article that contains all needed licenses.   
    3.29     
    3.30  * This step is needed for MediaWiki version < 1.14 (at the time of writing
    3.31    version 1.14 has not been released):