<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Admin_Form_MailSettings extends CRM_Admin_Form {
/**
- * Build the form object
+ * Build the form object.
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
$this->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') {
}
/**
- * 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");
$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 {
}
}
-