playlist.php
changeset 10 d3059e20b0fa
parent 6 5f35ebc4f9bb
child 21 74edc873234f
equal deleted inserted replaced
9:63a257541313 10:d3059e20b0fa
    15 
    15 
    16 function amarok_playlist($server)
    16 function amarok_playlist($server)
    17 {
    17 {
    18   global $theme, $playlist, $allowcontrol;
    18   global $theme, $playlist, $allowcontrol;
    19   
    19   
    20   $iphone = ( strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') ||
    20   $iphone = ( ( strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') ||
    21        strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') ||
    21        strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') ||
    22        strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') ||
    22        strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') ||
    23        isset($_GET['m'])
    23        isset($_GET['m']) )
       
    24        && !isset($_GET['f'])
    24        );
    25        );
    25   $theme_id = ( $iphone ) ? 'iphone' : $theme;
    26   $theme_id = ( $iphone ) ? 'iphone' : $theme;
    26   $smarty = load_theme($theme_id);
    27   $smarty = load_theme($theme_id);
    27   
    28   
    28   $active = dcop_action('playlist', 'getActiveIndex');
    29   $active = dcop_action('playlist', 'getActiveIndex');
    30   $smarty->assign('playlist', $playlist);
    31   $smarty->assign('playlist', $playlist);
    31   $smarty->assign('active', $active);
    32   $smarty->assign('active', $active);
    32   $smarty->assign('scripts', array(
    33   $smarty->assign('scripts', array(
    33       'ajax.js',
    34       'ajax.js',
    34       'domutils.js',
    35       'domutils.js',
    35       'volume.js'
    36       'volume.js',
       
    37       'dom-drag.js',
       
    38       'position.js'
    36     ));
    39     ));
    37   $smarty->assign('allow_control', $allowcontrol);
    40   $smarty->assign('allow_control', $allowcontrol);
    38   $smarty->display('playlist.tpl');
    41   $smarty->display('playlist.tpl');
    39 }
    42 }
    40 
    43