mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Also clean relative paths in cleanPath()
This commit is contained in:
parent
f983335833
commit
139e11df13
2 changed files with 15 additions and 0 deletions
|
|
@ -55,6 +55,10 @@ class FilenameFilter
|
||||||
*/
|
*/
|
||||||
public static function cleanPath($path)
|
public static function cleanPath($path)
|
||||||
{
|
{
|
||||||
|
if (!preg_match('@^(?:[a-z]:[\\\\/]|\\\\|/)@i', $path))
|
||||||
|
{
|
||||||
|
$path = \RX_BASEDIR . $path;
|
||||||
|
}
|
||||||
$path = str_replace('\\', '/', $path);
|
$path = str_replace('\\', '/', $path);
|
||||||
$path = preg_replace('@[\?#].+$@', '', $path);
|
$path = preg_replace('@[\?#].+$@', '', $path);
|
||||||
$path = preg_replace('@/{2,}@', '/', $path);
|
$path = preg_replace('@/{2,}@', '/', $path);
|
||||||
|
|
|
||||||
11
common/framework/storage.php
Normal file
11
common/framework/storage.php
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Rhymix\Framework;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The storage class.
|
||||||
|
*/
|
||||||
|
class Storage
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue