-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
nikerabbit(a)svn.wikimedia.org wrote:
* Don't mess up diff link when revision is not
deleted
- if( $rev->userCan( Revision::DELETED_TEXT ) ) {
- $difftext = '(' . $sk->makeKnownLinkObj( $page, $messages['diff'],
'diff=prev&oldid='.$row->rev_id ) . ')';
- } else {
- $difftext = '(' . $messages['diff'] . ')';
+
+ if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
+ if ( $rev->userCan( Revision::DELETED_TEXT ) ) {
+ $difftext .= '(' . $sk->makeKnownLinkObj( $page,
$messages['diff'], 'diff=prev&oldid='.$row->rev_id ) .
')';
+ } else {
+ $difftext .= '(' . $messages['diff'] . ')';
+ }
This change is... very very wrong, breaking all diff links.
Has been reverted.
For reference, Revision->userCan() checks whether the current user has
permission to see the requested item on that particular revision. In
this case checking for text, so it'll return true if either:
* the text is not marked as hidden/deleted
- -or-
* the text is marked as hidden/deleted, and the user has permission to
view revision-deleted text
Changing it to Revision->isDeleted() means that the link doesn't get
displayed if the text isn't marked as hidden/deleted... which ain't
right. :)
Further note: revision deletion markings currently aren't used as there
are some as-yet-unsolved problems.
- -- brion vibber (brion @
pobox.com)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFFa8ARwRnhpk1wk44RAtrYAJ9hhaJGU+FTFwTkA4AX7oG5TjIrYwCgkEaP
q4C9nwBPKu7w9LWLkApkDas=
=cnok
-----END PGP SIGNATURE-----