Changeset 9074


Ignore:
Timestamp:
02/03/11 12:28:34 (9 years ago)
Author:
plg
Message:

bug 1684 fixed: the fix for bug:1683 was an "automatic repair" but it adds
useless code. We couldn't create a migration task on the stable branch, but
on trunk this is possible.

Location:
trunk
Files:
1 added
1 edited

Legend:

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

    r8844 r9074  
    813813      unset($cache['default_user']['status']); 
    814814      unset($cache['default_user']['registration_date']); 
    815  
    816       // theme and language fields may be null in the database (see 
    817       // bug:1683) This is absolutely not nice to have this code in this 
    818       // very place, but it avoids a complexe upgrade with an "automatic 
    819       // fix" in the database => this code should be removed after branch 
    820       // 2.1 if a migration tasks performs the job the same way 
    821       if (empty($cache['default_user']['theme'])) 
    822       { 
    823         mass_updates( 
    824           USER_INFOS_TABLE, 
    825           array( 
    826             'primary' => array('user_id'), 
    827             'update'  => array('theme') 
    828             ), 
    829           array( 
    830             array( 
    831               'user_id' => $conf['default_user_id'], 
    832               'theme' => PHPWG_DEFAULT_TEMPLATE 
    833               ) 
    834             ) 
    835           ); 
    836         $cache['default_user']['theme'] = PHPWG_DEFAULT_TEMPLATE; 
    837       } 
    838        
    839       if (empty($cache['default_user']['language'])) 
    840       { 
    841         mass_updates( 
    842           USER_INFOS_TABLE, 
    843           array( 
    844             'primary' => array('user_id'), 
    845             'update'  => array('language') 
    846             ), 
    847           array( 
    848             array( 
    849               'user_id' => $conf['default_user_id'], 
    850               'language' => PHPWG_DEFAULT_LANGUAGE 
    851               ) 
    852             ) 
    853           ); 
    854         $cache['default_user']['language'] = PHPWG_DEFAULT_LANGUAGE; 
    855       } 
    856815    } 
    857816  } 
Note: See TracChangeset for help on using the changeset viewer.