r80069 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80068‎ | r80069 | r80070 >
Date:00:29, 12 January 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Document return type.

Explicit class member variable definition
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryAllimages.php (modified) (history)
  • /trunk/phase3/includes/filerepo/RepoGroup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/RepoGroup.php
@@ -26,6 +26,7 @@
2727 /**
2828 * Get a RepoGroup instance. At present only one instance of RepoGroup is
2929 * needed in a MediaWiki invocation, this may change in the future.
 30+ * @return RepoGroup
3031 */
3132 static function singleton() {
3233 if ( self::$instance ) {
Index: trunk/phase3/includes/api/ApiQueryAllimages.php
@@ -38,6 +38,8 @@
3939 */
4040 class ApiQueryAllimages extends ApiQueryGeneratorBase {
4141
 42+ private $mRepo;
 43+
4244 public function __construct( $query, $moduleName ) {
4345 parent::__construct( $query, $moduleName, 'ai' );
4446 $this->mRepo = RepoGroup::singleton()->getLocalRepo();

Sign-offs

UserFlagDate
Hasharinspected12:28, 7 March 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r83457Documentation and explicit variable definitions...reedy14:45, 7 March 2011

Comments

#Comment by Hashar (talk | contribs)   12:28, 7 March 2011

Are you absolutely sure that ApiQueryAllimages->mRepos is private? -:p

#Comment by Reedy (talk | contribs)   12:40, 7 March 2011

Probably should be protected, just in case. Though the API doesn't have any subclasses of this IIRC.

I'll fix it when I commit something else, not really a big deal IMHO

Status & tagging log