Changeset 5264


Ignore:
Timestamp:
Mar 22, 2010, 8:49:14 PM (14 years ago)
Author:
plg
Message:

feature 1514: improvement, if a user has a theme that is (maybe temporary)
unactive, we fallback on default theme (the real default theme, the one set
for default user)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_user.inc.php

    r5196 r5264  
    247247
    248248  // Check user theme
    249   if (!file_exists(PHPWG_ROOT_PATH.'themes/'.$user['theme'].'/themeconf.inc.php'))
    250   {
    251     $user['theme'] = $conf['default_theme'];
     249  if (!isset($user['theme_name']))
     250  {
     251    $user['theme'] = get_default_theme();
    252252  }
    253253
     
    293293  {
    294294    $query = '
    295 SELECT ui.*, uc.*
    296   FROM '.USER_INFOS_TABLE.' AS ui LEFT JOIN '.USER_CACHE_TABLE.' AS uc
    297     ON ui.user_id = uc.user_id
     295SELECT ui.*, uc.*, t.name AS theme_name
     296  FROM '.USER_INFOS_TABLE.' AS ui
     297    LEFT JOIN '.USER_CACHE_TABLE.' AS uc ON ui.user_id = uc.user_id
     298    LEFT JOIN '.THEMES_TABLE.' AS t ON t.id = ui.theme
    298299  WHERE ui.user_id = \''.$user_id.'\'';
    299300    $result = pwg_query($query);
Note: See TracChangeset for help on using the changeset viewer.