r77327 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77326‎ | r77327 | r77328 >
Date:13:28, 26 November 2010
Author:raymond
Status:ok
Tags:
Comment:
Move $wgExtensionCredits out of the setup function
Remove unused $dir
Use new variable for special page alias
Remove unused message
Add a message with a FIXME
Add extension to Translatewiki
Modified paths:
  • /trunk/extensions/SemanticProjectManagement/SemanticProjectManagement.php (modified) (history)
  • /trunk/extensions/SemanticProjectManagement/includes/SPM_Alias.php (modified) (history)
  • /trunk/extensions/SemanticProjectManagement/includes/SPM_Messages.php (modified) (history)
  • /trunk/extensions/Translate/groups/mediawiki-defines.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticProjectManagement/includes/SPM_Messages.php
@@ -13,11 +13,11 @@
1414 /** English
1515 */
1616 $messages['en'] = array(
17 -
18 - 'spm_wbs_link' => 'MS Project XML export',
 17+ 'spm_wbs_link' => 'MS Project XML export',
1918 'spm_printername_wbs' => 'MS Project export',
2019 'spm-name' => 'Semantic Project Management',
21 - 'spm-desc' => 'Project Management Formats for Semantic MediaWiki inline queries',
22 - 'semanticprojectmanagement-desc' => 'Project Management Formats for Semantic MediaWiki inline queries',
23 - 'semanticprojectmanagement' => 'Semantic Project Management'
 20+ 'semanticprojectmanagement-desc' => 'Project Management Formats for Semantic MediaWiki inline queries',
 21+ 'semanticprojectmanagement' => 'Semantic Project Management'
 22+ # 'right-SPMsetup' => '', FIXME: Add a description of this user right. It is shown at [[Special:ListGroupRights]]
2423 );
 24+
Index: trunk/extensions/SemanticProjectManagement/includes/SPM_Alias.php
@@ -4,9 +4,14 @@
55 *
66 * @addtogroup Extensions
77 */
8 -$aliases = array();
 8+$specialPageAliases = array();
99
1010 /** English */
11 -$aliases['en'] = array(
 11+$specialPageAliases['en'] = array(
1212 'SemanticProjectManagement' => array( 'SemanticProjectManagement' ),
1313 );
 14+
 15+/**
 16+ * For backwards compatibility with MediaWiki 1.15 and earlier.
 17+ */
 18+$aliases =& $specialPageAliases;
Index: trunk/extensions/SemanticProjectManagement/SemanticProjectManagement.php
@@ -32,8 +32,17 @@
3333 die( 'Not an entry point.' );
3434 }
3535
36 -define( 'SPM_VERSION', '0.3' );
 36+define( 'SPM_VERSION', '0.3.1' );
3737
 38+$wgExtensionCredits['specialpage'][] = array(
 39+ 'path' => __FILE__,
 40+ 'name' => 'Semantic Project Management',
 41+ 'version' => SPM_VERSION,
 42+ 'author' => array( 'Frank Dengler, Jonas Bissinger'),
 43+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Project_Management',
 44+ 'descriptionmsg' => 'semanticprojectmanagement-desc'
 45+);
 46+
3847 $spmgScriptPath = $wgScriptPath . '/extensions/SemanticProjectManagement';
3948 $spmgIP = $IP . '/extensions/SemanticProjectManagement';
4049
@@ -59,22 +68,13 @@
6069 $spmgFormats = array( 'ganttchart','wbs');
6170
6271 function spmfSetup() {
63 - global $spmgFormats, $wgExtensionCredits, $wgOut;
 72+ global $spmgFormats, $wgOut;
6473
65 - foreach ( $spmgFormats as $fn ) spmfInitFormat( $fn );
 74+ foreach ( $spmgFormats as $fn ) {
 75+ spmfInitFormat( $fn );
 76+ }
6677
6778 $formats_list = implode( ', ', $spmgFormats );
68 - $wgExtensionCredits['specialpage'][] = array(
69 - 'path' => __FILE__,
70 - 'name' => 'Semantic Project Management',
71 - 'version' => SPM_VERSION,
72 - 'author' => array( 'Frank Dengler, Jonas Bissinger'),
73 - 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Project_Management',
74 - 'descriptionmsg' => 'semanticprojectmanagement-desc'
75 - );
76 -
77 - $dir = dirname(__FILE__);
78 -
7979 }
8080
8181 function spmfInitFormat( $format ) {
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt
@@ -1073,6 +1073,10 @@
10741074 optional = smw_csv_link
10751075 optional = smw_json_link
10761076
 1077+Semantic Project Management
 1078+file = SemanticProjectManagement/includes/SPM_Messages.php
 1079+aliasfile = SemanticProjectManagement/includes/SPM_Alias.php
 1080+
10771081 Semantic Result Formats
10781082 file = SemanticResultFormats/SRF_Messages.php
10791083 magicfile = SemanticResultFormats/SRF_Magic.php

Status & tagging log