dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Only configure the transaction profiler if profiling is enabled"
[lhc/web/wiklou.git]
/
includes
/
RevisionList.php
diff --git
a/includes/RevisionList.php
b/includes/RevisionList.php
index
7c39617
..
1cb43f7
100644
(file)
--- a/
includes/RevisionList.php
+++ b/
includes/RevisionList.php
@@
-24,12
+24,16
@@
* List for revision table items for a single page
*/
abstract class RevisionListBase extends ContextSource {
* 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
/**
* Construct a revision list for a given title
@@
-131,11
+135,11
@@
abstract class RevisionListBase extends ContextSource {
* Abstract base class for revision items
*/
abstract class RevisionItemBase {
* 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 RevisionListBase $list
/**
* @param RevisionListBase $list
@@
-288,7
+292,11
@@
class RevisionList extends RevisionListBase {
* Item class for a live revision table row
*/
class RevisionItem extends RevisionItemBase {
* 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 );
public function __construct( $list, $row ) {
parent::__construct( $list, $row );
@@
-309,7
+317,7
@@
class RevisionItem extends RevisionItemBase {
}
public function getAuthorNameField() {
}
public function getAuthorNameField() {
- return '
user_name'; // see Revision::selectUserFields()
+ return '
rev_user_text';
}
public function canView() {
}
public function canView() {
@@
-326,15
+334,19
@@
class RevisionItem extends RevisionItemBase {
/**
* Get the HTML link to the revision text.
/**
* Get the HTML link to the revision text.
- * Overridden by RevDelArchiveItem.
+ * @todo Essentially a copy of RevDelRevisionItem::getRevisionLink. That class
+ * should inherit from this one, and implement an appropriate interface instead
+ * of extending RevDelItem
* @return string
*/
protected function getRevisionLink() {
* @return string
*/
protected function getRevisionLink() {
- $date = $this->list->getLanguage()->timeanddate( $this->revision->getTimestamp(), true );
+ $date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate(
+ $this->revision->getTimestamp(), $this->list->getUser() ) );
+
if ( $this->isDeleted() && !$this->canViewContent() ) {
return $date;
}
if ( $this->isDeleted() && !$this->canViewContent() ) {
return $date;
}
- return Linker::link(
+ return Linker::link
Known
(
$this->list->title,
$date,
array(),
$this->list->title,
$date,
array(),
@@
-347,30
+359,34
@@
class RevisionItem extends RevisionItemBase {
/**
* Get the HTML link to the diff.
/**
* Get the HTML link to the diff.
- * Overridden by RevDelArchiveItem
+ * @todo Essentially a copy of RevDelRevisionItem::getDiffLink. That class
+ * should inherit from this one, and implement an appropriate interface instead
+ * of extending RevDelItem
* @return string
*/
protected function getDiffLink() {
if ( $this->isDeleted() && !$this->canViewContent() ) {
return $this->context->msg( 'diff' )->escaped();
} else {
* @return string
*/
protected function getDiffLink() {
if ( $this->isDeleted() && !$this->canViewContent() ) {
return $this->context->msg( 'diff' )->escaped();
} else {
- return Linker::link(
+ return Linker::link
Known
(
$this->list->title,
$this->list->title,
- $this->
contex
t->msg( 'diff' )->escaped(),
+ $this->
lis
t->msg( 'diff' )->escaped(),
array(),
array(
'diff' => $this->revision->getId(),
'oldid' => 'prev',
'unhide' => 1
array(),
array(
'diff' => $this->revision->getId(),
'oldid' => 'prev',
'unhide' => 1
- ),
- array(
- 'known',
- 'noclasses'
)
);
}
}
)
);
}
}
+ /**
+ * @todo Essentially a copy of RevDelRevisionItem::getHTML. That class
+ * should inherit from this one, and implement an appropriate interface instead
+ * of extending RevDelItem
+ * @return string
+ */
public function getHTML() {
$difflink = $this->context->msg( 'parentheses' )
->rawParams( $this->getDiffLink() )->escaped();
public function getHTML() {
$difflink = $this->context->msg( 'parentheses' )
->rawParams( $this->getDiffLink() )->escaped();