Merge pull request #6553 from sudhabisht/C12658
[civicrm-core.git] / CRM / Mailing / Form / Schedule.php
index 223d8e25c6f09c6dcabda79ab1edf4a720f95051..bed7590956f42172b91837427e723d8950c88c9c 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
   +--------------------------------------------------------------------+
-  | CiviCRM version 4.6                                                |
+  | CiviCRM version 4.7                                                |
   +--------------------------------------------------------------------+
-  | Copyright CiviCRM LLC (c) 2004-2014                                |
+  | Copyright CiviCRM LLC (c) 2004-2015                                |
   +--------------------------------------------------------------------+
   | This file is a part of CiviCRM.                                    |
   |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_Mailing_Form_Schedule extends CRM_Core_Form {
 
   /**
-   * Set variables up before form is built
+   * Set variables up before form is built.
    *
    * @return void
    */
   public function preProcess() {
     if (CRM_Mailing_Info::workflowEnabled() &&
-      !CRM_Core_Permission::check('schedule mailings')
+      !CRM_Core_Permission::check('schedule mailings') &&
+      !CRM_Core_Permission::check('access CiviMail')
     ) {
       $url = CRM_Utils_System::url('civicrm/mailing/browse/unscheduled', 'reset=1&scheduled=false');
       CRM_Utils_System::redirect($url);
@@ -88,7 +89,7 @@ class CRM_Mailing_Form_Schedule extends CRM_Core_Form {
   }
 
   /**
-   * Build the form object for the last step of the mailing wizard
+   * Build the form object for the last step of the mailing wizard.
    *
    * @param
    *
@@ -348,7 +349,7 @@ class CRM_Mailing_Form_Schedule extends CRM_Core_Form {
   }
 
   /**
-   * Display Name of the form
+   * Display Name of the form.
    *
    *
    * @return string
@@ -356,4 +357,5 @@ class CRM_Mailing_Form_Schedule extends CRM_Core_Form {
   public function getTitle() {
     return ts('Schedule or Send');
   }
+
 }