diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-20 05:33:26 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-20 05:33:26 +0000 |
commit | d22c6ea78f635f4486820a3c8e058b909c111475 (patch) | |
tree | 438863a1220d7d054e62a0be587224d78cf7bc40 /lib/class/vainfo.class.php | |
parent | fb1896c7bfddae74f474474bf03bf740b01453d8 (diff) | |
download | ampache-d22c6ea78f635f4486820a3c8e058b909c111475.tar.gz ampache-d22c6ea78f635f4486820a3c8e058b909c111475.tar.bz2 ampache-d22c6ea78f635f4486820a3c8e058b909c111475.zip |
initial work on a shoutcast doodly, fix the translations while I am at it :S
Diffstat (limited to 'lib/class/vainfo.class.php')
-rw-r--r-- | lib/class/vainfo.class.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/class/vainfo.class.php b/lib/class/vainfo.class.php index 3f87863e..5ecfda43 100644 --- a/lib/class/vainfo.class.php +++ b/lib/class/vainfo.class.php @@ -452,7 +452,15 @@ class vainfo { $results = array(); - $pattern = $this->_dir_pattern . '/' . $this->_file_pattern; + // Correctly detect the slash we need to use here + if (strstr($filename,"/")) { + $slash_type = '/'; + } + else { + $slash_type = '\\'; + } + + $pattern = preg_quote($this->_dir_pattern) . $slash_type . preg_quote($this->_file_pattern); preg_match_all("/\%\w/",$pattern,$elements); $preg_pattern = preg_quote($pattern); |