function wfVoteUserStatus( $us_id, $vote ) { global $wgUser; // Don't do anything if the user is blocked or the DB is read-only if ( $wgUser->isBlocked() || wfReadOnly() ) { return ''; } $s = new UserStatus(); $update = $s->addStatusVote( $us_id, $vote ); $votes = $s->getStatusVotes( $us_id ); $output = wfMsgExt( 'userstatus-num-agree', 'parsemag', $votes['plus'] ); return $output; }