+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
'class' => 'CRM_Contact_Form_Task_Email',
'result' => TRUE,
),
- self::SMS_CONTACTS => array(
- 'title' => ts('Send SMS to Contacts'),
- 'class' => 'CRM_Contact_Form_Task_SMS',
- 'result' => TRUE,
- ),
self::DELETE_CONTACTS => array(
'title' => ts('Delete Contacts'),
'class' => 'CRM_Contact_Form_Task_Delete',
),
);
+ //CRM-16329, if SMS provider is configured show sms action.
+ $providersCount = CRM_SMS_BAO_Provider::activeProviderCount();
+ if ($providersCount) {
+ self::$_tasks[self::SMS_CONTACTS] = array(
+ 'title' => ts('Send SMS to Contacts'),
+ 'class' => 'CRM_Contact_Form_Task_SMS',
+ 'result' => TRUE,
+ );
+ }
+
if (CRM_Contact_BAO_ContactType::isActive('Household')) {
$label = CRM_Contact_BAO_ContactType::getLabel('Household');
self::$_tasks[self::HOUSEHOLD_CONTACTS] = array(