X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FREST%2F1.0%2Fdhandler;h=ab3121d96838d756d5149e11c4972decd9d8375e;hb=de9d037528895f7151a9aead6724ce2df95f9586;hp=7ade8fa53aba8843fdacd2b9c57d0d6dad13e0e9;hpb=45d35d5739d05e602bc317739485693e0e9ff0b5;p=freeside.git diff --git a/rt/share/html/REST/1.0/dhandler b/rt/share/html/REST/1.0/dhandler index 7ade8fa53..ab3121d96 100755 --- a/rt/share/html/REST/1.0/dhandler +++ b/rt/share/html/REST/1.0/dhandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -100,22 +100,22 @@ if ($object eq 'show' || # $REST/show if (my ($type, $oids, $extra) = ($id =~ m#^($name)/($list|$labels)(?:(/.*))?$#o)) { - $extra ||= ''; - my ($attr, $args) = $extra =~ m{^(?:/($name)(?:/(.*))?)?$}o; - my $tids; - if ($attr and $attr eq 'history' and $args) { - ($tids) = $args =~ m#id/(\d.*)#o; - } - # expand transaction and attachment range specifications - # (if applicable) - foreach my $oid (expand_list($oids)) { - if ($tids) { - push(@objects, "$type/$oid/$attr/id/$_") for expand_list($tids); - } else { - push(@objects, "$type/$oid$extra"); - } - } - } + $extra ||= ''; + my ($attr, $args) = $extra =~ m{^(?:/($name)(?:/(.*))?)?$}o; + my $tids; + if ($attr and $attr eq 'history' and $args) { + ($tids) = $args =~ m#id/(\d.*)#o; + } + # expand transaction and attachment range specifications + # (if applicable) + foreach my $oid (expand_list($oids)) { + if ($tids) { + push(@objects, "$type/$oid/$attr/id/$_") for expand_list($tids); + } else { + push(@objects, "$type/$oid$extra"); + } + } + } else { $status = "400 Bad Request"; $output = "Invalid object ID specified: '$id'";