CC-2993: Playlist Builder: add "View on SoundCloud" option on the menu

- fixed
- extra fix: handles the case when username or password is empty
This commit is contained in:
James 2011-10-22 11:34:04 -04:00
parent 8b2a23b88a
commit f160ded6bc
10 changed files with 125 additions and 24 deletions

View file

@ -98,6 +98,15 @@ class LibraryController extends Zend_Controller_Action
}
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Library/upload-file-soundcloud/id/#id#',
'callback'=>"window['addProgressIcon']('$file_id')"),'title' => $text);
$scid = $file->getSoundCloudId();
if($scid > 0){
$link_to_file = $file->getSoundCloudLinkToFile();
$menu[] = array('action' => array('type' => 'fn',
'callback' => "window['openFileOnSoundCloud']('$link_to_file')"),
'title' => 'View on SoundCloud');
}
}
if ($user->isAdmin()) {