Merge remote-tracking branch 'upstream/4.6' into 4.6-master-2015-07-30-23-34-40
[civicrm-core.git] / CRM / Campaign / Form / Survey.php
index 4d6e5075f41df2aa0a85c92924ca79015ea999fb..fbb5de21d3cc57db809ba4f25c4bbd97939bc255 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | 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_Campaign_Form_Survey extends CRM_Core_Form {
 
   /**
-   * The id of the object being edited
+   * The id of the object being edited.
    *
    * @var int
    */
   protected $_surveyId;
 
   /**
-   * Action
+   * Action.
    *
    * @var int
    */
   protected $_action;
 
   /**
-   * SurveyTitle
+   * SurveyTitle.
    *
    * @var string
    */
@@ -90,9 +90,7 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form {
   }
 
   /**
-   * Build the form object
-   *
-   * @param null
+   * Build the form object.
    *
    * @return void
    */
@@ -128,11 +126,10 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form {
         ),
       );
     }
-    $buttons[] =
-      array(
-        'type' => 'cancel',
-        'name' => ts('Cancel'),
-      );
+    $buttons[] = array(
+      'type' => 'cancel',
+      'name' => ts('Cancel'),
+    );
     $this->addButtons($buttons);
 
     $url = CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey');
@@ -151,10 +148,10 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form {
 
       $this->postProcessHook();
 
-      if ($this->_action & CRM_Core_Action::ADD)
+      if ($this->_action & CRM_Core_Action::ADD) {
         CRM_Utils_System::redirect(CRM_Utils_System::url("civicrm/survey/configure/questions",
           "action=update&reset=1&id={$this->_surveyId}"));
-
+      }
       if ($this->controller->getButtonName('submit') == "_qf_{$className}_upload_done") {
         CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey'));
       }
@@ -183,4 +180,5 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form {
       return 'CRM/Campaign/Form/Survey/Tab.tpl';
     }
   }
+
 }