Addshore has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/399795 )
Change subject: [MCR] Add optional $title param to Revision byId methods
......................................................................
[MCR] Add optional $title param to Revision byId methods
Bug: T183505
Change-Id: I714ee391caac9bc56ce4c037967e424b44d9c2fe
---
M includes/Revision.php
M includes/Storage/RevisionStore.php
2 files changed, 7 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/95/399795/1
diff --git a/includes/Revision.php b/includes/Revision.php
index c7c708e..82785db 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -90,11 +90,12 @@
*
* @param int $id
* @param int $flags (optional)
+ * @param Title $title (optional)
* @return Revision|null
*/
- public static function newFromId( $id, $flags = 0 ) {
- $rec = self::getRevisionStore()->getRevisionById( $id, $flags );
- return $rec === null ? null : new Revision( $rec, $flags );
+ public static function newFromId( $id, $flags = 0, $title = null ) {
+ $rec = self::getRevisionStore()->getRevisionById( $id, $flags,
$title );
+ return $rec === null ? null : new Revision( $rec, $flags,
$title );
}
/**
diff --git a/includes/Storage/RevisionStore.php
b/includes/Storage/RevisionStore.php
index b8debb8..24b437f 100644
--- a/includes/Storage/RevisionStore.php
+++ b/includes/Storage/RevisionStore.php
@@ -848,10 +848,11 @@
*
* @param int $id
* @param int $flags (optional)
+ * @param Title $title (optional)
* @return RevisionRecord|null
*/
- public function getRevisionById( $id, $flags = 0 ) {
- return $this->newRevisionFromConds( [ 'rev_id' => intval( $id )
], $flags );
+ public function getRevisionById( $id, $flags = 0, Title $title = null )
{
+ return $this->newRevisionFromConds( [ 'rev_id' => intval( $id )
], $flags, $title );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/399795
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I714ee391caac9bc56ce4c037967e424b44d9c2fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits