From: Tara L Andrews Date: Tue, 11 Sep 2012 08:10:13 +0000 (+0200) Subject: Merge branch 'master' of github.com:tla/stemmatology X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2d5c5be13c0cf2999d4d3c9ae1bc7ba83fbdf9f0;p=scpubgit%2Fstemmatology.git Merge branch 'master' of github.com:tla/stemmatology Conflicts: stemmaweb/lib/stemmaweb/Controller/Root.pm --- 2d5c5be13c0cf2999d4d3c9ae1bc7ba83fbdf9f0 diff --cc stemmaweb/lib/stemmaweb/Controller/Root.pm index 5decf72,070f7d8..5ab5e92 --- a/stemmaweb/lib/stemmaweb/Controller/Root.pm +++ b/stemmaweb/lib/stemmaweb/Controller/Root.pm @@@ -319,10 -319,8 +319,10 @@@ sub stemma :Local :Args(2) try { if( $stemmaid eq 'n' ) { # We are adding a new stemma. + $stemmaid = $tradition->stemma_count; $stemma = $tradition->add_stemma( 'dot' => $dot ); - $stemmaid = $tradition->stemma_count - 1; + } elsif( $stemmaid !~ /^\d+$/ ) { + return _json_error( $c, 403, "Invalid stemma ID specification $stemmaid" ); } elsif( $stemmaid < $tradition->stemma_count ) { # We are updating an existing stemma. $stemma = $tradition->stemma( $stemmaid );