source: branches/2.0/admin/include/functions_themes.inc.php @ 3217

Last change on this file since 3217 was 3217, checked in by nikrou, 15 years ago

merge r3216 from trunk to branch 2.0

feature_948_accordion feature 948 : fix problem with incorrect submenu open in admin use a new variable (U_ACTIVE_MENU) and use default position defined in selected_admin_menu if not exists

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1<?php
2/**
3 * Accordion menus need to be stable (called by themeconf.inc which need it)
4 */
5function selected_admin_menu()
6{
7  if (isset($_GET['page']))
8  {
9    switch ($_GET['page']) {
10      case 'configuration':
11      case 'extend_for_templates':
12      case 'menubar':
13        return 1;
14      case 'site_manager':
15      case 'site_update':
16      case 'cat_list':
17      case 'cat_modify':
18      case 'cat_move':
19      case 'cat_options':
20      case 'cat_perm':
21      case 'permalinks':
22        return 2;
23      case 'element_set':
24        if (isset($_GET['cat']) and is_numeric($_GET['cat']) ) {
25          return 2;
26        }
27      case 'picture_modify':
28        return 3;
29      case 'comments':
30      case 'upload':
31      case 'thumbnail':
32      case 'rating':
33      case 'tags':
34        return 3;
35      case 'user_list':
36      case 'user_perm':
37      case 'group_list':
38      case 'group_perm':
39      case 'notification_by_mail':
40        return 4;
41      case 'stats':
42      case 'history':
43      case 'maintenance':
44      case 'advanced_feature':
45      case 'plugins_list':
46      case 'plugins_update':
47      case 'plugins_new':
48      case 'plugin':
49        return 5;
50    }
51  }
52  if (isset($_GET['plgmenu'])) /* Later added plugins will add plgmenu in url */
53  {
54    return 5;
55  }
56  return 0;
57}
58?>
Note: See TracBrowser for help on using the repository browser.