Changeset 25979 for extensions/AdminTools/include/events.inc.php
- Timestamp:
- Dec 17, 2013, 12:14:08 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AdminTools/include/events.inc.php
r25916 r25979 26 26 $tpl_vars['DELETE_CACHE'] = isset($conf['multiview_invalidate_cache']); 27 27 28 include_once(PHPWG_ROOT_PATH . 'include/functions_mail.inc.php'); 29 switch_lang_to(get_default_language()); 28 if (($admin_lang = $MultiView->get_user_language()) !== false) 29 { 30 include_once(PHPWG_ROOT_PATH . 'include/functions_mail.inc.php'); 31 switch_lang_to($admin_lang); 32 } 30 33 } 31 34 else if (script_basename() == 'picture' and $picture['current']['added_by'] == $user['id']) … … 76 79 ); 77 80 78 $query = ' 79 SELECT id FROM ' . CATEGORIES_TABLE.' 80 WHERE id = ' . $page['category']['id'] .' 81 AND representative_picture_id = ' . $page['image_id'] .' 82 ;'; 83 $tpl_vars['IS_REPRESENTATIVE'] = pwg_db_num_rows(pwg_query($query)) > 0; 81 $tpl_vars['IS_REPRESENTATIVE'] = $page['category']['representative_picture_id'] == $page['image_id']; 84 82 } 85 83 … … 167 165 $template->parse('ato_public_controller'); 168 166 169 if ($MultiView->is_admin() )167 if ($MultiView->is_admin() && @$admin_lang !== false) 170 168 { 171 169 switch_lang_back();
Note: See TracChangeset
for help on using the changeset viewer.