Page MenuHomePhabricator

assigning an id to the "rollback" link
Closed, ResolvedPublic

Description

adding id to rollback links

I think it would be a good idea to assign an id to the "rollback" link. This way, it would be much easier to right a Javasciprt code which adds a link next to it (like one which links to the same address with &bot to its end). I have also created the patch (attached).


Version: unspecified
Severity: enhancement

attachment diff.patch ignored as obsolete

Details

Reference
bz11472

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:54 PM
bzimport set Reference to bz11472.
bzimport added a subscriber: Unknown Object (MLST).

ayg wrote:

Comment on attachment 4166
adding id to rollback links

The patch is not acceptable, because Linker::generateRollback could be called multiple times per page. Each page must have only one element with a given id. If a page has two elements with id="rollback-link", it breaks XML validity.

For PageHistory.php, since the line occurs only for $latest, it's fine to add the id. However, it should start with mw-, like id="mw-rollback-link".

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

sumanah wrote:

+reviewed since Aryeh reviewed the patch. Thanks for the patch, Huji.

Rollback link can occurs multiple times on one page, so a id is bad, but the class 'mw-rollback-link' exist since r17729 for rollbacklinks