Commit graph

6 commits

Author SHA1 Message Date
Matěj Suchánek
e47c441078 Fix many typos in comments
Found using IntelliJ's "Typo" code inspection.

Change-Id: I746220ebe6e1e39f6cb503390ec9053e6518cf16
2022-05-10 12:46:11 +00:00
Umherirrender
032b03dc7a Remove unneeded variable assignment
The variable already has the value

Change-Id: I75f25cc944e30d91a65e1d2bb0abce7d671b19b8
2021-09-03 22:51:22 +00:00
Tim Starling
4b6fd791f7 fixMergeHistoryCorruption.php: use DB_REPLICA
Use the replica DB for read queries.

Bug: T263340
Change-Id: I5ab5706390dfc012c86bc18094c5baf457b8cbe8
2021-08-31 10:53:42 +10:00
Tim Starling
4b9b522a38 Improvements to fixMergeHistoryCorruption.php
* Make the --ns option optional. I don't know why it was required. The
  bug affects any page that had its history merged.
* Reorganise the code so that dry run mode just skips the write queries,
  making it more obvious what delete mode will do.
* Skip invalid titles.

Bug: T263340
Change-Id: I0dc0d72b254f43ba5ca5b8af45747f9c349c7a15
2021-06-29 11:33:35 +10:00
Reedy
275d1a44c5 fixMergeHistoryCorruption.php: Code cleanup
* Remove duplicated code
* Fix some indenting

Change-Id: I116fd9bc3bdde9c895bac161d7805a21a344ca7f
Follows-Up: I51abc295e37030ab181d4380f62c30d7998f1b9e
2021-05-18 02:28:14 +01:00
Ammar Abdulhamid
12870e98c9 Add maintenance script to delete corrupted pages
These are rows in page_table that have 'page_latest' entry with
corresponding 'rev_id' but no associated 'rev_page' entry in revision
table. Such rows create ghost pages because their 'page_latest' rev is
actually missing or moved to a different page now (which possess the -
associated 'rev_page' on revision table now).

https://en.wikipedia.org/wiki/Module:Jct/city/Chinissai
(page_id=41871839) is an example of such pages. Its page_latest rev is
819371998. But this revision has been moved to another page now
(page_id= 56252475), rendering the former inaccessible.

fb58d39 will prevent this going forward (for scribunto content), but we
need to clear the extant pages for module namespace and others caused
by something else.

Bug: T263340
Change-Id: I51abc295e37030ab181d4380f62c30d7998f1b9e
2021-05-17 16:41:53 +10:00