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=7ade8fa53aba8843fdacd2b9c57d0d6dad13e0e9;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=e9e0cf0989259b94d9758eceff448666a2e5a5cc diff --git a/rt/share/html/REST/1.0/dhandler b/rt/share/html/REST/1.0/dhandler index 7ade8fa53..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-2014 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'";