mirror of
https://github.com/YunoHost-Apps/piwigo_ynh.git
synced 2024-09-03 20:06:03 +02:00
29 lines
No EOL
853 B
PHP
29 lines
No EOL
853 B
PHP
<?php
|
|
|
|
if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
|
|
|
|
global $prefixeTable, $conf;
|
|
|
|
if (!isset($conf['smartpocket']))
|
|
{
|
|
$config = array(
|
|
'loop' => true,//true - false
|
|
'autohide' => 5000,//5000 - 0
|
|
);
|
|
$query = "
|
|
INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
|
|
VALUES ('smartpocket' , '".pwg_db_real_escape_string(serialize($config))."' , 'loop#autohide');";
|
|
pwg_query($query);
|
|
load_conf_from_db();
|
|
}
|
|
elseif (count(unserialize( $conf['smartpocket'] ))!=2)
|
|
{
|
|
$conff=unserialize($conf['smartpocket']);
|
|
$config = array(
|
|
'loop' => (!empty($conff['loop'])) ? $conff['loop'] :true,
|
|
'autohide' => (!empty($conff['autohide'])) ? $conff['autohide'] :5000,
|
|
);
|
|
conf_update_param('smartpocket', pwg_db_real_escape_string(serialize($config)));
|
|
load_conf_from_db();
|
|
}
|
|
?>
|