[mb-devel] Re: [mb-commits] r9411 - mb_server/trunk/cgi-bin/MusicBrainz/Server

Lukáš Lalinský lalinsky at gmail.com
Wed Aug 29 05:40:14 UTC 2007


Hi Aurelien,

What was the reason for this change? I'm asking because it currently
breaks the "Approve" feature, which is intended to work even on your own
edits.

Lukas

On Ut, 2007-08-28 at 22:54 +0000, root at musicbrainz.org wrote:
> Author: murdos
> Date: 2007-08-28 15:54:18 -0700 (Tue, 28 Aug 2007)
> New Revision: 9411
> 
> Modified:
>    mb_server/trunk/cgi-bin/MusicBrainz/Server/Vote.pm
> Log:
> Prevent users to vote to their own edits.
> 
> 
> Modified: mb_server/trunk/cgi-bin/MusicBrainz/Server/Vote.pm
> ===================================================================
> --- mb_server/trunk/cgi-bin/MusicBrainz/Server/Vote.pm	2007-08-28 09:18:44 UTC (rev 9410)
> +++ mb_server/trunk/cgi-bin/MusicBrainz/Server/Vote.pm	2007-08-28 22:54:18 UTC (rev 9411)
> @@ -65,11 +65,11 @@
>  	$sql->Do("LOCK TABLE vote_open IN EXCLUSIVE MODE");
>  
>  	my $mod_row = $sql->SelectSingleRowHash(
> -		"SELECT novotes, status FROM moderation_open WHERE id = ?",
> +		"SELECT novotes, status, moderator FROM moderation_open WHERE id = ?",
>  		$modid,
>  	);
>  
> -	(defined($mod_row) and $mod_row->{status} == STATUS_OPEN)
> +	(defined($mod_row) and $mod_row->{status} == STATUS_OPEN and $mod_row->{moderator} ne $uid)
>  		or return;
>  
>  	# Find the user's previous (most recent) vote for this mod

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?ISO-8859-1?Q?digit=E1lne?=
	=?ISO-8859-1?Q?_podp=EDsan=E1?= =?UTF-8?Q?_=C4=8Das=C5=A5?=
	=?ISO-8859-1?Q?_spr=E1vy?=
Url : http://lists.musicbrainz.org/pipermail/musicbrainz-devel/attachments/20070829/9ca15d06/attachment.pgp


More information about the MusicBrainz-devel mailing list