Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2014-12-09-14-48-51
[civicrm-core.git] / api / v3 / LocBlock.php
index 17270805238c2e49eaeb4cffb33d709e155a46f7..83128308e8141bf8b04e66028094c66dabb8a65a 100644 (file)
@@ -2,9 +2,9 @@
 /*
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -101,6 +101,7 @@ function civicrm_api3_loc_block_get($params) {
   // If a return param has been set then fetch the appropriate fk objects
   // This is a helper because api chaining does not work with a key like 'email_2'
   if (!empty($options['return'])) {
+    unset($params['return']);
     $values = array();
     $items = array('address', 'email', 'phone', 'im');
     $returnAll = !empty($options['return']['all']);
@@ -128,7 +129,7 @@ function civicrm_api3_loc_block_get($params) {
  *
  * @param array $params array containing id of the record to be deleted
  *
- * @return array  returns flag true if successfull, error message otherwise
+ * @return array API result array
  * {@getfields loc_block_delete}
  * @access public
  */