mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 11:37:12 +02:00
Fix for inefficient path parts
This commit is contained in:
@@ -26,11 +26,11 @@ class MediumFactory
|
||||
return null;
|
||||
}
|
||||
|
||||
$path = dirname($file);
|
||||
$filename = basename($file);
|
||||
$parts = explode('.', $filename);
|
||||
$ext = array_pop($parts);
|
||||
$basename = implode('.', $parts);
|
||||
$parts = pathinfo($file);
|
||||
$path = $parts['dirname'];
|
||||
$filename = $parts['basename'];
|
||||
$ext = $parts['extension'];
|
||||
$basename = $parts['filename'];
|
||||
|
||||
$config = Grav::instance()['config'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user