Browse Source

Proposed change for issue #1010 - Update

Apply the same treatment to service path/content type name as seen in doEntity and doEntityList methods.
Reynold Tan 5 years ago
parent
commit
a525f0fad4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tripal_ws/includes/TripalWebService/TripalContentService_v0_1.inc

+ 1 - 1
tripal_ws/includes/TripalWebService/TripalContentService_v0_1.inc

@@ -110,7 +110,7 @@ class TripalContentService_v0_1 extends TripalWebService {
    * Creates a resource for an expanded field of an entity.
    */
   private function doExpandedField($ctype, $entity_id, $expfield) {
-    $service_path = $this->getServicePath() . '/' . urlencode($ctype) . '/' . $entity_id;
+    $service_path = $this->getServicePath() . '/' . preg_replace('/[^\w]/', '_', $ctype) . '/' . $entity_id;
     $this->resource = new TripalWebServiceResource($service_path);
 
     // Get the TripalBundle, TripalTerm and TripalVocab for this type.