aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-03-13 12:39:25 +0000
committerpatdenice <patdenice@piwigo.org>2010-03-13 12:39:25 +0000
commit32d62126660c3c24556577d42bff024767127e55 (patch)
tree57e9a2e15644df1abdf5a15f63b6e9f1a5e5415a /plugins
parent2d7a399f7e1d305398a57b275f6fbafbed57ae00 (diff)
Feature 1502: Fix admin multi view plugin.
git-svn-id: http://piwigo.org/svn/trunk@5128 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--plugins/admin_multi_view/controller.php18
-rw-r--r--plugins/admin_multi_view/is_admin.inc.php4
2 files changed, 11 insertions, 11 deletions
diff --git a/plugins/admin_multi_view/controller.php b/plugins/admin_multi_view/controller.php
index e7b9b7745..524fca747 100644
--- a/plugins/admin_multi_view/controller.php
+++ b/plugins/admin_multi_view/controller.php
@@ -128,17 +128,17 @@ $users_html.= '</select>';
// +-----------------------------------------------------------------------+
// | templates |
-$my_template = '';
+$my_theme = '';
$themes_html='<select onchange="document.location = this.options[this.selectedIndex].value;">';
-foreach (get_pwg_themes() as $pwg_template)
+foreach (get_pwg_themes() as $pwg_theme)
{
- $selected = $pwg_template == pwg_get_session_var( 'multiview_theme', $view_as_user['template'].'/'.$view_as_user['theme'] ) ? 'selected="selected"' : '';
- $my_template = $selected == '' ? $my_template : $view_as_user['template'].'/theme/'.$view_as_user['theme'];
+ $selected = $pwg_theme == pwg_get_session_var( 'multiview_theme', $view_as_user['theme'] ) ? 'selected="selected"' : '';
+ $my_theme = $selected == '' ? $my_theme : 'themes/'.$view_as_user['theme'];
$themes_html .=
'<option value="'
- .$my_url.'?theme='.$pwg_template
+ .$my_url.'?theme='.$pwg_theme
.'" '.$selected.'>'
- .$pwg_template
+ .$pwg_theme
.'</option>';
}
$themes_html .= '</select>';
@@ -206,9 +206,9 @@ else
<title>Controller</title>
<?php
// Controller will be displayed with the **real admin template** (without Any if it has been removed)
-if ( $my_template !== '') {
- $my_template = get_root_url().'template/'.$my_template.'/theme.css';
- echo '<link rel="stylesheet" type="text/css" href="' . $my_template .'">';
+if ( $my_theme !== '') {
+ $my_theme = get_root_url().$my_theme.'/theme.css';
+ echo '<link rel="stylesheet" type="text/css" href="' . $my_theme .'">';
}
?>
diff --git a/plugins/admin_multi_view/is_admin.inc.php b/plugins/admin_multi_view/is_admin.inc.php
index a1521c47b..fbadada3a 100644
--- a/plugins/admin_multi_view/is_admin.inc.php
+++ b/plugins/admin_multi_view/is_admin.inc.php
@@ -10,8 +10,8 @@ if (! defined('MULTIVIEW_CONTROLLER') )
$theme = pwg_get_session_var( 'multiview_theme', '' );
if ( !empty($theme) )
{
- list($user['template'], $user['theme']) = explode('/', $theme);
- unset( $user['admin_template'], $user['admin_theme']);
+ $user['theme'] = $theme;
+ unset($user['admin_theme']);
}
$lang = pwg_get_session_var( 'multiview_lang', '' );
if ( !empty($lang) )