X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FREST%2F1.0%2Fdhandler;h=4ff5ee9b92177be8ec34ce11e95a43ca0f5ddf79;hp=2243376f50554605cda063911b57cf840a738f9b;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=919e930aa9279b3c5cd12b593889cd6de79d67bf diff --git a/rt/share/html/REST/1.0/dhandler b/rt/share/html/REST/1.0/dhandler index 2243376f5..4ff5ee9b9 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-2015 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2016 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'";