Manual:PopulateParentId.php
Esta función se eliminó por completo en la versión 1.36. |
Versión de MediaWiki: | ≤ 1.35 |
Archivo de MediaWiki: populateParentId.php | |
---|---|
Ubicación: | maintenance/ |
Código fuente: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Clases: | PopulateParentId |
Detalles
populateParentId.php is a maintenance script to make the required database updates for revision.rev_parent_id to be of any use.
This script was removed for MediaWiki version 1.36 and later.
This script runs by default when you run Manual:Update.php .
Historia
The first versions of populateParentId.php sorted the rev_parent_id linked list (at least with regard to those rows that had a null rev_parent_id) strictly by revision.rev_id. It assumed that the previous revision of the title was the original previous revision of the title when the edit was made. This behavior was changed by Aaron Schulz because it could result in loops.
The way it works now is that, after populateParentId.php selects the rows with null rev_parent_id, when it is dealing with a particular revision, first it checks for rows with the same revision.rev_timestamp as that revision, that have with a smaller rev_id than that revision. El identificador más alto "gana". This avoids loops as the timestamp can only decrease and never loops with IDs (from parent to parent). If there are no rows with the same timestamp, then it uses the highest ID with a lower timestamp.
Options
This script does not take any options.
Usage
php maintenance/populateParentId.php
$ php maintenance/populateParentId.php Populating rev_parent_id column ...doing rev_id from 1 to 200 rev_parent_id population complete ... 31 rows [17 changed]