r106874 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106873‎ | r106874 | r106875 >
Date:21:55, 20 December 2011
Author:bsitu
Status:ok
Tags:
Comment:
Remove undefined variable and repalce class variable with a more intuitive name
Modified paths:
  • /trunk/extensions/MarkAsHelpful/includes/MarkAsHelpfulItem.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MarkAsHelpful/includes/MarkAsHelpfulItem.php
@@ -22,7 +22,7 @@
2323 );
2424
2525 protected $user;
26 - protected $loadFromDatabase = false;
 26+ protected $loadedFromDatabase = false;
2727
2828 /**
2929 * Constructor
@@ -47,7 +47,7 @@
4848
4949 public function getUser() {
5050 if ( !$this->user ) {
51 - if ( $this->loadFromDatabase ) {
 51+ if ( $this->loadedFromDatabase ) {
5252 if ( $this->getProperty( 'mah_user_id' ) ) {
5353 $this->user = User::newFromId( $this->getProperty( 'mah_user_id' ) );
5454 } elseif ( $this->getProperty( 'mah_user_ip' ) ) {
@@ -130,9 +130,7 @@
131131 $this->setProperty( $key, $res->$key );
132132 }
133133
134 - // @todo FIXME: $Item is not defined (and it should be called $item
135 - // as per our coding conventions)
136 - $Item->setLoadFromDatabase = true;
 134+ $this->loadedFromDatabase = true;
137135
138136 return true;
139137 } else {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106843Mark As Helpful APIs and backendbsitu19:30, 20 December 2011

Status & tagging log