https://bugzilla.wikimedia.org/show_bug.cgi?id=18827
Roan Kattouw <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] AssignedTo|wikibugs- |[email protected] |[email protected] | --- Comment #2 from Roan Kattouw <[email protected]> 2009-05-18 07:05:57 UTC --- (In reply to comment #0) > Big problems at PageHistory.php's > if( $this->linesonpage > 1 && $wgUser->isAllowed('deleterevision') ) {... > > which makes > <form action="http://example.org/index.php?title=Special:Revisiondelete" > method="get" id="mw-history-revdeleteform" > style="visibility:hidden;float:right;"> > <input name="target" type="hidden" value="A" /> > <input name="oldid" type="hidden" value="" > id="revdel-oldid" /> > <input type="submit" > value="Show/hide selected revisions" /> > </form> > > Let's examine this one by one: > 1. action="http://example.org/index.php?title=Special:Revisiondelete" > This should just be action="/index.php". What is a "?" doing in > action? Maybe you fellows were just testing with "pretty URLs" wikis. > POSTing to URLs with query strings works for me (haven't tested this particular form, but I've used it in other web apps). > 2. You depend on Javascript to put the values into the form, as > apparently this is the only way you can deal with "dueling forms" here. > > Why not combine the two forms into one? Just have a different <input > type="submit" ...> for the second. > Yeah, this looks evil to me. > I would be willing to write a patch, if you were willing to not insist > on Javascript. > Nobody's insisting on anything. The fact that there's Javascript in that form doesn't automatically mean that everyone agrees with it and will defend its existence, as you seem to be suggesting. Go right ahead and write a patch, nobody's discouraging you. > P.S., I don't know what that style="visibility:hidden" stuff is hiding. > It seems to be hiding the form; a piece of Javascript is probably unhiding it though. > By the way, > the above test should be reversed, to > if( $wgUser->isAllowed('deleterevision') && $this->linesonpage > 1 ) {... > considering most views are from normal users, so quit early. > There's no real gain in that, since the $this->linesonpage > 1 check isn't slow. If anything, isAllowed() is probably slower. The summary still doesn't look right to me: I'm pretty sure the form will work on ugly URL wikis (will test when I have a chance), but it seems the form is relying on Javascript while that's probably not necessary. Assigning to Aaron as RevisionDelete is his baby IIRC. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
