summaryrefslogtreecommitdiff
path: root/includes/RevisionList.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /includes/RevisionList.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/RevisionList.php')
-rw-r--r--includes/RevisionList.php60
1 files changed, 35 insertions, 25 deletions
diff --git a/includes/RevisionList.php b/includes/RevisionList.php
index 1b865bb0..d10b5412 100644
--- a/includes/RevisionList.php
+++ b/includes/RevisionList.php
@@ -24,17 +24,21 @@
* List for revision table items for a single page
*/
abstract class RevisionListBase extends ContextSource {
- /**
- * @var Title
- */
- var $title;
+ /** @var Title */
+ public $title;
+
+ /** @var array */
+ protected $ids;
- var $ids, $res, $current;
+ protected $res;
+
+ /** @var bool|object */
+ protected $current;
/**
* Construct a revision list for a given title
- * @param $context IContextSource
- * @param $title Title
+ * @param IContextSource $context
+ * @param Title $title
*/
function __construct( IContextSource $context, Title $title ) {
$this->setContext( $context );
@@ -43,7 +47,7 @@ abstract class RevisionListBase extends ContextSource {
/**
* Select items only where the ID is any of the specified values
- * @param $ids Array
+ * @param array $ids
*/
function filterByIds( array $ids ) {
$this->ids = $ids;
@@ -72,7 +76,7 @@ abstract class RevisionListBase extends ContextSource {
/**
* Start iteration. This must be called before current() or next().
- * @return First list item
+ * @return Revision First list item
*/
public function reset() {
if ( !$this->res ) {
@@ -86,6 +90,7 @@ abstract class RevisionListBase extends ContextSource {
/**
* Get the current list item, or false if we are at the end
+ * @return Revision
*/
public function current() {
return $this->current;
@@ -93,6 +98,7 @@ abstract class RevisionListBase extends ContextSource {
/**
* Move the iteration pointer to the next list item, and return it.
+ * @return Revision
*/
public function next() {
$this->res->next();
@@ -114,13 +120,13 @@ abstract class RevisionListBase extends ContextSource {
/**
* Do the DB query to iterate through the objects.
- * @param $db DatabaseBase object to use for the query
+ * @param DatabaseBase $db DatabaseBase object to use for the query
*/
abstract public function doQuery( $db );
/**
* Create an item object from a DB result row
- * @param $row stdclass
+ * @param object $row
*/
abstract public function newItem( $row );
}
@@ -129,15 +135,15 @@ abstract class RevisionListBase extends ContextSource {
* Abstract base class for revision items
*/
abstract class RevisionItemBase {
- /** The parent RevisionListBase */
- var $list;
+ /** @var RevisionListBase The parent */
+ protected $list;
- /** The DB result row */
- var $row;
+ /** The database result row */
+ protected $row;
/**
- * @param $list RevisionListBase
- * @param $row DB result row
+ * @param RevisionListBase $list
+ * @param object $row DB result row
*/
public function __construct( $list, $row ) {
$this->list = $list;
@@ -182,7 +188,7 @@ abstract class RevisionItemBase {
/**
* Get the ID, as it would appear in the ids URL parameter
- * @return
+ * @return int
*/
public function getId() {
$field = $this->getIdField();
@@ -191,7 +197,7 @@ abstract class RevisionItemBase {
/**
* Get the date, formatted in user's language
- * @return String
+ * @return string
*/
public function formatDate() {
return $this->list->getLanguage()->userDate( $this->getTimestamp(),
@@ -200,7 +206,7 @@ abstract class RevisionItemBase {
/**
* Get the time, formatted in user's language
- * @return String
+ * @return string
*/
public function formatTime() {
return $this->list->getLanguage()->userTime( $this->getTimestamp(),
@@ -209,7 +215,7 @@ abstract class RevisionItemBase {
/**
* Get the timestamp in MW 14-char form
- * @return Mixed
+ * @return mixed
*/
public function getTimestamp() {
$field = $this->getTimestampField();
@@ -257,7 +263,7 @@ class RevisionList extends RevisionListBase {
}
/**
- * @param $db DatabaseBase
+ * @param DatabaseBase $db
* @return mixed
*/
public function doQuery( $db ) {
@@ -286,7 +292,11 @@ class RevisionList extends RevisionListBase {
* Item class for a live revision table row
*/
class RevisionItem extends RevisionItemBase {
- var $revision, $context;
+ /** @var Revision */
+ protected $revision;
+
+ /** @var RequestContext */
+ protected $context;
public function __construct( $list, $row ) {
parent::__construct( $list, $row );
@@ -324,7 +334,7 @@ class RevisionItem extends RevisionItemBase {
/**
* Get the HTML link to the revision text.
- * Overridden by RevDel_ArchiveItem.
+ * Overridden by RevDelArchiveItem.
* @return string
*/
protected function getRevisionLink() {
@@ -345,7 +355,7 @@ class RevisionItem extends RevisionItemBase {
/**
* Get the HTML link to the diff.
- * Overridden by RevDel_ArchiveItem
+ * Overridden by RevDelArchiveItem
* @return string
*/
protected function getDiffLink() {