Changeset 524


Ignore:
Timestamp:
Sep 18, 2004, 6:07:40 PM (20 years ago)
Author:
z0rglub
Message:

code refactoring

File:
1 edited

Legend:

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

    r518 r524  
    213213{
    214214  global $conf, $template, $lang, $lang_info;
    215    
     215 
    216216  $language = (!empty($userdata['language']) && !$userdata['is_the_guest'] )?$userdata['language']:$conf['default_language'];
    217   $style = (!empty($userdata['template'])&& !$userdata['is_the_guest'] )?$userdata['template']:$conf['default_template'];
    218  
     217
     218  if (!empty($userdata['template']) and !$userdata['is_the_guest'])
     219  {
     220    $template = $userdata['template'];
     221  }
     222  else
     223  {
     224    $template = $conf['default_template'];
     225  }
     226
    219227  if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php')) )
    220228  {
     
    232240  include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/admin.lang.php');
    233241  }
    234  
    235   $template= setup_style($style);
     242
     243  $template = setup_style($template);
    236244  return;
    237245}
Note: See TracChangeset for help on using the changeset viewer.