Last change
on this file since 1860 was
1860,
checked in by rvelices, 17 years ago
|
- bug 654: sql error on user comment (since my commit 1849)
- languages: english corrections + keep lang files sorted by key
- admin multi view correction: language was not always properly changed
- refactor function get_computed_categories (with rub's blessing)
|
-
Property svn:eol-style set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | <?php |
---|
2 | if (! defined('MULTIVIEW_CONTROLLER') ) |
---|
3 | { |
---|
4 | global $user; |
---|
5 | $view_as = pwg_get_session_var( 'multiview_as', 0 ); |
---|
6 | if ($view_as) |
---|
7 | { |
---|
8 | $user = build_user( $view_as, true); |
---|
9 | } |
---|
10 | $theme = pwg_get_session_var( 'multiview_theme', '' ); |
---|
11 | if ( !empty($theme) ) |
---|
12 | { |
---|
13 | list($user['template'], $user['theme']) = explode('/', $theme); |
---|
14 | } |
---|
15 | $lang = pwg_get_session_var( 'multiview_lang', '' ); |
---|
16 | if ( !empty($lang) ) |
---|
17 | { |
---|
18 | $user['language'] = $lang; |
---|
19 | } |
---|
20 | } |
---|
21 | |
---|
22 | add_event_handler('loc_end_page_header', 'multiview_loc_end_page_header'); |
---|
23 | |
---|
24 | function multiview_loc_end_page_header() |
---|
25 | { |
---|
26 | global $template; |
---|
27 | $my_root_url = get_root_url().'plugins/'. basename(dirname(__FILE__)).'/'; |
---|
28 | $js = |
---|
29 | '<script type="text/javascript"> |
---|
30 | var theController = window.open("", "mview_controller", "alwaysRaised=yes,dependent=yes,toolbar=no,height=200,width=220,menubar=no,resizable=yes,scrollbars=yes,status=no"); |
---|
31 | if ( theController.location.toString()=="about:blank" || !theController.location.toString().match(/^(https?.*\/)controller\.php(\?.+)?$/)) |
---|
32 | { |
---|
33 | theController.location = "'.$my_root_url.'controller.php"; |
---|
34 | } |
---|
35 | </script>'; |
---|
36 | |
---|
37 | $template->assign_block_vars( 'head_element', array( |
---|
38 | 'CONTENT' => $js |
---|
39 | ) |
---|
40 | ); |
---|
41 | } |
---|
42 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.