Error-checking: don't allow merging into yourself. You are already 
yourself.

        Patch by fu. 

diffs (13 lines):

diff -r 3d8b759e2c60 -r fd48661e6d2e cgi-bin/LJ/Console/Command/SynMerge.pm
--- a/cgi-bin/LJ/Console/Command/SynMerge.pm    Fri Aug 13 09:42:28 2010 +0800
+++ b/cgi-bin/LJ/Console/Command/SynMerge.pm    Sat Aug 14 17:44:03 2010 +0800
@@ -51,6 +51,9 @@ sub execute {
 
     my $to_u = LJ::load_user($to_user)
         or return $self->error("Invalid user: '$to_user'.");
+
+    return $self->error( "Trying to merge into yourself: '$to_user'." )
+        if $from_u->equals( $to_u );
 
     # we don't want to unlimit this, so reject if we have too many users
     my @ids = $from_u->watched_by_userids( limit => $LJ::MAX_WT_EDGES_LOAD+1 );
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to