diff options
author | patdenice <patdenice@piwigo.org> | 2011-04-28 17:16:45 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-04-28 17:16:45 +0000 |
commit | 3ee1056d8fbe13094397df3a84ccdf9eab744dd6 (patch) | |
tree | ee80638e010e982b94564e0faa89fd525fcdfa19 /admin | |
parent | cf7fd32b6a3fcd298a658c950a766ddd025a606c (diff) |
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
Diffstat (limited to 'admin')
-rw-r--r-- | admin/include/functions_upload.inc.php | 37 | ||||
-rw-r--r-- | admin/photos_add.php | 2 | ||||
-rw-r--r-- | admin/thumbnail.php | 2 |
3 files changed, 0 insertions, 41 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php index 5ad71b308..8cfa995c8 100644 --- a/admin/include/functions_upload.inc.php +++ b/admin/include/functions_upload.inc.php @@ -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)) diff --git a/admin/photos_add.php b/admin/photos_add.php index 7760195d9..0b7053e64 100644 --- a/admin/photos_add.php +++ b/admin/photos_add.php @@ -44,8 +44,6 @@ check_status(ACCESS_ADMINISTRATOR); // | Load configuration | // +-----------------------------------------------------------------------+ -prepare_upload_configuration(); - $upload_form_config = get_upload_form_config(); // +-----------------------------------------------------------------------+ diff --git a/admin/thumbnail.php b/admin/thumbnail.php index a59a931b5..68864d6d5 100644 --- a/admin/thumbnail.php +++ b/admin/thumbnail.php @@ -29,8 +29,6 @@ check_status(ACCESS_ADMINISTRATOR); // +-----------------------------------------------------------------------+ // | Load configuration | // +-----------------------------------------------------------------------+ -prepare_upload_configuration(); - $upload_form_config = get_upload_form_config(); $form_values = array(); |