r66959 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66958‎ | r66959 | r66960 >
Date:13:13, 27 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Revert r66934 - need to be compatible with mw 1.15 for 1.5.1 release
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Bool.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Linear.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Number.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Property.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Temperature.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Time.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Types.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_URI.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_WikiPage.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Auto.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_CSV.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Embedded.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_JSONlink.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_List.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_RSSlink.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Table.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QueryParser.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QueryPrinter.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_RefreshTab.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_ConceptPage.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_PropertyPage.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_TypePage.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Query.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/Export/SMW_SpecialOWLExport.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_QueryPage.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialProperties.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialTypes.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialUnusedProperties.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialWantedProperties.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SMWAdmin/SMW_SpecialSMWAdmin.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/Statistics/SMW_SpecialStatistics.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/URIResolver/SMW_SpecialURIResolver.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/Statistics/SMW_SpecialStatistics.php
@@ -39,6 +39,8 @@
4040 )
4141 );
4242
 43+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
 44+
4345 $out = wfMsgExt( 'smw_semstats_text', array( 'parse' ),
4446 $wgLang->formatNum( $semanticStatistics['PROPUSES'] ), $wgLang->formatNum( $semanticStatistics['USEDPROPS'] ),
4547 $wgLang->formatNum( $propertyPageAmount ), $wgLang->formatNum( $semanticStatistics['DECLPROPS'] )
Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php
@@ -30,6 +30,7 @@
3131 */
3232 public function __construct() {
3333 parent::__construct( 'Ask' );
 34+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
3435 }
3536
3637 function execute( $p ) {
Index: trunk/extensions/SemanticMediaWiki/specials/SMWAdmin/SMW_SpecialSMWAdmin.php
@@ -28,6 +28,7 @@
2929 */
3030 public function __construct() {
3131 parent::__construct( 'SMWAdmin', 'delete' );
 32+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
3233 }
3334
3435 public function execute( $par ) {
Index: trunk/extensions/SemanticMediaWiki/specials/Export/SMW_SpecialOWLExport.php
@@ -113,6 +113,8 @@
114114 }
115115 }
116116
 117+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
 118+
117119 // nothing exported yet; show user interface:
118120 $html = '<form name="tripleSearch" action="" method="POST">' . "\n" .
119121 '<p>' . wfMsg( 'smw_exportrdf_docu' ) . "</p>\n" .
Index: trunk/extensions/SemanticMediaWiki/specials/URIResolver/SMW_SpecialURIResolver.php
@@ -22,6 +22,7 @@
2323 */
2424 public function __construct() {
2525 parent::__construct( 'URIResolver', '', false );
 26+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
2627 }
2728
2829 function execute( $query ) {
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialWantedProperties.php
@@ -74,6 +74,7 @@
7575 }
7676
7777 function getPageHeader() {
 78+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
7879 return '<p>' . wfMsg( 'smw_wantedproperties_docu' ) . "</p><br />\n";
7980 }
8081
@@ -84,6 +85,7 @@
8586 } else {
8687 $proplink = $result[0]->getLongHTMLText( $skin );
8788 }
 89+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
8890 return wfMsgExt( 'smw_wantedproperty_template', array( 'parsemag' ), $proplink, $result[1] );
8991 }
9092
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialUnusedProperties.php
@@ -76,6 +76,7 @@
7777 }
7878
7979 function getPageHeader() {
 80+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
8081 return '<p>' . wfMsg( 'smw_unusedproperties_docu' ) . "</p><br />\n";
8182 }
8283
@@ -84,6 +85,7 @@
8586 $proplink = $skin->makeKnownLinkObj( $result->getWikiPageValue()->getTitle(), $result->getWikiValue() );
8687 $types = smwfGetStore()->getPropertyValues( $result->getWikiPageValue(), SMWPropertyValue::makeProperty( '_TYPE' ) ); // TODO: do not bypass SMWDataValueFactory!
8788 $errors = array();
 89+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
8890 if ( count( $types ) >= 1 ) {
8991 $typestring = current( $types )->getLongHTMLText( $skin );
9092 } else {
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_QueryPage.php
@@ -57,6 +57,7 @@
5858
5959 // if list is empty, show it
6060 if ( $num == 0 ) {
 61+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
6162 $wgOut->addHTML( '<p>' . wfMsgHTML( 'specialpage-empty' ) . '</p>' );
6263 return;
6364 }
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialTypes.php
@@ -71,6 +71,7 @@
7272 }
7373
7474 function getPageHeader() {
 75+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
7576 return '<p>' . wfMsg( 'smw_types_docu' ) . "</p><br />\n";
7677 }
7778
@@ -107,6 +108,7 @@
108109 $tv = SMWDataValueFactory::newTypeIDValue( '__typ', $titletext );
109110 $info = array();
110111 $error = array();
 112+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
111113 if ( $tv->isAlias() ) { // print the type title as found, long text would (again) print the alias
112114 $ttitle = Title::makeTitle( SMW_NS_TYPE, $titletext );
113115 $link = $skin->makeKnownLinkObj( $ttitle, $ttitle->getText() ); // aliases are only found if the page exists
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialProperties.php
@@ -74,6 +74,7 @@
7575 }
7676
7777 function getPageHeader() {
 78+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
7879 return '<p>' . wfMsg( 'smw_properties_docu' ) . "</p><br />\n";
7980 }
8081
@@ -81,6 +82,7 @@
8283 global $wgLang;
8384 $typestring = '';
8485 $errors = array();
 86+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
8587 if ( $result[0]->isUserDefined() && ( $result[1] <= 5 ) ) {
8688 $errors[] = wfMsg( 'smw_propertyhardlyused' );
8789 }
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php
@@ -38,6 +38,7 @@
3939 public function __construct() {
4040 global $smwgBrowseShowAll;
4141 parent::__construct( 'Browse', '', true, false, 'default', true );
 42+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
4243 if ( $smwgBrowseShowAll ) {
4344 SMWSpecialBrowse::$incomingvaluescount = 21;
4445 SMWSpecialBrowse::$incomingpropertiescount = - 1;
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php
@@ -26,6 +26,7 @@
2727 */
2828 public function __construct() {
2929 parent::__construct( 'PageProperty', '', false );
 30+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
3031 }
3132
3233 public function execute( $query ) {
@@ -56,6 +57,7 @@
5758
5859 // Produce output
5960 $html = '';
 61+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
6062 if ( ( $propname == '' ) ) { // no property given, show a message
6163 $html .= wfMsg( 'smw_pp_docu' ) . "\n";
6264 } else { // property given, find and display results
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php
@@ -49,6 +49,7 @@
5050 */
5151 public function __construct() {
5252 parent::__construct( 'SearchByProperty' );
 53+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
5354 }
5455
5556 /**
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryParser.php
@@ -115,6 +115,7 @@
116116 * The call-by-ref parameter $label is used to append any label strings found.
117117 */
118118 protected function getSubqueryDescription( &$setNS, &$label ) {
 119+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
119120 $conjunction = null; // used for the current inner conjunction
120121 $disjuncts = array(); // (disjunctive) array of subquery conjunctions
121122 $hasNamespaces = false; // does the current $conjnuction have its own namespace restrictions?
@@ -264,6 +265,7 @@
265266 * string.
266267 */
267268 protected function getPropertyDescription( $propertyname, &$setNS, &$label ) {
 269+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
268270 $this->readChunk(); // consume separator ":=" or "::"
269271 // first process property chain syntax (e.g. "property1.property2::value"), escaped by initial " ":
270272 $propertynames = ( $propertyname { 0 } == ' ' ) ? array( $propertyname ):explode( '.', $propertyname );
@@ -370,6 +372,7 @@
371373 * passed as a parameter.
372374 */
373375 protected function getArticleDescription( $firstchunk, &$setNS, &$label ) {
 376+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
374377 $chunk = $firstchunk;
375378 $result = null;
376379 $continue = true;
@@ -409,6 +412,7 @@
410413 }
411414
412415 protected function finishLinkDescription( $chunk, $hasNamespaces, $result, &$setNS, &$label ) {
 416+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
413417 if ( $result === null ) { // no useful information or concrete error found
414418 $this->m_errors[] = wfMsgForContent( 'smw_badqueryatom' );
415419 } elseif ( !$hasNamespaces && $setNS && ( $this->m_defaultns !== null ) ) {
@@ -520,6 +524,7 @@
521525 * also be changed (if it was non-NULL).
522526 */
523527 protected function addDescription( $curdesc, $newdesc, $conjunction = true ) {
 528+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
524529 $notallowedmessage = 'smw_noqueryfeature';
525530 if ( $newdesc instanceof SMWSomeProperty ) {
526531 $allowed = $this->m_queryfeatures & SMW_PROPERTY_QUERY;
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_RSSlink.php
@@ -41,6 +41,7 @@
4242 }
4343
4444 public function getName() {
 45+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
4546 return wfMsg( 'smw_printername_rss' );
4647 }
4748
@@ -53,6 +54,7 @@
5455 $this->m_title = $wgSitename;
5556 }
5657 if ( $this->m_description == '' ) {
 58+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
5759 $this->m_description = wfMsg( 'smw_rss_description', $wgSitename );
5860 }
5961
@@ -115,6 +117,7 @@
116118 if ( $this->getSearchLabel( $outputmode ) ) {
117119 $label = $this->getSearchLabel( $outputmode );
118120 } else {
 121+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
119122 $label = wfMsgForContent( 'smw_rss_link' );
120123 }
121124 $link = $res->getQueryLink( $label );
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Temperature.php
@@ -49,6 +49,7 @@
5050 break;
5151 default: // unsupported unit
5252 // create error here, assuming that our temperature units should not be augmented by unknown units
 53+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
5354 $this->addError( wfMsgForContent( 'smw_unsupportedunit', $this->m_unit ) );
5455 $this->m_unit = $this->m_unitin;
5556 break;
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Factbox.php
@@ -42,6 +42,7 @@
4343 // actually build the Factbox text:
4444 $text = '';
4545 if ( wfRunHooks( 'smwShowFactbox', array( &$text, $semdata ) ) ) {
 46+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
4647 SMWOutputs::requireHeadItem( SMW_HEADER_STYLE );
4748 $rdflink = SMWInfolink::newInternalLink( wfMsgForContent( 'smw_viewasrdf' ), $wgContLang->getNsText( NS_SPECIAL ) . ':ExportRDF/' . $semdata->getSubject()->getWikiValue(), 'rdflink' );
4849
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_JSONlink.php
@@ -31,6 +31,7 @@
3232 }
3333
3434 public function getName() {
 35+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
3536 return wfMsg( 'smw_printername_json' );
3637 }
3738
@@ -144,6 +145,7 @@
145146 if ( $this->getSearchLabel( $outputmode ) ) {
146147 $label = $this->getSearchLabel( $outputmode );
147148 } else {
 149+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
148150 $label = wfMsgForContent( 'smw_json_link' );
149151 }
150152 $link = $res->getQueryLink( $label );
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Table.php
@@ -14,6 +14,7 @@
1515 class SMWTableResultPrinter extends SMWResultPrinter {
1616
1717 public function getName() {
 18+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
1819 return wfMsg( 'smw_printername_' . $this->mFormat );
1920 }
2021
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_ConceptPage.php
@@ -74,6 +74,7 @@
7575 */
7676 protected function getPages() {
7777 wfProfileIn( __METHOD__ . ' (SMW)' );
 78+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
7879 $r = '';
7980 $ti = htmlspecialchars( $this->mTitle->getText() );
8081 $nav = $this->getNavigationLinks();
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_TypePage.php
@@ -62,6 +62,7 @@
6363 */
6464 protected function getPages() {
6565 wfProfileIn( __METHOD__ . ' (SMW)' );
 66+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
6667 $r = '';
6768 $typevalue = $this->m_typevalue;
6869 if ( $typevalue->isBuiltIn() ) {
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_PropertyPage.php
@@ -77,6 +77,7 @@
7878 */
7979 protected function getPages() {
8080 wfProfileIn( __METHOD__ . ' (SMW)' );
 81+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
8182 $r = '';
8283 $ti = htmlspecialchars( $this->mTitle->getText() );
8384 if ( count( $this->subproperties ) > 0 ) {
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php
@@ -205,6 +205,7 @@
206206 }
207207
208208 if ( $caption == false ) {
 209+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
209210 $caption = ' ' . wfMsgForContent( 'smw_iq_moreresults' ); // The space is right here, not in the QPs!
210211 }
211212
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Query.php
@@ -170,6 +170,7 @@
171171 $log = array();
172172 $this->m_description = $this->m_description->prune( $maxsize, $maxdepth, $log );
173173 if ( count( $log ) > 0 ) {
 174+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
174175 $this->m_errors[] = wfMsgForContent( 'smw_querytoolarge', str_replace( '[', '&#x005B;', implode( ', ' , $log ) ) );
175176 }
176177 }
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_URI.php
@@ -48,6 +48,7 @@
4949 }
5050
5151 protected function parseUserValue( $value ) {
 52+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
5253 $value = trim( $value );
5354 $this->m_url = '';
5455 $this->m_uri = '';
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php
@@ -266,6 +266,7 @@
267267 * Adds links to Admin Links page
268268 **/
269269 function smwfAddToAdminLinks( &$admin_links_tree ) {
 270+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
270271 $data_structure_section = new ALSection( wfMsg( 'smw_adminlinks_datastructure' ) );
271272 // $smw_row = new ALRow( 'smw' );
272273 // $smw_row->addItem( ALItem::newFromSpecialPage( 'Categories' ) );
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Embedded.php
@@ -38,6 +38,7 @@
3939 }
4040
4141 public function getName() {
 42+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
4243 return wfMsg( 'smw_printername_embedded' );
4344 }
4445
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_CSV.php
@@ -36,6 +36,7 @@
3737 }
3838
3939 public function getName() {
 40+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
4041 return wfMsg( 'smw_printername_csv' );
4142 }
4243
@@ -70,6 +71,7 @@
7172 if ( $this->getSearchLabel( $outputmode ) ) {
7273 $label = $this->getSearchLabel( $outputmode );
7374 } else {
 75+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
7476 $label = wfMsgForContent( 'smw_csv_link' );
7577 }
7678
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php
@@ -87,6 +87,7 @@
8888 } elseif ( ( $typeid != '' ) && ( $typeid { 0 } != '_' ) ) { // custom type with linear conversion
8989 $result = new self::$mTypeClasses['__lin']( $typeid );
9090 } else { // type really unknown
 91+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
9192 return new SMWErrorValue( wfMsgForContent( 'smw_unknowntype', $typeid ), $value, $caption );
9293 }
9394
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php
@@ -18,6 +18,7 @@
1919 protected $m_value = '';
2020
2121 protected function parseUserValue( $value ) {
 22+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
2223 if ( $value != '' ) {
2324 $this->m_value = $value;
2425 if ( ( $this->m_typeid != '_txt' ) && ( $this->m_typeid != '_cod' ) && ( strlen( $this->m_value ) > 255 ) ) { // limit size (for DB indexing)
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
@@ -238,6 +238,7 @@
239239 * Adds links to Admin Links page
240240 **/
241241 function smwfAddToAdminLinks( &$admin_links_tree ) {
 242+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
242243 $data_structure_section = new ALSection( wfMsg( 'smw_adminlinks_datastructure' ) );
243244 $smw_row = new ALRow( 'smw' );
244245 $smw_row->addItem( ALItem::newFromSpecialPage( 'Categories' ) );
@@ -312,6 +313,7 @@
313314 */
314315 function smwfShowBrowseLink( $skintemplate ) {
315316 if ( $skintemplate->data['isarticle'] ) {
 317+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
316318 $browselink = SMWInfolink::newBrowsingLink( wfMsg( 'smw_browselink' ),
317319 $skintemplate->data['titleprefixeddbkey'], false );
318320 echo "<li id=\"t-smwbrowselink\">" . $browselink->getHTML() . "</li>";
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Property.php
@@ -310,6 +310,7 @@
311311 $result = SMWDataValueFactory::newTypeIDValue( '__typ' );
312312 $result->setDBkeys( array( $smwgPDefaultType ) );
313313 } else { // many types given, error
 314+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
314315 $result = SMWDataValueFactory::newTypeIDValue( '__typ' );
315316 $result->setDBkeys( array( '__err' ) );
316317 $result->addError( wfMsgForContent( 'smw_manytypes' ) );
@@ -364,6 +365,7 @@
365366 return $text;
366367 } else {
367368 SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP );
 369+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
368370 return '<span class="smwttinline"><span class="smwbuiltin">' . $text .
369371 '</span><span class="smwttcontent">' . wfMsgForContent( 'smw_isspecprop' ) . '</span></span>';
370372 }
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Number.php
@@ -41,6 +41,8 @@
4242 $this->m_unitin = false;
4343 $this->m_unitvalues = false;
4444
 45+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
 46+
4547 // Parse to find value and unit
4648 $decseparator = wfMsgForContent( 'smw_decseparator' );
4749 $kiloseparator = wfMsgForContent( 'smw_kiloseparator' );
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Bool.php
@@ -18,6 +18,7 @@
1919 protected $m_falsecaption = null; // a desired label for "false" if given
2020
2121 protected function parseUserValue( $value ) {
 22+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
2223 $value = trim( $value );
2324 $lcv = strtolower( $value );
2425 $this->m_value = null;
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_RefreshTab.php
@@ -20,6 +20,7 @@
2121 function smwfAddRefreshTab( $skin, &$content_actions ) {
2222 global $wgUser;
2323 if ( $wgUser->isAllowed( 'delete' ) ) {
 24+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
2425 $content_actions['purge'] = array(
2526 'class' => false,
2627 'text' => wfMsg( 'smw_purge' ),
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Time.php
@@ -209,6 +209,7 @@
210210 // handle direct entry of Julian or Modified Julian days here; don't bother browsing for times.
211211 if ( ( $this->m_pref == 'JD' ) || ( $this->m_pref == 'MJD' ) ) {
212212 if ( !( is_numeric( $filteredvalue ) ) ) {// Immediate error check
 213+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
213214 $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) );
214215 return true;
215216 }
@@ -286,6 +287,7 @@
287288 $band = $band | $this->checkDigit( $tmp );
288289 }
289290 } else {
 291+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
290292 $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) );
291293 return true;
292294 }
@@ -313,15 +315,19 @@
314316
315317 // error catching
316318 if ( !$found ) { // no band matches the entered date
 319+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
317320 $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) );
318321 return true;
319322 } elseif ( ( $this->m_day > 0 ) && ( $this->m_day > self::$m_daysofmonths[$this->m_month] ) ) { // date does not exist in Gregorian calendar
 323+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
320324 $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) );
321325 return true;
322326 } elseif ( ( $this->m_dayj > 0 ) && ( $this->m_dayj > self::$m_daysofmonths[$this->m_monthj] ) ) { // date does not exist in Julian calendar
 327+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
323328 $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) );
324329 return true;
325330 } elseif ( ( $this->m_yearj != false ) && ( $this->m_yearj < - 4713 ) && ( $this->m_timeoffset != 0 ) ) { // no support for time offsets if year < -4713
 331+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
326332 $this->addError( wfMsgForContent( 'smw_nodatetime', $value ) );
327333 return true;
328334 }
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php
@@ -148,6 +148,7 @@
149149 */
150150 function smwfNumberFormat( $value, $decplaces = 3 ) {
151151 global $smwgMaxNonExpNumber;
 152+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
152153 $decseparator = wfMsgForContent( 'smw_decseparator' );
153154
154155 // If number is a trillion or more, then switch to scientific
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_WikiPage.php
@@ -85,9 +85,11 @@
8686 $this->m_title = Title::newFromText( $value, $this->m_fixNamespace );
8787 ///TODO: Escape the text so users can see any punctuation problems (bug 11666).
8888 if ( $this->m_title === null ) {
 89+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
8990 $this->addError( wfMsgForContent( 'smw_notitle', $value ) );
9091 } elseif ( ( $this->m_fixNamespace != NS_MAIN ) &&
9192 ( $this->m_fixNamespace != $this->m_title->getNamespace() ) ) {
 93+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
9294 $this->addError( wfMsgForContent( 'smw_wrong_namespace', $wgContLang->getNsText( $this->m_fixNamespace ) ) );
9395 }
9496 if ( $this->m_title !== null ) {
@@ -103,6 +105,7 @@
104106 }
105107 }
106108 } else {
 109+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
107110 $this->addError( wfMsgForContent( 'smw_notitle', $value ) );
108111 }
109112 if ( $this->m_caption === false ) {
@@ -121,6 +124,7 @@
122125 $this->m_prefixedtext = false;
123126 $this->m_caption = false;
124127 if ( ( $this->m_fixNamespace != NS_MAIN ) && ( $this->m_fixNamespace != $this->m_namespace ) ) {
 128+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
125129 $this->addError( wfMsgForContent( 'smw_notitle', $this->getPrefixedText() ) );
126130 }
127131 }
@@ -266,6 +270,7 @@
267271 }
268272 if ( $this->m_title === null ) { // should not normally happen, but anyway ...
269273 global $wgContLang;
 274+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
270275 $this->addError( wfMsgForContent( 'smw_notitle', $wgContLang->getNsText( $this->m_namespace ) . ':' . $this->m_dbkeyform ) );
271276 $this->m_dbkeyform = '';
272277 }
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Types.php
@@ -42,6 +42,7 @@
4343 $typenamespace = $wgContLang->getNsText( SMW_NS_TYPE );
4444 $id = SMWDataValueFactory::findTypeID( $this->m_reallabel );
4545 if ( $id { 0 } == '_' ) { // builtin
 46+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
4647 SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP );
4748 return '<span class="smwttinline"><span class="smwbuiltin">[[' . $typenamespace . ':' . $this->m_reallabel . '|' . $this->m_reallabel . ']]</span><span class="smwttcontent">' . wfMsgForContent( 'smw_isknowntype' ) . '</span></span>';
4849 } else {
@@ -58,6 +59,7 @@
5960 $title = $this->m_isalias ? Title::newFromText( $this->m_reallabel, SMW_NS_TYPE ) : $this->getTitle();
6061 $id = SMWDataValueFactory::findTypeID( $this->m_reallabel );
6162 if ( $id { 0 } == '_' ) { // builtin
 63+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
6264 SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP );
6365 return '<span class="smwttinline"><span class="smwbuiltin">' .
6466 $linker->makeLinkObj( $title, $this->m_reallabel ) . '</span><span class="smwttcontent">' .
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Linear.php
@@ -166,6 +166,7 @@
167167 if ( count( $factors ) == 0 ) { // no custom type
168168 // delete all previous errors, this is our real problem
169169 /// TODO: probably we should check for this earlier, but avoid unnecessary DB requests ...
 170+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
170171 $this->addError( wfMsgForContent( 'smw_unknowntype', SMWDataValueFactory::findTypeLabel( $this->getTypeID() ) ) );
171172 return;
172173 }
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php
@@ -106,6 +106,7 @@
107107 $result = SMWDataValueFactory::newPropertyObjectValue( $property, $value, $caption );
108108
109109 if ( $property->isInverse() ) {
 110+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
110111 $result->addError( wfMsgForContent( 'smw_noinvannot' ) );
111112 } elseif ( $storeAnnotation && ( self::getSMWData( $parser ) !== null ) ) {
112113 self::getSMWData( $parser )->addPropertyObjectValue( $property, $result );
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php
@@ -158,6 +158,7 @@
159159 $this->parseUserValue( $value ); // may set caption if not set yet, depending on datavalue
160160 $this->m_isset = true;
161161 } else {
 162+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
162163 $this->addError( wfMsgForContent( 'smw_parseerror' ) );
163164 }
164165
@@ -258,6 +259,7 @@
259260 $servicelinks = smwfGetStore()->getPropertyValues( $this->m_property->getWikiPageValue(), SMWPropertyValue::makeProperty( '_SERV' ) );
260261
261262 foreach ( $servicelinks as $dv ) {
 263+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
262264
263265 $args[0] = 'smw_service_' . str_replace( ' ', '_', $dv->getWikiValue() ); // messages distinguish ' ' from '_'
264266 $text = call_user_func_array( 'wfMsgForContent', $args );
@@ -772,6 +774,7 @@
773775 }
774776
775777 if ( !$accept ) {
 778+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
776779 $this->addError( wfMsgForContent( 'smw_notinenum', $this->getWikiValue(), $valuestring ) );
777780 }
778781 }
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_Auto.php
@@ -31,6 +31,7 @@
3232 }
3333
3434 public function getName() {
 35+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
3536 return wfMsg( 'smw_printername_auto' );
3637 }
3738
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryPrinter.php
@@ -123,6 +123,7 @@
124124 } elseif ( $this->mInline ) {
125125 $label = $this->mSearchlabel;
126126 if ( $label === null ) { // apply defaults
 127+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
127128 $label = wfMsgForContent( 'smw_iq_moreresults' );
128129 }
129130 if ( $label != '' ) {
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_List.php
@@ -44,11 +44,13 @@
4545 }
4646
4747 public function getName() {
 48+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
4849 return wfMsg( 'smw_printername_' . $this->mFormat );
4950 }
5051
5152 protected function getResultText( $res, $outputmode ) {
5253 if ( ( $this->mFormat == 'template' ) && ( $this->mTemplate == false ) ) {
 54+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
5355 $res->addErrors( array( wfMsgForContent( 'smw_notemplategiven' ) ) );
5456 return '';
5557 }
@@ -69,6 +71,7 @@
7072 $listsep = $this->mSep;
7173 $finallistsep = $listsep;
7274 } elseif ( $this->mFormat == 'list' ) { // make default list ", , , and "
 75+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
7376 $listsep = ', ';
7477 $finallistsep = wfMsgForContent( 'smw_finallistconjunct' ) . ' ';
7578 } else { // no default separators for format "template"
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php
@@ -215,6 +215,7 @@
216216
217217 $result = SMWQueryProcessor::getResultFromFunctionParams( $params, SMW_OUTPUT_WIKI );
218218 } else {
 219+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
219220 $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) );
220221 }
221222
@@ -238,6 +239,7 @@
239240
240241 $result = SMWQueryProcessor::getResultFromFunctionParams( $params, SMW_OUTPUT_WIKI, SMWQueryProcessor::INLINE_QUERY, true );
241242 } else {
 243+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
242244 $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) );
243245 }
244246
@@ -252,6 +254,8 @@
253255 static public function doConcept( &$parser ) {
254256 global $smwgQDefaultNamespaces, $smwgQMaxSize, $smwgQMaxDepth, $wgContLang;
255257
 258+ wfLoadExtensionMessages( 'SemanticMediaWiki' );
 259+
256260 $title = $parser->getTitle();
257261 $pconc = SMWPropertyValue::makeProperty( '_CONC' );
258262

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66934Large commit. Removed 800+ references to no-op wfLoadExtensionMessages()demon22:25, 26 May 2010

Status & tagging log