diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-25 02:51:03 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-25 02:51:03 +0000 |
commit | 81b0dff16654dd67bc15937bd653fc3f65475359 (patch) | |
tree | 7996b36b04f8a831b051142c251ad0b522e5b200 /download/index.php | |
parent | e32557bf900153c5cfb0d2f28640aa9091ef7488 (diff) | |
download | ampache-81b0dff16654dd67bc15937bd653fc3f65475359.tar.gz ampache-81b0dff16654dd67bc15937bd653fc3f65475359.tar.bz2 ampache-81b0dff16654dd67bc15937bd653fc3f65475359.zip |
track ip history, fix pagination on admin/user and fix some acl stuff that I forgot about
Diffstat (limited to 'download/index.php')
-rw-r--r-- | download/index.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/download/index.php b/download/index.php index 5375cce1..b3158ed3 100644 --- a/download/index.php +++ b/download/index.php @@ -43,7 +43,8 @@ if (conf('demo_mode') || !$GLOBALS['user']->has_access('25') || !$GLOBALS['user' */ if (conf('access_control')) { $access = new Access(0); - if (!$access->check('50', $_SERVER['REMOTE_ADDR'])) { + if (!$access->check('stream', $_SERVER['REMOTE_ADDR'],$GLOBALS['user']->id,'50') || + !$access->check('network', $_SERVER['REMOTE_ADDR'],$GLOBALS['user']->id,'50')) { debug_event('access_denied', "Download Access Denied, " . $_SERVER['REMOTE_ADDR'] . " does not have download level",'3'); access_denied(); } @@ -71,6 +72,8 @@ if ($_REQUEST['action'] == 'download') { $song->format_type(); $song_name = str_replace('"'," ",$song->f_artist_full . " - " . $song->title . "." . $song->type); + /* Because of some issues with IE remove ? and / from the filename */ + $song_name = str_replace(array('?','/','\\'),"_",$song_name); // Use Horde's Browser class to send the right headers for different browsers // Should get the mime-type from the song rather than hard-coding it. |