<?php
/*
+--------------------------------------------------------------------+
- | 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. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
*
* @param array $params input parameters
*/
+ /**
+ * @param $params
+ *
+ * @return object
+ * @throws API_Exception
+ */
static function create($params) {
+ // Ensure mysql phone function exists
+ CRM_Core_DAO::checkSqlFunctionsExist();
+
if (is_numeric(CRM_Utils_Array::value('is_primary', $params)) ||
// if id is set & is_primary isn't we can assume no change
empty($params['id'])
* @static
*/
static function add(&$params) {
+ // Ensure mysql phone function exists
+ CRM_Core_DAO::checkSqlFunctionsExist();
+
$hook = empty($params['id']) ? 'create' : 'edit';
CRM_Utils_Hook::pre($hook, 'Phone', CRM_Utils_Array::value('id', $params), $params);
*
* @param int $id the contact id
*
+ * @param bool $updateBlankLocInfo
+ * @param null $type
+ * @param array $filters
+ *
* @return array the array of phone ids which are potential numbers
* @access public
* @static
* @param array $entityElements the array containing entity_id and
* entity_table name
*
+ * @param null $type
+ *
* @return array the array of phone ids which are potential numbers
* @access public
* @static
if (!$optionId) {
return;
}
+ // Ensure mysql phone function exists
+ CRM_Core_DAO::checkSqlFunctionsExist();
$tables = array(
'civicrm_phone',
* Call common delete function
*/
static function del($id) {
+ // Ensure mysql phone function exists
+ CRM_Core_DAO::checkSqlFunctionsExist();
return CRM_Contact_BAO_Contact::deleteObjectWithPrimary('Phone', $id);
}
}