function DrupalPublicStreamWrapper::getLocalPath
Overrides DrupalLocalStreamWrapper::getLocalPath
File
-
includes/
stream_wrappers.inc, line 941
Class
- DrupalPublicStreamWrapper
- Drupal public (public://) stream wrapper class.
Code
protected function getLocalPath($uri = NULL) {
$path = parent::getLocalPath($uri);
if (variable_get('sa_core_2022_012_override', FALSE)) {
return $path;
}
$private_path = variable_get('file_private_path', FALSE);
if ($private_path) {
$private_path = realpath($private_path);
if ($private_path && strpos($path, $private_path) === 0) {
return FALSE;
}
}
return $path;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.