<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | 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$
*
*/
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
// store the submitted values in an array
$params = $this->controller->exportValues($this->_name);
- $ids = array();
-
if ($this->_action & CRM_Core_Action::UPDATE) {
- $ids['id'] = $this->_id;
+ $params['id'] = $this->_id;
}
- CRM_Mailing_BAO_Component::add($params, $ids);
+ $component = CRM_Mailing_BAO_Component::add($params);
+ CRM_Core_Session::setStatus(ts('The mailing component \'%1\' has been saved.', array(
+ 1 => $component->name
+ )
+ ), ts('Saved'), 'success');
+
}
- //end of function
/**
- * Function for validation
+ * Validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
+ * @param $files
+ * @param $options
+ *
* @return mixed true or array of errors
* @access public
* @static