diff options
author | daniel <daniel.kinzler@wikimedia.de> | 2018-01-26 17:48:19 -0800 |
---|---|---|
committer | Addshore <addshorewiki@gmail.com> | 2018-06-14 13:22:13 +0000 |
commit | e8632ab0f6264851d2115a2e6338c2074b9a9b8c (patch) | |
tree | becbbac3dde84688a7fe7bc6cc8da6dcf8eb8d7d /includes/changes | |
parent | 3fc48dec34fb2aee0ffbc785a3e2895c931cd842 (diff) | |
download | mediawikicore-e8632ab0f6264851d2115a2e6338c2074b9a9b8c.tar.gz mediawikicore-e8632ab0f6264851d2115a2e6338c2074b9a9b8c.zip |
[MCR] Factor PageUpdater out of WikiPage
This introduces PageUpdater to replace WikiPage::doEditContent,
and DerivedPageDataUpdater, to replace WikiPage::doEditUpdates
and WikiPage::prepareContentForEdit.
See docs/pageupdater.txt for a description of their
functionality.
MCR migration notes:
* The interface of PageUpdater is expected to
remain mostly stable after this patch. Code that has been using
WikiPage::doEditContent can be confidently migrated to using the
new mechanism for revision creation.
* This patch keeps the code inside PageUpdater largely aligned
with the old code in WikiPage, to make review easier to to avoid
mistakes. It is intended to be refactored further, moving
application logic into stateless services.
* DerivedPageDataUpdate is intended as a stepping stone for further
refactoring. Its behavior is designed to be compatible with
callback code that currently relies on
WikiPage::prepareContentForEdit. Much of the code that currently
lives in DerivedPageDataUpdate should be factored out into
services, all behavior relevant to calling code should be exposed
via narrow interfaces.
Bug: T174038
Bug: T196653
Change-Id: If610c68f4912e89af616cdcac1d35a1be3946afa
Diffstat (limited to 'includes/changes')
-rw-r--r-- | includes/changes/RecentChange.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index 94dcd077a5e1..904090f88aca 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -658,9 +658,9 @@ class RecentChange { * Makes an entry in the database corresponding to an edit * * @param string $timestamp - * @param Title &$title + * @param Title $title * @param bool $minor - * @param User &$user + * @param User $user * @param string $comment * @param int $oldId * @param string $lastTimestamp @@ -674,7 +674,7 @@ class RecentChange { * @return RecentChange */ public static function notifyEdit( - $timestamp, &$title, $minor, &$user, $comment, $oldId, $lastTimestamp, + $timestamp, $title, $minor, $user, $comment, $oldId, $lastTimestamp, $bot, $ip = '', $oldSize = 0, $newSize = 0, $newId = 0, $patrol = 0, $tags = [] ) { @@ -735,9 +735,9 @@ class RecentChange { * Note: the title object must be loaded with the new id using resetArticleID() * * @param string $timestamp - * @param Title &$title + * @param Title $title * @param bool $minor - * @param User &$user + * @param User $user * @param string $comment * @param bool $bot * @param string $ip @@ -748,7 +748,7 @@ class RecentChange { * @return RecentChange */ public static function notifyNew( - $timestamp, &$title, $minor, &$user, $comment, $bot, + $timestamp, $title, $minor, $user, $comment, $bot, $ip = '', $size = 0, $newId = 0, $patrol = 0, $tags = [] ) { $rc = new RecentChange; @@ -805,8 +805,8 @@ class RecentChange { /** * @param string $timestamp - * @param Title &$title - * @param User &$user + * @param Title $title + * @param User $user * @param string $actionComment * @param string $ip * @param string $type @@ -818,7 +818,7 @@ class RecentChange { * @param string $actionCommentIRC * @return bool */ - public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip, $type, + public static function notifyLog( $timestamp, $title, $user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '' ) { global $wgLogRestrictions; @@ -836,8 +836,8 @@ class RecentChange { /** * @param string $timestamp - * @param Title &$title - * @param User &$user + * @param Title $title + * @param User $user * @param string $actionComment * @param string $ip * @param string $type @@ -851,7 +851,7 @@ class RecentChange { * @param bool $isPatrollable Whether this log entry is patrollable * @return RecentChange */ - public static function newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip, + public static function newLogEntry( $timestamp, $title, $user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '', $revId = 0, $isPatrollable = false ) { global $wgRequest; |