X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm%2FMailSettings.php;h=21f6a7ec1a227d4242b7514c94a47aa92ee4b057;hb=0c07fff8870aebc78542d5519ba7c4e4689c53cf;hp=35f7a5337edc2c1d1484261fe5ef34ec05d3c1e4;hpb=3b16a28270778af5122d850f6a4ee7400b8f9920;p=civicrm-core.git diff --git a/CRM/Admin/Form/MailSettings.php b/CRM/Admin/Form/MailSettings.php index 35f7a5337e..21f6a7ec1a 100644 --- a/CRM/Admin/Form/MailSettings.php +++ b/CRM/Admin/Form/MailSettings.php @@ -1,9 +1,9 @@ add('checkbox', 'is_ssl', ts('Use SSL?')); - $usedfor = array(1 => ts('Bounce Processing'), + $usedfor = array( + 1 => ts('Bounce Processing'), 0 => ts('Email-to-Activity Processing'), ); $this->add('select', 'is_default', ts('Used For?'), $usedfor); } /** - * Add local and global form rules + * Add local and global form rules. * - * @access protected * * @return void */ - function addRules() { + public function addRules() { $this->addFormRule(array('CRM_Admin_Form_MailSettings', 'formRule')); } /** - * Global validation rules for the form + * Global validation rules for the form. * - * @param array $fields posted values of the form + * @param array $fields + * Posted values of the form. * - * @return array list of errors to be posted back to the form - * @static - * @access public + * @return array + * list of errors to be posted back to the form */ - static function formRule($fields) { + public static function formRule($fields) { $errors = array(); // Check for default from email address and organization (domain) name. Force them to change it. if ($fields['domain'] == 'EXAMPLE.ORG') { @@ -122,13 +121,12 @@ class CRM_Admin_Form_MailSettings extends CRM_Admin_Form { } /** - * Process the form submission + * Process the form submission. * - * @access public * * @return void */ - function postProcess() { + public function postProcess() { if ($this->_action & CRM_Core_Action::DELETE) { CRM_Core_BAO_MailSettings::deleteMailSettings($this->_id); CRM_Core_Session::setStatus("", ts('Mail Setting Deleted.'), "success"); @@ -157,7 +155,9 @@ class CRM_Admin_Form_MailSettings extends CRM_Admin_Form { $params = array(); foreach ($fields as $f) { if (in_array($f, array( - 'is_default', 'is_ssl'))) { + 'is_default', + 'is_ssl', + ))) { $params[$f] = CRM_Utils_Array::value($f, $formValues, FALSE); } else { @@ -185,4 +185,3 @@ class CRM_Admin_Form_MailSettings extends CRM_Admin_Form { } } -