CRM-20091 - Add customValue.gettree api
[civicrm-core.git] / api / v3 / Event.php
index d79674c48e60e6f469c3e5c57c93e72f7fca9258..500d0ed6a63d9e118d9963c81c79cba836331b42 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -226,10 +226,12 @@ function _civicrm_api3_event_getlist_params(&$request) {
   $fieldsToReturn = array('start_date', 'event_type_id', 'title', 'summary');
   $request['params']['return'] = array_unique(array_merge($fieldsToReturn, $request['extra']));
   $request['params']['options']['sort'] = 'start_date DESC';
-  $request['params'] += array(
-    'is_template' => 0,
-    'is_active' => 1,
-  );
+  if (empty($request['params']['id'])) {
+    $request['params'] += array(
+      'is_template' => 0,
+      'is_active' => 1,
+    );
+  }
 }
 
 /**