Skip to content

Commit

Permalink
Update string replace on relationship to more strictly search for fir…
Browse files Browse the repository at this point in the history
…st occurance.
  • Loading branch information
christianchristensen committed Oct 5, 2011
1 parent b013cb1 commit a54f3a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/rest_wadl_doc.inc
Expand Up @@ -162,7 +162,7 @@ function _build_resource($resourcename, $resource){
$r_info[WADL::RESOURCE][$def['args'][0]['name']][WADL::METHOD][] = $method;
break;
}
if ($rel_id = str_replace("relationships_", "", $op_top)) {
if ((strpos($op_top, "relationships_") == 0) && $rel_id = substr_replace($op_top, "", 0, strlen("relationships_"))) {
$method = _build_retrieve_method($def);
$r_info[WADL::RESOURCE][$def['args'][0]['name']][WADL::RESOURCE][$rel_id] = array(
DOM::ATTRIBUTES => array('path' => $rel_id),
Expand Down

0 comments on commit a54f3a4

Please sign in to comment.