CIVICRM-1844 Remove all references to safe_mode, DEPRECATED as of PHP 5.3.0 and REMOV...
authorJustin Freeman <justin@agileware.com.au>
Fri, 24 Sep 2021 05:11:23 +0000 (15:11 +1000)
committerJustin Freeman <justin@agileware.com.au>
Fri, 24 Sep 2021 05:28:58 +0000 (15:28 +1000)
16 files changed:
CRM/Activity/Import/Controller.php
CRM/Contact/Import/Controller.php
CRM/Contribute/Import/Controller.php
CRM/Core/Payment/Elavon.php
CRM/Core/Payment/FirstData.php
CRM/Core/Smarty.php
CRM/Custom/Import/Controller.php
CRM/Event/Import/Controller.php
CRM/Member/Import/Controller.php
CRM/Upgrade/Headless.php
CRM/Upgrade/Page/Upgrade.php
CRM/Utils/HttpClient.php
api/v3/System/ini-whitelist.txt
bin/ContributionProcessor.php
ext/payflowpro/tests/phpunit/bootstrap.php
ext/search_kit/tests/phpunit/bootstrap.php

index 8370776ea6f494a13bfabcf1178b972b3dcb5276..772c146200526df30829ae1fa5d2444beb1ea833 100644 (file)
@@ -26,10 +26,7 @@ class CRM_Activity_Import_Controller extends CRM_Core_Controller {
   public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
     parent::__construct($title, $modal);
 
-    // lets get around the time limit issue if possible, CRM-2113
-    if (!ini_get('safe_mode')) {
-      set_time_limit(0);
-    }
+    set_time_limit(0);
 
     $this->_stateMachine = new CRM_Import_StateMachine($this, $action);
 
index c965973ffe377bcc75121b6f5874db23beb8cb59..da72132b1ba44c3645c4cd963a5581b69bbf0cd9 100644 (file)
@@ -26,10 +26,7 @@ class CRM_Contact_Import_Controller extends CRM_Core_Controller {
   public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
     parent::__construct($title, $modal);
 
-    // lets get around the time limit issue if possible, CRM-2113
-    if (!ini_get('safe_mode')) {
-      set_time_limit(0);
-    }
+    set_time_limit(0);
 
     $this->_stateMachine = new CRM_Import_StateMachine($this, $action);
 
index b1582781f8f83332e1814cbb934174a20c6b687b..8ec9f32d1f8366df4c8ffb7cc4f11e0112ba5210 100644 (file)
@@ -26,10 +26,7 @@ class CRM_Contribute_Import_Controller extends CRM_Core_Controller {
   public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
     parent::__construct($title, $modal);
 
-    // lets get around the time limit issue if possible, CRM-2113
-    if (!ini_get('safe_mode')) {
-      set_time_limit(0);
-    }
+    set_time_limit(0);
 
     $this->_stateMachine = new CRM_Import_StateMachine($this, $action);
 
index 596d8898cad5ea1f8f979270de4252f9adc6adce..75e2a37d215c946e75de1dd52489d81ce0713c2e 100644 (file)
@@ -157,7 +157,7 @@ class CRM_Core_Payment_Elavon extends CRM_Core_Payment {
     // set this for debugging -look for output in apache error log
     //curl_setopt ($ch,CURLOPT_VERBOSE,1 );
     // ensures any Location headers are followed
-    if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
+    if (ini_get('open_basedir') == '') {
       curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
     }
 
index 5b5d6b1802e39debcff7aa182463511db735a51b..f6968c7e71fc45a14beef86c214b4c2491a024bd 100644 (file)
@@ -222,7 +222,7 @@ class CRM_Core_Payment_FirstData extends CRM_Core_Payment {
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($ch, CURLOPT_TIMEOUT, 36000);
     // ensures any Location headers are followed
-    if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off') {
+    if (ini_get('open_basedir') == '') {
       curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
     }
 
index 5c3afb207f5a759cf869414eaf8a57ae4d8446af..b73df9730703e65bb44686aee94ef83e55bc80ee 100644 (file)
@@ -95,13 +95,7 @@ class CRM_Core_Smarty extends Smarty {
       exit();
     }
 
-    //Check for safe mode CRM-2207
-    if (ini_get('safe_mode')) {
-      $this->use_sub_dirs = FALSE;
-    }
-    else {
-      $this->use_sub_dirs = TRUE;
-    }
+    $this->use_sub_dirs = TRUE;
 
     $customPluginsDir = NULL;
     if (isset($config->customPHPPathDir)) {
index c67e3990314cf229300676cfc20888cc20751840..0f740f59af543edbd6867fd989d50a4e37512828 100644 (file)
@@ -15,10 +15,7 @@ class CRM_Custom_Import_Controller extends CRM_Core_Controller {
   public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
     parent::__construct($title, $modal);
 
-    // lets get around the time limit issue if possible, CRM-2113
-    if (!ini_get('safe_mode')) {
-      set_time_limit(0);
-    }
+    set_time_limit(0);
 
     $this->_stateMachine = new CRM_Import_StateMachine($this, $action);
 
index baf5521a8893394eebfbc4a539769182315049e2..233b63231eab5222c8a5eef1f45e8c29c16f0627 100644 (file)
@@ -26,10 +26,7 @@ class CRM_Event_Import_Controller extends CRM_Core_Controller {
   public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
     parent::__construct($title, $modal);
 
-    // lets get around the time limit issue if possible, CRM-2113
-    if (!ini_get('safe_mode')) {
-      set_time_limit(0);
-    }
+    set_time_limit(0);
 
     $this->_stateMachine = new CRM_Import_StateMachine($this, $action);
 
index 2a57c0a38190c1f638e8d9e3f707df817086f98c..b647e940e5657c8ef1a77c13b0e4e61474283c93 100644 (file)
@@ -26,10 +26,7 @@ class CRM_Member_Import_Controller extends CRM_Core_Controller {
   public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
     parent::__construct($title, $modal);
 
-    // lets get around the time limit issue if possible, CRM-2113
-    if (!ini_get('safe_mode')) {
-      set_time_limit(0);
-    }
+    set_time_limit(0);
 
     $this->_stateMachine = new CRM_Import_StateMachine($this, $action);
 
index 0e1e869b0c732586d70db9012c4ee1c51b19029b..6bd63d32ddd26831d436f899d6956070f2b3955e 100644 (file)
@@ -25,10 +25,7 @@ class CRM_Upgrade_Headless {
    *   - message: string, HTML-ish blob
    */
   public function run($enablePrint = TRUE) {
-    // lets get around the time limit issue if possible for upgrades
-    if (!ini_get('safe_mode')) {
-      set_time_limit(0);
-    }
+    set_time_limit(0);
 
     $upgrade = new CRM_Upgrade_Form();
     list($currentVer, $latestVer) = $upgrade->getUpgradeVersions();
index 06a377924c141abcfc58504a5249f41437250b69..5b71fed4939dfd28a7237dd5ea6d9dc350a58b82 100644 (file)
@@ -29,10 +29,7 @@ class CRM_Upgrade_Page_Upgrade extends CRM_Core_Page {
    * @throws \Exception
    */
   public function run() {
-    // lets get around the time limit issue if possible for upgrades
-    if (!ini_get('safe_mode')) {
-      set_time_limit(0);
-    }
+    set_time_limit(0);
 
     Civi::resources()->addStyleFile('civicrm', 'css/admin.css');
 
index c2d12ae18cffc677d923bd78b7b1c62a78147289..0286c4f793263d50225ab2106091b1d7881bff8f 100644 (file)
@@ -201,7 +201,7 @@ class CRM_Utils_HttpClient {
    * @return bool
    */
   public function isRedirectSupported() {
-    return (ini_get('open_basedir') == '') && (ini_get('safe_mode') == 'Off' || ini_get('safe_mode') == '' || ini_get('safe_mode') === FALSE);
+    return (ini_get('open_basedir') == '');
   }
 
 }
index ab674b93fdde4bb22095ebab0e08d812137bc6a1..4e6dbabfd0dd25b919b398d80b295050096b4521 100644 (file)
@@ -180,7 +180,6 @@ register_long_arrays
 report_memleaks
 report_zend_debug
 request_order
-safe_mode
 # Omit: safe_mode_allowed_env_vars
 # Omit: safe_mode_exec_dir
 safe_mode_gid
index a6c7bee51d019b71bfd2f7d83fd9ee79a607771d..3de786f487fe97e674f219b8f7958a22ddfeee18 100644 (file)
@@ -545,10 +545,7 @@ CRM_Core_Error::debug_log_message('ContributionProcessor.php');
 $lock = Civi::lockManager()->acquire('worker.contribute.CiviContributeProcessor');
 
 if ($lock->isAcquired()) {
-  // try to unset any time limits
-  if (!ini_get('safe_mode')) {
-    set_time_limit(0);
-  }
+  set_time_limit(0);
 
   CiviContributeProcessor::process();
 }
index a5b49253c819c5ab65947070e7ee67d0cac48ea1..5133778c819133e6d0a8d558055d5aa1a48b1ec3 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
 ini_set('memory_limit', '2G');
-ini_set('safe_mode', 0);
 // phpcs:disable
 eval(cv('php:boot --level=classloader', 'phpcode'));
 // phpcs:enable
index a5b49253c819c5ab65947070e7ee67d0cac48ea1..5133778c819133e6d0a8d558055d5aa1a48b1ec3 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 
 ini_set('memory_limit', '2G');
-ini_set('safe_mode', 0);
 // phpcs:disable
 eval(cv('php:boot --level=classloader', 'phpcode'));
 // phpcs:enable