diff options
author | pb1dft <pb1dft@ampache> | 2006-11-17 00:43:11 +0000 |
---|---|---|
committer | pb1dft <pb1dft@ampache> | 2006-11-17 00:43:11 +0000 |
commit | ca3d4572837b4caebee850e11fe3f591bd765dff (patch) | |
tree | e5b7ffc246295257ba8e4ff466061341647245ce /playlist.php | |
parent | ad6644d6cb748929108dad3143021e85ed048906 (diff) | |
download | ampache-ca3d4572837b4caebee850e11fe3f591bd765dff.tar.gz ampache-ca3d4572837b4caebee850e11fe3f591bd765dff.tar.bz2 ampache-ca3d4572837b4caebee850e11fe3f591bd765dff.zip |
Fixed upload playlist and a minor issue in most popular
Diffstat (limited to 'playlist.php')
-rw-r--r-- | playlist.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/playlist.php b/playlist.php index 126b3a68..41bed506 100644 --- a/playlist.php +++ b/playlist.php @@ -153,8 +153,14 @@ switch ($action) { show_import_playlist(); break; case 'import_playlist': + /* first we rename the file to it's original name before importing. + Otherwise the playlist name will have the $_FILES['filename']['tmp_name'] which doesn't look right... */ + $dir = dirname($_FILES['filename']['tmp_name']) . "/"; + $filename = $dir . basename($_FILES['filename']['name']); + move_uploaded_file($_FILES['filename']['tmp_name'], $filename ); + $catalog = new Catalog(); - $catalog->import_m3u(scrub_in($_REQUEST['filename'])); + $catalog->import_m3u($filename); $url = conf('web_path') . '/playlist.php'; $title = _('Playlist Imported'); |