--- a/playlist.php Sun Mar 23 20:58:51 2008 -0400
+++ b/playlist.php Sun Mar 23 22:03:57 2008 -0400
@@ -11,10 +11,18 @@
function amarok_playlist($server)
{
- global $smarty, $theme, $playlist, $allowcontrol;
+ global $theme, $playlist, $allowcontrol;
+
+ $iphone = ( strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') ||
+ strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') ||
+ strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') ||
+ isset($_GET['m'])
+ );
+ $theme_id = ( $iphone ) ? 'iphone' : $theme;
+ $smarty = load_theme($theme_id);
$active = dcop_action('playlist', 'getActiveIndex');
- $smarty->assign('theme', $theme);
+ $smarty->assign('theme', $theme_id);
$smarty->assign('playlist', $playlist);
$smarty->assign('active', $active);
$smarty->assign('scripts', array(