Page MenuHomePhabricator

MiniInviteHooks::createOpinionCheck if expression in a foreach loop is site-specific
Closed, ResolvedPublic

Description

@ashley should be able to know more about this.

MiniInvite/InviteFriendOnEdit.php
foreach ( $res as $row ) {
	// @todo FIXME: this is way too site-specific...
	if ( $wgLang->uc( $row->cl_to ) == 'OPINIONS' ) {
		$_SESSION['new_opinion'] = $title->getText();
	}
}

Event Timeline

ashley claimed this task.

The condition was changed in MiniInvite version 2.4.2 (31091ae2574fa3b8229507762931bd5d5ca258cf) from "is the given page in Category:Opinions?" to "is the given page in the blog namespace (NS_BLOG)?", which resolves this task at least in some manner.