Last modified: 2007-01-22 01:28:14 UTC
[[Special:Oversight]] should show diffs as well as a revisions so that we can see what was changed and easily locate what the offending material was that was hidden.
Created attachment 2841 [details] Patch to add diffs to oversight This patch show the diff (if possible) of the hidden revision to last remaining revision before it. If this revision was the first or the page was archived, it returns an MediaWiki message error. This is not a high-traffic area, so no caching is called. Here are the MW: messages used: *oversight-header - page explanation...blah *oversight-nodiff - diff can't be made, first or page deleted *oversight-difference - "(Difference from previous remaining revision)" *oversight-id - "(Previous ID=" *oversight-prev - "last previous revision" *oversight-hidden - "hidden revision"
Created attachment 2863 [details] Update; fix bugs, remove need for oversight-id message
Created attachment 2889 [details] Update; XHTML comp, remove need for MW messages
Haven't tested, but some comments from first reading: + $compare = $wgRequest->getIntOrNull( 'compare' ); + if ( $compare == 1 && !is_null( $revision )) { Since the value of the compare parameter isn't used, you should probably just use getCheck and a nice true/false comparison. Or actually, it might be better to use 'diff' and 'oldid' parameters in a way that's more consistent with regular diffs. + $wgOut->addHtml( 'Below is a list of revisions permanantly hidden from public view.<br></br> Above is not localized and, bad HTML. Set it up as a message, add it as wikitext, and use <br/> if it's necessary to use a br. + $text = strval( $rev->getText() ); ... + if (strlen($text) < 1) { + $wgOut->addHtml(wfmsg('hiderevision-error-missing')); + } else { This is incorrect; revisions may legitimately be zero-length strings. For error conditions, check for null (?) return values. [Also there's some funky whitespace and inconsisent case on the function name here.] + "<p>Unable to track changes as there is currently no previous revision for the page. Either:</p><ul>" . [snip] Text not localized; move these to messages, preferably wiki-format.
Created attachment 2909 [details] Update; messages localized like the rest, minor fixes It now uses &diff=(0 or 1) to denote comparisons, and uses getCheck to make a true/false comparison. Revisions error check for null rather than blank revs.
Created attachment 2910 [details] Add "oversight-difference" message
Created attachment 2932 [details] Update: fix some things Rob pointed out
Created attachment 2934 [details] Fix newlines, more consistant case/spacing use
Created attachment 2946 [details] Update; support internationalization
Comment on attachment 2946 [details] Update; support internationalization This isn't a patch; it's a full file.
Created attachment 2947 [details] Update; support internationalization Wrong file, I just noticed that when I clicked [diff]
Created attachment 2948 [details] Update HideRevision.i18n - add some french bits
Created attachment 2949 [details] Update HideRevision.i18n - add some needed messeges
I don't quite understand the changing of two instances of $skin->makeLinkObj() to $skin->makeKnownLinkObj() - these will cause false bluelinks when the pages don't exist.
Created attachment 2982 [details] Use LinkObject correctly for usern links
Created attachment 3012 [details] Unified diff
Created attachment 3086 [details] Update Secure form more, remove commented out line, some Msg changes.
Created attachment 3102 [details] Fix one fr message
Done in r19543