Last modified: 2005-11-24 20:00:21 UTC
In Special:Undelete, one can select which contributions must be restored. In Firefox (haven't tried with other browsers), the checkbox value is '1' but the checkbox is NOT checked. HTML code reveals the problem : <input type="checkbox" name="ts20051020110735" value="1" /> Value="1" is not enough. It should be : <input type="checkbox" name="ts20051020110735" value="1" checked="1" /> to reflect the actual value. Quite easy to fix. See : http://www.w3.org/TR/REC-html40/interact/forms.html#adef-checked checked [CI] When the type attribute has the value "radio" or "checkbox", this boolean attribute specifies that the button is on. User agents must ignore this attribute for other control types.
Fix is trivial in SpecialUndelete.php : Replace : $checkBox = "<input type=\"checkbox\" name=\"ts$ts\" value=\"1\" />"; with $checkBox = "<input type=\"checkbox\" name=\"ts$ts\" value=\"1\" checked=\"1\" />";
If all checkboxes are not checked, all revisions are restored. p.s. in XHTML, checked="1" is invalid; must be checked="checked".
>If all checkboxes are not checked, all revisions are restored. yep, that's right but it's also counter-intuitive, I always thought I had to check all of them to make a complete restoration.
Why is this bug tagged as invalid ?