Ticket #4336: skin.diff

File skin.diff, 706 bytes (added by jmorganson, 13 years ago)

This changes the skin handling for mobile agents, it sets the template and skin to the name of the user agent.

  • includes/skin.php

    old new  
    1616// Detect different types of browsers and set the theme accordingly.
    1717    if (isMobileUser()) {
    1818    // Browser is mobile but does it accept HTML? If not, use the WML theme.
    19         $_SESSION['tmpl'] = browserAcceptsMediaType(array('text/html', '\*/\*'))
    20                             ? 'wap'
    21                             : 'wml';
     19        $_SESSION['tmpl'] = getMobileUserAgent();
     20
    2221    // Make sure the skin is set to the appropriate phone-template type
    2322        $_SESSION['skin'] = $_SESSION['tmpl'];
    2423        define('skin', $_SESSION['skin']);