[Rt-commit] r16464 - in rt/3.8/trunk: share/html/REST/1.0

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Oct 21 18:14:50 EDT 2008


Author: alexmv
Date: Tue Oct 21 18:14:50 2008
New Revision: 16464

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/share/html/REST/1.0/dhandler

Log:
 r38469 at kohr-ah:  chmrr | 2008-10-21 18:14:37 -0400
  * Fix from Philip Kime <philip at kime.org.uk> for when there is a "type" field


Modified: rt/3.8/trunk/share/html/REST/1.0/dhandler
==============================================================================
--- rt/3.8/trunk/share/html/REST/1.0/dhandler	(original)
+++ rt/3.8/trunk/share/html/REST/1.0/dhandler	Tue Oct 21 18:14:50 2008
@@ -142,7 +142,8 @@
             my ($type, $id);
 
             # Look for matching types in the ID, form, and URL.
-            $type = exists $k->{type} ? $k->{type} : $utype;
+            $type = $utype || $k->{id};
+            $type =~ s|^([^/]+)/\d+$|$1| if !$utype;
             $type =~ s|^(?:$utype)?|$utype/| if $utype;
             $type =~ s|/$|| if $type;
 


More information about the Rt-commit mailing list