$fields = RecentChange::selectFields();
// JOIN on watchlist for users
- if ( $uid ) {
+ if ( $uid && $this->getUser()->isAllowed( 'viewmywatchlist' ) ) {
$tables[] = 'watchlist';
$fields[] = 'wl_user';
$fields[] = 'wl_notificationtimestamp';
$counter = 1;
$list = ChangesList::newFromContext( $this->getContext() );
+ if ( $rows->numRows() === 0 ) {
+ $this->getOutput()->wrapWikiMsg(
+ "<div class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
+ );
+ return;
+ }
+
$s = $list->beginRecentChangesList();
foreach ( $rows as $obj ) {
if ( $limit == 0 ) {
}
/**
- * Send the text to be displayed after the options, for use in
- * Recentchangeslinked
+ * Send the text to be displayed after the options, for use in subclasses.
*
* @param FormOptions $opts
*/