diff options
Diffstat (limited to 'server/song.ajax.php')
-rw-r--r-- | server/song.ajax.php | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/server/song.ajax.php b/server/song.ajax.php index 2fccae37..1c83211e 100644 --- a/server/song.ajax.php +++ b/server/song.ajax.php @@ -1,5 +1,5 @@ <?php -/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */ +/* vim:set softtabstop=4 shiftwidth=4 expandtab: */ /** * * LICENSE: GNU General Public License, version 2 (GPLv2) @@ -26,27 +26,27 @@ if (!defined('AJAX_INCLUDE')) { exit; } switch ($_REQUEST['action']) { - case 'flip_state': - if (!Access::check('interface','75')) { - debug_event('DENIED',$GLOBALS['user']->username . ' attempted to change the state of a song','1'); - exit; - } + case 'flip_state': + if (!Access::check('interface','75')) { + debug_event('DENIED',$GLOBALS['user']->username . ' attempted to change the state of a song','1'); + exit; + } - $song = new Song($_REQUEST['song_id']); - $new_enabled = $song->enabled ? '0' : '1'; - $song->update_enabled($new_enabled,$song->id); - $song->enabled = $new_enabled; - $song->format(); + $song = new Song($_REQUEST['song_id']); + $new_enabled = $song->enabled ? '0' : '1'; + $song->update_enabled($new_enabled,$song->id); + $song->enabled = $new_enabled; + $song->format(); - //Return the new Ajax::button - $id = 'button_flip_state_' . $song->id; - $button = $song->enabled ? 'disable' : 'enable'; - $results[$id] = Ajax::button('?page=song&action=flip_state&song_id=' . $song->id,$button, T_(ucfirst($button)),'flip_state_' . $song->id); + //Return the new Ajax::button + $id = 'button_flip_state_' . $song->id; + $button = $song->enabled ? 'disable' : 'enable'; + $results[$id] = Ajax::button('?page=song&action=flip_state&song_id=' . $song->id,$button, T_(ucfirst($button)),'flip_state_' . $song->id); - break; - default: - $results['rfc3514'] = '0x1'; - break; + break; + default: + $results['rfc3514'] = '0x1'; + break; } // switch on action; // We always do this |