View Issue Details

IDProjectCategoryView StatusLast Update
0003734mantisbtbugtrackerpublic2012-02-20 07:18
ReporterZakk Assigned Tograngeway  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version0.18.2 
Summary0003734: FTP upload feature is completely buggy!!!
Description

When i set $g_file_upload_method = FTP, i get so many bugs and error messages. It seems that you didn't test this feature at all.

Additional Information

I've taken a look into your source code and attached just a first bug of MANY. Please check file_api.php, proj_doc_add.php and other scripts once again.

TagsNo tags attached.
Attached Files
file_api.txt (1,016 bytes)   
	function file_add( $p_bug_id, $p_tmp_file, $p_file_name, $p_file_type='' ) {
			//...
				case FTP: // !!!!!!!!!!!!!!!!! WHAT'S UP GUYS?! !!!!!!!!!!!!!!!!
				case DISK:
					file_ensure_valid_upload_path( $t_file_path );

					if ( !file_exists( $t_file_path . $t_new_file_name ) ) {
						if ( FTP == $t_method ) { // !!!!!!!!!!!!!!!! WHO WROTE THIS ?!
							$conn_id = file_ftp_connect();
							file_ftp_put ( $conn_id, $t_new_file_name, $p_tmp_file );
							file_ftp_disconnect ( $conn_id );
						}

						umask( 0333 );  # make read only
						copy( $p_tmp_file, $t_file_path . $t_new_file_name ); // IF 'FTP' IS SELECTED THERE'S NO NEED TO copy() !!!!!!!!!!!!!!!!!

						$c_content = '';
					} else {
						trigger_error( ERROR_FILE_DUPLICATE, ERROR );
					}
					break;
				case DATABASE:
					$c_content = db_prepare_string( fread ( fopen( $p_tmp_file, 'rb' ), $t_file_size ) );
					break;
				default:
					trigger_error( ERROR_GENERIC, ERROR );
			}

		//...
	}
	
file_api.txt (1,016 bytes)   

Relationships

duplicate of 0007660 closedvboctor FTP method 
has duplicate 0003733 closedvboctor FTP uploading feature completely buggy!!! 
related to 0005427 closedgrangeway FTP function 

Activities

vboctor

vboctor

2004-04-11 05:17

manager   ~0005363

The FTP method uploads to both the webserver (i.e. similar to DISK) + FTP server. The idea was to use the webserver as a cache for the latest uploaded / downloaded files and the FTP server to contain all attachments. However, the implementation of this feature was not completed and hence, the webserver / FTP server always contain all attachments.

There is no plans to improve on this feature in the near future, if you are using it and would like it fixed, please send your patches.

grangeway

grangeway

2012-02-05 18:55

reporter   ~0031152

Issue 0007660 seems to be the same description as this