r107842 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107841‎ | r107842 | r107843 >
Date:17:26, 2 January 2012
Author:ialex
Status:ok
Tags:
Comment:
* Removed WikiPage::$mTouched and use the value from Title; that member is not used anywhere else and is marked protected
* Fix some spaces and added description for WikiPage::$mTouched
Modified paths:
  • /trunk/phase3/includes/WikiPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WikiPage.php
@@ -24,7 +24,8 @@
2525 public $mDataLoaded = false; // !< Boolean
2626 public $mIsRedirect = false; // !< Boolean
2727 public $mLatest = false; // !< Integer (false means "not loaded")
28 - public $mPreparedEdit = false; // !< Array
 28+ public $mPreparedEdit = false; // !< Array
 29+ /**@}}*/
2930
3031 /**
3132 * @var Title
@@ -36,9 +37,10 @@
3738 */
3839 protected $mLastRevision = null;
3940
40 - protected $mTimestamp = ''; // !< String
41 - protected $mTouched = '19700101000000'; // !< String
42 - /**@}}*/
 41+ /**
 42+ * @var string; timestamp of the current revision or empty string of not loaded
 43+ */
 44+ protected $mTimestamp = '';
4345
4446 /**
4547 * Constructor and clear the article
@@ -242,7 +244,6 @@
243245 $this->mRedirectTarget = null; # Title object if set
244246 $this->mLastRevision = null; # Latest revision
245247 $this->mTimestamp = '';
246 - $this->mTouched = '19700101000000';
247248 $this->mIsRedirect = false;
248249 $this->mLatest = false;
249250 $this->mPreparedEdit = false;
@@ -375,7 +376,6 @@
376377
377378 $this->mTitle->loadFromRow( $data );
378379
379 - $this->mTouched = wfTimestamp( TS_MW, $data->page_touched );
380380 $this->mIsRedirect = intval( $data->page_is_redirect );
381381 $this->mLatest = intval( $data->page_latest );
382382 } else {
@@ -502,7 +502,7 @@
503503 if ( !$this->mDataLoaded ) {
504504 $this->loadPageData();
505505 }
506 - return $this->mTouched;
 506+ return $this->mTitle->getTouched();
507507 }
508508
509509 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r107845Typofix r107842nikerabbit18:22, 2 January 2012
r107992Fix for r107945: also partially revert r107842ialex08:24, 4 January 2012

Status & tagging log