From: Chad Horohoe Date: Sun, 2 Aug 2009 03:07:07 +0000 (+0000) Subject: (bug 19394) Recent changes feed items corresponding to some log entries are broken... X-Git-Tag: 1.31.0-rc.0~40585 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=523ce0a9b9fac162f38a0772f2e1568b1a208261;p=lhc%2Fweb%2Fwiklou.git (bug 19394) Recent changes feed items corresponding to some log entries are broken. Patch by Mormegil --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b3a85a7259..b5341dd6ab 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -361,6 +361,8 @@ this. Was used when mwEmbed was going to be an extension. "usercssyoucanpreview" and "userjsyoucanpreview" respectively. * (bug 12110) Split the rights for editing users' CSS/JS subpage from "editusercssjs" into "editusercss" and edituserjs" respectively. +* (bug 19394) RecentChanges feed URLs for log items with no revisions + (eg Newuser, Userrights) are no longer broken == API changes in 1.16 == diff --git a/includes/ChangesFeed.php b/includes/ChangesFeed.php index a0b375eea4..ce49b005fd 100644 --- a/includes/ChangesFeed.php +++ b/includes/ChangesFeed.php @@ -118,7 +118,7 @@ class ChangesFeed { $item = new FeedItem( $title->getPrefixedText(), FeedUtils::formatDiff( $obj ), - $title->getFullURL( 'diff=' . $obj->rc_this_oldid . '&oldid=prev' ), + $obj->rc_this_oldid ? $title->getFullURL( 'diff=' . $obj->rc_this_oldid . '&oldid=prev' ) : $title->getFullURL(), $obj->rc_timestamp, ($obj->rc_deleted & Revision::DELETED_USER) ? wfMsgHtml('rev-deleted-user') : $obj->rc_user_text, $talkpage->getFullURL() diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 005069b289..4ed47d582e 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -71,7 +71,7 @@ class FeedUtils { $anon = new User(); $accErrors = $title->getUserPermissionsErrors( 'read', $anon, true ); - if( $title->getNamespace() >= 0 && !$accErrors ) { + if( $title->getNamespace() >= 0 && !$accErrors && $newid ) { if( $oldid ) { wfProfileIn( __FUNCTION__."-dodiff" );