unused function
authordemeritcowboy <demeritcowboy@hotmail.com>
Tue, 11 May 2021 20:39:47 +0000 (16:39 -0400)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Tue, 11 May 2021 20:39:47 +0000 (16:39 -0400)
CRM/Utils/File.php

index 5c4ae3c5484e6d4df801e198f91a4d5a5e099a96..79bbbd4dfc62eb4fd8005cbc19360eceb8210ad1 100644 (file)
@@ -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