Commit 7bd2274b authored by webchick's avatar webchick

Issue #1811372 by sdboyer: Fixed FileStorage should utilize late static...

Issue #1811372 by sdboyer: Fixed FileStorage should utilize late static binding for inheritance friendliness.
parent 3c698fb7
......@@ -53,7 +53,7 @@ public function __construct($directory) {
* The path to the configuration file.
*/
public function getFilePath($name) {
return $this->directory . '/' . $name . '.' . self::getFileExtension();
return $this->directory . '/' . $name . '.' . static::getFileExtension();
}
/**
......@@ -189,7 +189,7 @@ public function listAll($prefix = '') {
if (!file_exists($this->directory)) {
throw new StorageException($this->directory . '/ not found.');
}
$extension = '.' . self::getFileExtension();
$extension = '.' . static::getFileExtension();
$files = glob($this->directory . '/' . $prefix . '*' . $extension);
$clean_name = function ($value) use ($extension) {
return basename($value, $extension);
......
......@@ -44,7 +44,7 @@ public function getFilePath($name) {
$path = FALSE;
foreach (array('profile', 'module', 'theme') as $type) {
if ($path = drupal_get_path($type, $owner)) {
$file = $path . '/config/' . $name . '.' . self::getFileExtension();
$file = $path . '/config/' . $name . '.' . static::getFileExtension();
if (file_exists($file)) {
return $file;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment