Allow alternate ways to say conflict_strategy (which is a pain to type!)
authorGreg Sabino Mullane <greg@endpoint.com>
Thu, 26 Jun 2014 17:32:43 +0000 (13:32 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Thu, 26 Jun 2014 17:32:43 +0000 (13:32 -0400)
bucardo

diff --git a/bucardo b/bucardo
index fac93d3a17eedb35658d1365e7c8f85922751f4f..b82406b864e0c7cfe3b0a4c5d9866874af25e105 100755 (executable)
--- a/bucardo
+++ b/bucardo
@@ -4388,6 +4388,13 @@ sub add_sync {
         $dbcols->{kidsalive} = 0;
     }
 
+    ## Allow some alternate way to say things
+    my $cs = 'conflict_strategy';
+    if (exists $dbcols->{$cs}) {
+        $dbcols->{$cs} = 'bucardo_latest'
+            if $dbcols->{$cs} eq 'default' or $dbcols->{$cs} eq 'latest';
+    }
+
     ## Attempt to insert this into the database
     my $columns = join ',' => keys %$dbcols;
     my $qs = '?,' x keys %$dbcols;