From 335c13d87862941d02394dbf81f0008e0bd6f889 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 11 May 2021 16:39:47 -0400 Subject: [PATCH] unused function --- CRM/Utils/File.php | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index 5c4ae3c548..79bbbd4dfc 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -622,38 +622,6 @@ HTACCESS; return FALSE; } - /** - * @param $directory - * - * @return string - * @deprecated - * Computation of a relative path requires some base. - * This implementation is problematic because it relies on an - * implicit base which was constructed problematically. - */ - public static function relativeDirectory($directory) { - // Do nothing on windows - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - return $directory; - } - - // check if directory is relative, if so return immediately - if (!self::isAbsolute($directory)) { - return $directory; - } - - // make everything relative from the baseFilePath - $basePath = self::baseFilePath(); - // check if basePath is a substr of $directory, if so - // return rest of string - if (substr($directory, 0, strlen($basePath)) == $basePath) { - return substr($directory, strlen($basePath)); - } - - // return the original value - return $directory; - } - /** * @param $directory * @param string $basePath -- 2.25.1