r106447 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106446‎ | r106447 | r106448 >
Date:17:26, 16 December 2011
Author:yaron
Status:ok
Tags:
Comment:
Typo fix: changed 'printeout' to 'printout' in several files, plus some small wording changes
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DISerializer.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/api/ApiAsk.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/api/ApiAskArgs.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/api/ApiSMWQuery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DISerializer.php
@@ -76,7 +76,7 @@
7777 }
7878
7979 foreach ( $queryResult->getResults() as /* SMWDIWikiPage */ $diWikiPage ) {
80 - $result = array( 'printeouts' => array() );
 80+ $result = array( 'printouts' => array() );
8181
8282 foreach ( $queryResult->getPrintRequests() as /* SMWPrintRequest */ $printRequest ) {
8383 $resultAarray = new SMWResultArray( $diWikiPage, $printRequest, $queryResult->getStore() );
@@ -86,7 +86,7 @@
8787 $result += self::getSerialization( array_shift( $dataItems ) );
8888 }
8989 else {
90 - $result['printeouts'][$printRequest->getLabel()] = array_map(
 90+ $result['printouts'][$printRequest->getLabel()] = array_map(
9191 array( __class__, 'getSerialization' ),
9292 $resultAarray->getContent()
9393 );
Index: trunk/extensions/SemanticMediaWiki/includes/api/ApiAskArgs.php
@@ -2,7 +2,7 @@
33
44 /**
55 * API module to query SMW by providing a query specified as
6 - * a list of conditions, printeouts and parameters.
 6+ * a list of conditions, printouts and parameters.
77 *
88 * @since 1.6.2
99 *
@@ -22,7 +22,7 @@
2323
2424 $query = $this->getQuery(
2525 implode( array_map( array( __CLASS__, 'wrapCondition' ), $params['conditions'] ) ),
26 - array_map( array( __CLASS__, 'printeoutFromString' ), $params['printeouts'] )
 26+ array_map( array( __CLASS__, 'printoutFromString' ), $params['printouts'] )
2727 );
2828
2929 $this->addQueryResult( $this->getQueryResult( $query ) );
@@ -32,11 +32,11 @@
3333 return "[[$c]]";
3434 }
3535
36 - public static function printeoutFromString( $printeout ) {
 36+ public static function printoutFromString( $printout ) {
3737 return new SMWPrintRequest(
3838 SMWPrintRequest::PRINT_PROP,
39 - $printeout,
40 - SMWPropertyValue::makeUserProperty( $printeout )
 39+ $printout,
 40+ SMWPropertyValue::makeUserProperty( $printout )
4141 );
4242 }
4343
@@ -46,7 +46,7 @@
4747 ApiBase::PARAM_TYPE => 'string',
4848 ApiBase::PARAM_ISMULTI => true,
4949 ),
50 - 'printeouts' => array(
 50+ 'printouts' => array(
5151 ApiBase::PARAM_TYPE => 'string',
5252 ApiBase::PARAM_DFLT => '',
5353 ApiBase::PARAM_ISMULTI => true,
@@ -61,15 +61,15 @@
6262
6363 public function getParamDescription() {
6464 return array(
65 - 'conditions' => 'The query conditions, ie the requirements for a subject to be included',
66 - 'printeouts' => 'The query printeouts, ie the properties to show per subject',
67 - 'parameters' => 'The query parameters, ie all non-condition and non-printeout arguments',
 65+ 'conditions' => 'The query conditions, i.e. the requirements for a subject to be included',
 66+ 'printouts' => 'The query printouts, i.e. the properties to show per subject',
 67+ 'parameters' => 'The query parameters, i.e. all non-condition and non-printout arguments',
6868 );
6969 }
7070
7171 public function getDescription() {
7272 return array(
73 - 'API module to query SMW by providing a query specified as a list of conditions, printeouts and parameters.
 73+ 'API module to query SMW by providing a query specified as a list of conditions, printouts and parameters.
7474 This API module is in alpha stage, and likely to see changes in upcomming versions of SMW.'
7575 );
7676 }
@@ -81,7 +81,7 @@
8282
8383 protected function getExamples() {
8484 return array(
85 - 'api.php?action=askargs&conditions=Modification date::%2B&printeouts=Modification date&parameters=|sort%3DModification date|order%3Ddesc',
 85+ 'api.php?action=askargs&conditions=Modification%20date::%2B&printouts=Modification%20date&parameters=|sort%3DModification%20date|order%3Ddesc',
8686 );
8787 }
8888
Index: trunk/extensions/SemanticMediaWiki/includes/api/ApiSMWQuery.php
@@ -56,10 +56,10 @@
5757 $result->setIndexedTagName( $serialized['printrequests'], 'printrequest' );
5858
5959 foreach ( $serialized['results'] as $subjectName => $subject ) {
60 - if ( is_array( $subject ) && array_key_exists( 'printeouts', $subject ) ) {
61 - foreach ( $subject['printeouts'] as $property => $values ) {
 60+ if ( is_array( $subject ) && array_key_exists( 'printouts', $subject ) ) {
 61+ foreach ( $subject['printouts'] as $property => $values ) {
6262 if ( is_array( $values ) ) {
63 - $result->setIndexedTagName( $serialized['results'][$subjectName]['printeouts'][$property], 'value' );
 63+ $result->setIndexedTagName( $serialized['results'][$subjectName]['printouts'][$property], 'value' );
6464 }
6565 }
6666 }
Index: trunk/extensions/SemanticMediaWiki/includes/api/ApiAsk.php
@@ -20,13 +20,13 @@
2121
2222 $rawParams = explode( '|', $params['query'] );
2323 $queryString = '';
24 - $printeouts = array();
 24+ $printouts = array();
2525
26 - SMWQueryProcessor::processFunctionParams( $rawParams, $queryString, $this->parameters, $printeouts );
 26+ SMWQueryProcessor::processFunctionParams( $rawParams, $queryString, $this->parameters, $printouts );
2727
2828 $queryResult = $this->getQueryResult( $this->getQuery(
2929 $queryString,
30 - $printeouts
 30+ $printouts
3131 ) );
3232
3333 $this->addQueryResult( $queryResult );
@@ -60,7 +60,7 @@
6161
6262 protected function getExamples() {
6363 return array(
64 - 'api.php?action=ask&query=[[Modification date::%2B]]|%3FModification date|sort%3DModification date|order%3Ddesc',
 64+ 'api.php?action=ask&query=[[Modification%20date::%2B]]|%3FModification%20date|sort%3DModification%20date|order%3Ddesc',
6565 );
6666 }
6767

Status & tagging log