Ticket #5959: mythweb_skin.patch
File mythweb_skin.patch, 1.8 KB (added by , 15 years ago) |
---|
-
mythweb/includes/skin.php
21 21 */ 22 22 23 23 // Figure out the template 24 $tmpl = $_SESSION['tmpl'];25 24 26 25 if (isset($_REQUEST['RESET_TMPL'])) 27 26 $tmpl = _or($_REQUEST['RESET_TMPL'], 'default'); 28 27 elseif (isset($_REQUEST['RESET_TEMPLATE'])) 29 28 $tmpl = _or($_REQUEST['RESET_TEMPLATE'], 'default'); 30 elseif (isset($_COOKIE['mythweb_tmpl']) )29 elseif (isset($_COOKIE['mythweb_tmpl']) && $_COOKIE['mythweb_tmpl'] == $_SESSION['tmpl']) 31 30 $tmpl = $_COOKIE['mythweb_tmpl']; 32 31 elseif (isMobileUser()) 33 32 $tmpl = 'wap'; … … 36 35 elseif (preg_match('/(ipod|iphone)/i', $_SERVER['HTTP_USER_AGENT'])) 37 36 $tmpl = 'iPod'; 38 37 else 39 $tmpl = 'default';38 $tmpl = $_SESSION['tmpl']; 40 39 41 40 if (!file_exists(modules_path.'/_shared/tmpl/'.$tmpl.'/welcome.php')) 42 41 $tmpl = 'default'; … … 44 43 setcookie('mythweb_tmpl', $tmpl, 2147483647, root); 45 44 46 45 // Figure out the skin 47 $skin = $_SESSION['skin'];48 46 49 47 if (isset($_REQUEST['RESET_SKIN'])) 50 48 $skin = _or($_REQUEST['RESET_SKIN'], 'default'); 51 elseif (isset($_COOKIE['mythweb_skin']) )52 49 elseif (isset($_COOKIE['mythweb_skin']) && $_COOKIE['mythweb_skin'] == $_SESSION['skin']) 50 $skin = $_COOKIE['mythweb_skin']; 53 51 elseif (isMobileUser()) 54 52 $skin = 'wap'; 55 53 elseif (preg_match('/(ipod|iphone)/i', $_SERVER['HTTP_USER_AGENT'])) 56 54 $skin = 'iPod-default'; 57 55 else 58 $skin = 'default';56 $skin = $_SESSION['skin']; 59 57 60 58 if (!file_exists('skins/'.$skin.'/img/')) 61 59 $skin = 'default';