| | 799 | |
| | 800 | // theme and language fields may be null in the database (see |
| | 801 | // bug:1683) This is absolutely not nice to have this code in this |
| | 802 | // very place, but it avoids a complexe upgrade with an "automatic |
| | 803 | // fix" in the database => this code should be removed after branch |
| | 804 | // 2.1 if a migration tasks performs the job the same way |
| | 805 | if (empty($cache['default_user']['theme'])) |
| | 806 | { |
| | 807 | mass_updates( |
| | 808 | USER_INFOS_TABLE, |
| | 809 | array( |
| | 810 | 'primary' => array('user_id'), |
| | 811 | 'update' => array('theme') |
| | 812 | ), |
| | 813 | array( |
| | 814 | array( |
| | 815 | 'user_id' => $conf['default_user_id'], |
| | 816 | 'theme' => PHPWG_DEFAULT_TEMPLATE |
| | 817 | ) |
| | 818 | ) |
| | 819 | ); |
| | 820 | $cache['default_user']['theme'] = PHPWG_DEFAULT_TEMPLATE; |
| | 821 | } |
| | 822 | |
| | 823 | if (empty($cache['default_user']['language'])) |
| | 824 | { |
| | 825 | mass_updates( |
| | 826 | USER_INFOS_TABLE, |
| | 827 | array( |
| | 828 | 'primary' => array('user_id'), |
| | 829 | 'update' => array('language') |
| | 830 | ), |
| | 831 | array( |
| | 832 | array( |
| | 833 | 'user_id' => $conf['default_user_id'], |
| | 834 | 'language' => PHPWG_DEFAULT_LANGUAGE |
| | 835 | ) |
| | 836 | ) |
| | 837 | ); |
| | 838 | $cache['default_user']['language'] = PHPWG_DEFAULT_LANGUAGE; |
| | 839 | } |