summaryrefslogtreecommitdiffstats
path: root/lib/class/song.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-05-13 01:46:38 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-05-13 01:46:38 +0000
commit184a030cb6f063e1cd6483170d199c7de3d7e691 (patch)
treec6340517b41557f1d745be505c5c72f72c668721 /lib/class/song.class.php
parent1c140f2f611fcaecf8663e7f49c7f2d06024fecd (diff)
downloadampache-184a030cb6f063e1cd6483170d199c7de3d7e691.tar.gz
ampache-184a030cb6f063e1cd6483170d199c7de3d7e691.tar.bz2
ampache-184a030cb6f063e1cd6483170d199c7de3d7e691.zip
make the parse_song_url a little cleaner, see if that straitens her up untested
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r--lib/class/song.class.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index 2a309d34..d0311112 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -884,10 +884,10 @@ class Song extends database_object implements media {
*/
public static function parse_song_url($url) {
- preg_match("/.+\/play\/index.php\?(.+)/",$url,$matches);
- $raw_data = $matches['1'];
+ // We only care about the question mark stuff
+ $query = parse_url($url,PHP_URL_QUERY);
- $elements = explode("&",$raw_data);
+ $elements = explode("&",unhtmlentities($query));
foreach ($elements as $items) {
list($key,$value) = explode("=",$items);
@@ -896,6 +896,8 @@ class Song extends database_object implements media {
}
} // end foreach
+ return false;
+
} // parse_song_url
/**