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
Add start, end to allowed params of Special:MyContributions
[lhc/web/wiklou.git]
/
includes
/
MergeHistory.php
diff --git
a/includes/MergeHistory.php
b/includes/MergeHistory.php
index
0e9bb46
..
0914a9b
100644
(file)
--- a/
includes/MergeHistory.php
+++ b/
includes/MergeHistory.php
@@
-167,7
+167,7
@@
class MergeHistory {
// Convert into a Status object
if ( $errors ) {
foreach ( $errors as $error ) {
// Convert into a Status object
if ( $errors ) {
foreach ( $errors as $error ) {
-
call_user_func_array( [ $status, 'fatal' ],
$error );
+
$status->fatal( ...
$error );
}
}
}
}
@@
-254,6
+254,8
@@
class MergeHistory {
return $permCheck;
}
return $permCheck;
}
+ $this->dbw->startAtomic( __METHOD__ );
+
$this->dbw->update(
'revision',
[ 'rev_page' => $this->dest->getArticleID() ],
$this->dbw->update(
'revision',
[ 'rev_page' => $this->dest->getArticleID() ],
@@
-264,17
+266,17
@@
class MergeHistory {
// Check if this did anything
$this->revisionsMerged = $this->dbw->affectedRows();
if ( $this->revisionsMerged < 1 ) {
// Check if this did anything
$this->revisionsMerged = $this->dbw->affectedRows();
if ( $this->revisionsMerged < 1 ) {
+ $this->dbw->endAtomic( __METHOD__ );
$status->fatal( 'mergehistory-fail-no-change' );
$status->fatal( 'mergehistory-fail-no-change' );
+
return $status;
}
// Make the source page a redirect if no revisions are left
return $status;
}
// Make the source page a redirect if no revisions are left
- $haveRevisions = $this->dbw->
selectField
(
+ $haveRevisions = $this->dbw->
lockForUpdate
(
'revision',
'revision',
- 'rev_timestamp',
[ 'rev_page' => $this->source->getArticleID() ],
[ 'rev_page' => $this->source->getArticleID() ],
- __METHOD__,
- [ 'FOR UPDATE' ]
+ __METHOD__
);
if ( !$haveRevisions ) {
if ( $reason ) {
);
if ( !$haveRevisions ) {
if ( $reason ) {
@@
-350,6
+352,8
@@
class MergeHistory {
Hooks::run( 'ArticleMergeComplete', [ $this->source, $this->dest ] );
Hooks::run( 'ArticleMergeComplete', [ $this->source, $this->dest ] );
+ $this->dbw->endAtomic( __METHOD__ );
+
return $status;
}
}
return $status;
}
}