dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0202c55
)
Fall back to autoincrement when page cannot be recreated with old ID
author
Gergő Tisza
<tgr.huwiki@gmail.com>
Tue, 12 Jan 2016 03:09:24 +0000
(19:09 -0800)
committer
Gergő Tisza
<gtisza@wikimedia.org>
Tue, 12 Jan 2016 03:36:09 +0000
(
03:36
+0000)
Fixes I882b8ba09d68e7475e1d0934328730059574e292.
Bug: T28123
Change-Id: Ib029407d8e21f041803131143ff4dc0856803c60
includes/specials/SpecialUndelete.php
patch
|
blob
|
history
diff --git
a/includes/specials/SpecialUndelete.php
b/includes/specials/SpecialUndelete.php
index
b36860f
..
744a090
100644
(file)
--- a/
includes/specials/SpecialUndelete.php
+++ b/
includes/specials/SpecialUndelete.php
@@
-569,6
+569,10
@@
class PageArchive {
}
// Safe to insert now...
$newid = $article->insertOn( $dbw, $row->ar_page_id );
+ if ( $newid === false ) {
+ // The old ID is reserved; let's pick another
+ $newid = $article->insertOn( $dbw );
+ }
$pageId = $newid;
} else {
// Check if a deleted revision will become the current revision...