mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
Insert upload form parameters in database during installation.
Remove prepare_upload_configuration function. git-svn-id: http://piwigo.org/svn/trunk@10653 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
cf7fd32b6a
commit
3ee1056d8f
6 changed files with 100 additions and 42 deletions
|
@ -142,43 +142,6 @@ function get_upload_form_config()
|
|||
return $upload_form_config;
|
||||
}
|
||||
|
||||
/*
|
||||
* automatic fill of configuration parameters
|
||||
*/
|
||||
function prepare_upload_configuration()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$inserts = array();
|
||||
|
||||
foreach (get_upload_form_config() as $param_shortname => $param)
|
||||
{
|
||||
$param_name = 'upload_form_'.$param_shortname;
|
||||
|
||||
if (!isset($conf[$param_name]))
|
||||
{
|
||||
$conf[$param_name] = $param['default'];
|
||||
|
||||
array_push(
|
||||
$inserts,
|
||||
array(
|
||||
'param' => $param_name,
|
||||
'value' => boolean_to_string($param['default']),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (count($inserts) > 0)
|
||||
{
|
||||
mass_inserts(
|
||||
CONFIG_TABLE,
|
||||
array_keys($inserts[0]),
|
||||
$inserts
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function save_upload_form_config($data, &$errors=array())
|
||||
{
|
||||
if (!is_array($data) or empty($data))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue