Beispiel #1
0
     debug_event('albums', 'Set track numbers called.', '5');
     if (!Access::check('interface', '75')) {
         UI::access_denied();
         exit;
     }
     // Retrieving final song order from url
     foreach ($_GET as $key => $data) {
         $_GET[$key] = unhtmlentities(scrub_in($data));
         debug_event('albums', $key . '=' . $_GET[$key], '5');
     }
     if (isset($_GET['order'])) {
         $songs = explode(";", $_GET['order']);
         $track = $_GET['offset'] ? intval($_GET['offset']) + 1 : 1;
         foreach ($songs as $song_id) {
             if ($song_id != '') {
                 Song::update_track($track, $song_id);
                 ++$track;
             }
         }
     }
     break;
 case 'show_missing':
     set_time_limit(600);
     $mbid = $_REQUEST['mbid'];
     $walbum = new Wanted(Wanted::get_wanted($mbid));
     if (!$walbum->id) {
         $walbum->mbid = $mbid;
         if (isset($_REQUEST['artist'])) {
             $artist = new Artist($_REQUEST['artist']);
             $walbum->artist = $artist->id;
             $walbum->artist_mbid = $artist->mbid;