r88958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88957‎ | r88958 | r88959 >
Date:03:42, 27 May 2011
Author:yaron
Status:ok (Comments)
Tags:
Comment:
Follow-up to r88955 - all query printers' getResultText() signatures need to be modified accordingly
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Auto.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_CSV.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_DSV.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Embedded.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_JSONlink.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_RDF.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_RSSlink.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Table.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_RSSlink.php
@@ -45,7 +45,7 @@
4646 return wfMsg( 'smw_printername_rss' );
4747 }
4848
49 - protected function getResultText( $res, $outputmode ) {
 49+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
5050 global $smwgIQRunningNumber, $wgSitename, $wgServer, $smwgRSSEnabled, $wgRequest;
5151 $result = '';
5252 if ( $outputmode == SMW_OUTPUT_FILE ) { // make RSS feed
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_JSONlink.php
@@ -35,7 +35,7 @@
3636 return wfMsg( 'smw_printername_json' );
3737 }
3838
39 - protected function getResultText( $res, $outputmode ) {
 39+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
4040 global $wgServer, $wgScriptPath;
4141 if ( $outputmode == SMW_OUTPUT_FILE ) { // create detached JSON file
4242 $itemstack = array(); // contains Items for the items section
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Table.php
@@ -18,7 +18,7 @@
1919 return wfMsg( 'smw_printername_' . $this->mFormat );
2020 }
2121
22 - protected function getResultText( $res, $outputmode ) {
 22+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
2323 global $smwgIQRunningNumber;
2424 SMWOutputs::requireHeadItem( SMW_HEADER_SORTTABLE );
2525
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Auto.php
@@ -58,7 +58,7 @@
5959 * @param SMWQueryResult $res
6060 * @param $outputmode
6161 */
62 - protected function getResultText( /* SMWQueryResult */ $res, $outputmode ) {
 62+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
6363 return ''; // acutally not needed in this implementation
6464 }
6565
@@ -67,4 +67,4 @@
6868 return wfMsg( 'smw_printername_auto' );
6969 }
7070
71 -}
\ No newline at end of file
 71+}
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Embedded.php
@@ -34,7 +34,7 @@
3535 return wfMsg( 'smw_printername_embedded' );
3636 }
3737
38 - protected function getResultText( $res, $outputmode ) {
 38+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
3939 global $wgParser;
4040 // No page should embed itself, find out who we are:
4141 if ( $wgParser->getTitle() instanceof Title ) {
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_CSV.php
@@ -40,7 +40,7 @@
4141 return wfMsg( 'smw_printername_csv' );
4242 }
4343
44 - protected function getResultText( $res, $outputmode ) {
 44+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
4545 $result = '';
4646
4747 if ( $outputmode == SMW_OUTPUT_FILE ) { // make CSV file
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_List.php
@@ -61,7 +61,7 @@
6262 return wfMsg( 'smw_printername_' . $this->mFormat );
6363 }
6464
65 - protected function getResultText( $res, $outputmode ) {
 65+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
6666 if ( ( $this->mFormat == 'template' ) && ( $this->mTemplate == false ) ) {
6767 smwfLoadExtensionMessages( 'SemanticMediaWiki' );
6868 $res->addErrors( array( wfMsgForContent( 'smw_notemplategiven' ) ) );
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_RDF.php
@@ -43,7 +43,7 @@
4444 return wfMsg( 'smw_printername_rdf' );
4545 }
4646
47 - protected function getResultText( $res, $outputmode ) {
 47+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
4848 if ( $outputmode == SMW_OUTPUT_FILE ) { // make RDF file
4949 $serializer = $this->syntax == 'turtle' ? new SMWTurtleSerializer() : new SMWRDFXMLSerializer();
5050 $serializer->startSerialization();
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_DSV.php
@@ -53,7 +53,7 @@
5454 return wfMsg( 'smw_printername_dsv' );
5555 }
5656
57 - protected function getResultText( /* SMWQueryResult */ $res, $outputmode ) {
 57+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
5858 if ( $outputmode == SMW_OUTPUT_FILE ) { // Make the DSV file.
5959 return $this->getResultFileContents( $res );
6060 }
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Category.php
@@ -46,7 +46,7 @@
4747 return $namespace_labels[NS_CATEGORY];
4848 }
4949
50 - protected function getResultText( $res, $outputmode ) {
 50+ protected function getResultText( SMWQueryResult $res, $outputmode ) {
5151 global $wgContLang;
5252
5353 // <H3> will generate TOC entries otherwise. Probably need another way

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88955update method signaturesjeroendedauw23:47, 26 May 2011

Comments

#Comment by Jeroen De Dauw (talk | contribs)   13:26, 27 May 2011

Thanks - apparently I forgot to update the QP's in SMW :)

Status & tagging log