Ignore:
Timestamp:
Dec 17, 2013, 12:14:08 PM (10 years ago)
Author:
mistic100
Message:

remove useless SQL queries, don't change user on admin pages, fix theme and language overwrites, fix toolbar overlap, colorbox max width

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdminTools/include/events.inc.php

    r25916 r25979  
    2626    $tpl_vars['DELETE_CACHE'] =     isset($conf['multiview_invalidate_cache']);
    2727
    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    }
    3033  }
    3134  else if (script_basename() == 'picture' and $picture['current']['added_by'] == $user['id'])
     
    7679          );
    7780
    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'];
    8482      }
    8583
     
    167165  $template->parse('ato_public_controller');
    168166
    169   if ($MultiView->is_admin())
     167  if ($MultiView->is_admin() && @$admin_lang !== false)
    170168  {
    171169    switch_lang_back();
Note: See TracChangeset for help on using the changeset viewer.