Manual:AttachLatest.php

Details
attachLatest.php file is a maint-scripts>Special:MyLanguage/Manual:Maintenance scripts|maintenance script that is quick hackjob to fix damaged imports on wikisource page records have   column wrong.

The program is looking for pages with column   from the table page set to 0.

For these pages, it then attaches the latest revision of that page according to the revision timestamp.

The script finally prints out the number of pages, which have been or would be changed.

attachLatest.php does not check, if the revision, which is set as   actually exists. If the   field points to a non-existing revision, attachLatest.php, unless used with the   parameter, will not fix this.