API explorer code parsing fix
authorColeman Watts <coleman@civicrm.org>
Thu, 5 Feb 2015 22:32:31 +0000 (17:32 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 5 Feb 2015 22:32:31 +0000 (17:32 -0500)
CRM/Admin/Page/APIExplorer.php

index be46d3eda092e1475ad1be363ecfc0363507c5c8..11e7cb2f350259fc1ac3f01bd3a090810ea10f37 100644 (file)
@@ -157,7 +157,7 @@ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page {
         $contents = $actionFileContents;
       }
       // If action isn't in this file, try generic
-      if (strpos($contents, $fnName) === FALSE) {
+      if (strpos($contents, "function $fnName") === FALSE) {
         $fnName = "civicrm_api3_generic_$action";
         $file = "api/v3/Generic/" . ucfirst($action) . '.php';
         $contents = file_get_contents($file, FILE_USE_INCLUDE_PATH);