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
exception: Improve formatting of fatal error log messages
[lhc/web/wiklou.git]
/
includes
/
RevisionList.php
diff --git
a/includes/RevisionList.php
b/includes/RevisionList.php
index
b0bc60a
..
5243cc6
100644
(file)
--- a/
includes/RevisionList.php
+++ b/
includes/RevisionList.php
@@
-203,6
+203,16
@@
abstract class RevisionItemBase {
return false;
}
return false;
}
+ /**
+ * Get the DB field name storing actor ids.
+ * Override this function.
+ * @since 1.31
+ * @return bool
+ */
+ public function getAuthorActorField() {
+ return false;
+ }
+
/**
* Get the ID, as it would appear in the ids URL parameter
* @return int
/**
* Get the ID, as it would appear in the ids URL parameter
* @return int
@@
-257,6
+267,16
@@
abstract class RevisionItemBase {
return strval( $this->row->$field );
}
return strval( $this->row->$field );
}
+ /**
+ * Get the author actor ID
+ * @since 1.31
+ * @return string
+ */
+ public function getAuthorActor() {
+ $field = $this->getAuthorActorField();
+ return strval( $this->row->$field );
+ }
+
/**
* Returns true if the current user can view the item
*/
/**
* Returns true if the current user can view the item
*/
@@
-296,15
+316,14
@@
class RevisionList extends RevisionListBase {
if ( $this->ids !== null ) {
$conds['rev_id'] = array_map( 'intval', $this->ids );
}
if ( $this->ids !== null ) {
$conds['rev_id'] = array_map( 'intval', $this->ids );
}
+ $revQuery = Revision::getQueryInfo( [ 'page', 'user' ] );
return $db->select(
return $db->select(
-
[ 'revision', 'page', 'user'
],
-
array_merge( Revision::selectFields(), Revision::selectUserFields() )
,
+
$revQuery['tables'
],
+
$revQuery['fields']
,
$conds,
__METHOD__,
[ 'ORDER BY' => 'rev_id DESC' ],
$conds,
__METHOD__,
[ 'ORDER BY' => 'rev_id DESC' ],
- [
- 'page' => Revision::pageJoinCond(),
- 'user' => Revision::userJoinCond() ]
+ $revQuery['joins']
);
}
);
}