diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-08-23 01:21:53 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-08-23 01:21:53 +0000 |
commit | 59129beb22716788f816da6ce3adeea342bf4261 (patch) | |
tree | 08c56a409fc21017003adf75bef7d099c9bd2d60 /upload.php | |
parent | 7550df3915d7e9c83c430ff3067dd73264e7866d (diff) |
- bug 843: Author Info not saving when photos are uploaded
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2486 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | upload.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/upload.php b/upload.php index 3ba555486..50dfdfba5 100644 --- a/upload.php +++ b/upload.php @@ -103,7 +103,7 @@ function validate_upload( $temp_name, $my_max_file_size, case 2 : $result['type'] = 'jpg'; break; case 3 : $result['type'] = 'png'; break; default : - array_push( $result['error'], l10n('upload_advise_filetype') ); + array_push( $result['error'], l10n('upload_advise_filetype') ); } } } @@ -134,7 +134,7 @@ if (isset($page['category'])) check_restrictions( $page['category'] ); $category = get_cat_info( $page['category'] ); $category['cat_dir'] = get_complete_dir( $page['category'] ); - + if (url_is_remote($category['cat_dir']) or !$category['uploadable']) { die('Fatal: you take a wrong way, bye bye'); @@ -173,7 +173,7 @@ if ( isset( $_POST['submit'] ) and !isset( $_GET['waiting_id'] ) ) { array_push( $error, l10n('upload_err_username') ); } - + $date_creation = ''; if ( !empty($_POST['date_creation']) ) { @@ -191,7 +191,7 @@ if ( isset( $_POST['submit'] ) and !isset( $_GET['waiting_id'] ) ) // creation of the "infos" field : // <infos author="Pierrick LE GALL" comment="my comment" // date_creation="2004-08-14" name="" /> - $xml_infos = '<infos'; + $xml_infos = '<infos '; $xml_infos.= encodeAttribute('author', $_POST['author']); $xml_infos.= encodeAttribute('comment', $_POST['comment']); $xml_infos.= encodeAttribute('date_creation', $date_creation); @@ -202,7 +202,7 @@ if ( isset( $_POST['submit'] ) and !isset( $_GET['waiting_id'] ) ) { array_push( $error, l10n('update_wrong_dirname') ); } - + if ( sizeof( $error ) == 0 ) { $result = validate_upload( $path, $conf['upload_maxfilesize'], @@ -332,7 +332,7 @@ $template->assign_vars( 'U_RETURN' => make_index_url(array('category' => $category)), ) ); - + if ( !$page['upload_successful'] ) { $template->assign_block_vars('upload_not_successful',array()); @@ -385,7 +385,7 @@ if ( sizeof( $error ) != 0 ) } } $template->assign_block_vars('upload_not_successful.advise',array('ADVISE'=>l10n('upload_advise_filetype'))); - + //----------------------------------------- optionnal username and mail address if ( !isset( $page['waiting_id'] ) ) { |