浏览代码

Propose change for issue # 1010

Apply the same treatment to service path as seen in doEntityList method.
Reynold Tan 5 年之前
父节点
当前提交
f57c57d0ea
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tripal_ws/includes/TripalWebService/TripalContentService_v0_1.inc

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

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