From a996bf825fcc3537a584041beccdde5a715593a7 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 5 Feb 2014 09:59:48 -0800 Subject: [PATCH] CRM_Utils_Check_Security - Make getFilePathMarker non-static If we write tests for this, it will be harder to run with different markers if the function is static. --- CRM/Utils/Check/Security.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Utils/Check/Security.php b/CRM/Utils/Check/Security.php index 5ff19b29fc..35b47cfbd4 100644 --- a/CRM/Utils/Check/Security.php +++ b/CRM/Utils/Check/Security.php @@ -65,7 +65,7 @@ class CRM_Utils_Check_Security { * @TODO This function might be better shared in CRM_Utils_Check * class, but that class doesn't yet exist. */ - static function getFilePathMarker() { + public function getFilePathMarker() { $config = CRM_Core_Config::singleton(); switch ($config->userFramework) { case 'Joomla': @@ -123,7 +123,7 @@ class CRM_Utils_Check_Security { $log_filename = $log->_filename; $config = CRM_Core_Config::singleton(); - $filePathMarker = CRM_Utils_Check_Security::getFilePathMarker(); + $filePathMarker = $this->getFilePathMarker(); // Hazard a guess at the URL of the logfile, based on common // CiviCRM layouts. @@ -160,7 +160,7 @@ class CRM_Utils_Check_Security { */ public function checkUploadsAreNotAccessible() { $config = CRM_Core_Config::singleton(); - $filePathMarker = CRM_Utils_Check_Security::getFilePathMarker(); + $filePathMarker = $this->getFilePathMarker(); if ($upload_url = explode($filePathMarker, $config->imageUploadURL)) { if ($files = glob($config->uploadDir . '/*')) { @@ -200,7 +200,7 @@ class CRM_Utils_Check_Security { $config = CRM_Core_Config::singleton(); $log = CRM_Core_Error::createDebugLogger(); $log_name = $log->_filename; - $filePathMarker = CRM_Utils_Check_Security::getFilePathMarker(); + $filePathMarker = $this->getFilePathMarker(); $paths = array( $config->uploadDir, -- 2.25.1