mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
issue #1641 make admin_theme related to user instead of config
This commit is contained in:
@@ -44,7 +44,7 @@ if (isset($_GET['plugins_new_order']))
|
|||||||
if (isset($_GET['change_theme']))
|
if (isset($_GET['change_theme']))
|
||||||
{
|
{
|
||||||
$admin_themes = array('roma', 'clear');
|
$admin_themes = array('roma', 'clear');
|
||||||
$admin_theme_array = array($conf['admin_theme']);
|
$admin_theme_array = array(userprefs_get_param('admin_theme', 'clear'));
|
||||||
$result = array_diff(
|
$result = array_diff(
|
||||||
$admin_themes,
|
$admin_themes,
|
||||||
$admin_theme_array
|
$admin_theme_array
|
||||||
@@ -54,7 +54,7 @@ if (isset($_GET['change_theme']))
|
|||||||
$result
|
$result
|
||||||
);
|
);
|
||||||
|
|
||||||
conf_update_param('admin_theme', $new_admin_theme);
|
userprefs_update_param('admin_theme', $new_admin_theme);
|
||||||
|
|
||||||
$url_params = array();
|
$url_params = array();
|
||||||
foreach (array('page', 'tab', 'section') as $url_param)
|
foreach (array('page', 'tab', 'section') as $url_param)
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ SELECT
|
|||||||
global $conf;
|
global $conf;
|
||||||
$theme['screenshot'] =
|
$theme['screenshot'] =
|
||||||
PHPWG_ROOT_PATH.'admin/themes/'
|
PHPWG_ROOT_PATH.'admin/themes/'
|
||||||
.$conf['admin_theme']
|
.userprefs_get_param('admin_theme', 'clear')
|
||||||
.'/images/missing_screenshot.png'
|
.'/images/missing_screenshot.png'
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,8 +116,8 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
$template->assign('default_screenshot',
|
$template->assign('default_screenshot',
|
||||||
get_root_url().'admin/themes/'.$conf['admin_theme'].'/images/missing_screenshot.png'
|
get_root_url().'admin/themes/'.userprefs_get_param('admin_theme', 'clear').'/images/missing_screenshot.png'
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'themes');
|
$template->assign_var_from_handle('ADMIN_CONTENT', 'themes');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ if (isset($page['auth_key_invalid']) and $page['auth_key_invalid'])
|
|||||||
// template instance
|
// template instance
|
||||||
if (defined('IN_ADMIN') and IN_ADMIN )
|
if (defined('IN_ADMIN') and IN_ADMIN )
|
||||||
{// Admin template
|
{// Admin template
|
||||||
$template = new Template(PHPWG_ROOT_PATH.'admin/themes', $conf['admin_theme']);
|
$template = new Template(PHPWG_ROOT_PATH.'admin/themes', userprefs_get_param('admin_theme', 'clear'));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Classic template
|
{ // Classic template
|
||||||
|
|||||||
Reference in New Issue
Block a user