mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
fixes #2417 ability to hide the new filter "expert mode"
... and removes 2 other duplicates of the filters_views configuration
This commit is contained in:
@@ -13,7 +13,9 @@ if (!defined('PHPWG_ROOT_PATH'))
|
||||
|
||||
$upgrade_description = 'add config parameters to the gallery filters';
|
||||
|
||||
conf_update_param('filters_views', $conf['default_filters_views']);
|
||||
// let the $conf['filters_views'] be written in config table when the admin will change settings in administration.
|
||||
//
|
||||
// conf_update_param('filters_views', $conf['default_filters_views']);
|
||||
|
||||
echo "\n".$upgrade_description."\n";
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | This file is part of Piwigo. |
|
||||
// | |
|
||||
// | For copyright and license information, please view the COPYING.txt |
|
||||
// | file that was distributed with this source code. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!defined('PHPWG_ROOT_PATH'))
|
||||
{
|
||||
die('Hacking attempt!');
|
||||
}
|
||||
|
||||
$upgrade_description = 'add "expert mode" in filters_views for gallery search';
|
||||
|
||||
load_conf_from_db();
|
||||
|
||||
// if the filters_views is not already registered in the config table, no need
|
||||
// to update it because it will be initialized with all filters
|
||||
if (isset($conf['filters_views']))
|
||||
{
|
||||
$conf['filters_views'] = safe_unserialize($conf['filters_views']);
|
||||
|
||||
if (!isset($conf['filters_views']['expert']))
|
||||
{
|
||||
$conf['filters_views']['expert'] = $conf['default_filters_views']['expert'];
|
||||
conf_update_param('filters_views', $conf['filters_views']);
|
||||
}
|
||||
}
|
||||
|
||||
echo "\n".$upgrade_description."\n";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user