Merge pull request #11199 from twomice/CRM-21348_joomla_edit_link
[civicrm-core.git] / CRM / Admin / Page / Job.php
index ce8ab72ddc6a82ad64585436b7bd1190b25fc521..25e6c0a2fb0fba6d0d6da60e94ea843374ccf14e 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2017                                |
+ | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2017
+ * @copyright CiviCRM LLC (c) 2004-2018
  */
 
 /**
@@ -142,6 +142,10 @@ class CRM_Admin_Page_Job extends CRM_Core_Page_Basic {
    * @param null $action
    */
   public function browse($action = NULL) {
+    // check if non-prod mode is enabled.
+    if (CRM_Core_Config::environment() != 'Production') {
+      CRM_Core_Session::setStatus(ts('Execution of scheduled jobs has been turned off by default since this is a non-production environment. You can override this for particular jobs by adding runInNonProductionEnvironment=TRUE as a parameter.'), ts("Non-production Environment"), "warning", array('expires' => 0));
+    }
 
     // using Export action for Execute. Doh.
     if ($this->_action & CRM_Core_Action::EXPORT) {