<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
protected $_surveyId;
/**
- * surveyTitle
+ * SurveyTitle
*
* @var string
*/
/**
- * Function to set variables up before form is built
+ * Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
if (!CRM_Campaign_BAO_Campaign::accessCampaign()) {
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_surveyId) {
CRM_Campaign_BAO_Survey::del($this->_surveyId);
CRM_Core_Session::setStatus('', ts("'%1' survey has been deleted.", array(1 => $this->_surveyTitle)), 'success');
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey'));
- } else {
+ }
+ else {
CRM_Core_Error::fatal(ts('Delete action is missing expected survey ID.'));
}
}
-}
+}