Xaviers fix for CRM-14506
authorsystopia <endres@systopia.de>
Mon, 5 May 2014 09:25:19 +0000 (11:25 +0200)
committerTim Otten <totten@civicrm.org>
Tue, 6 May 2014 16:52:00 +0000 (09:52 -0700)
CRM/Utils/REST.php

index 6d501ddf46ead253d09bc9b0cf3f075f8074dfd2..d4d15d2cfe5c5033e6241227b92779af0341d28a 100644 (file)
@@ -248,7 +248,8 @@ class CRM_Utils_REST {
     if (!empty($r)) {
       $q = $r;
     }
-    if (!empty($q)) {
+    $entity = CRM_Utils_array::value('entity', $requestParams);
+    if ( empty($entity) && !empty($q)) {
       $args = explode('/', $q);
       // If the function isn't in the civicrm namespace, reject the request.
       if ($args[0] != 'civicrm') {