|
|
Choosing A Webhost: |
mantisbt/api/soap mc_file_api.php,1.1,1.1.2.1: msg#00072bug-tracking.mantis.cvs
Update of /cvsroot/mantisbt/mantisbt/api/soap In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3682 Modified Files: Tag: BRANCH_1_1_0 mc_file_api.php Log Message: Fixed #8492: Add attachment succeeds but creates broken attachment if upload path not found. Fixed #8493: Attachments created via SOAP API don't owner attachments_file_permissions config option. Index: mc_file_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/api/soap/mc_file_api.php,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -d -r1.1 -r1.1.2.1 --- mc_file_api.php 18 Jul 2007 06:52:53 -0000 1.1 +++ mc_file_api.php 20 Oct 2007 23:17:43 -0000 1.1.2.1 @@ -78,6 +78,11 @@ $t_file_path = config_get( 'absolute_path_default_upload_folder' ); } } + + if ( !file_exists( $t_file_path ) ) { + return new soap_fault( 'Server', '', "Upload folder '{$t_file_path}' doesn't exist." ); + } + $c_file_path = db_prepare_string( $t_file_path ); $c_new_file_name = db_prepare_string( $p_name ); @@ -101,9 +106,10 @@ file_ftp_put ( $conn_id, $t_disk_file_name, $t_disk_file_name ); file_ftp_disconnect ( $conn_id ); file_delete_local( $p_disk_file_name ); - } else { - chmod( $t_disk_file_name, 0400 ); } + + chmod( $t_disk_file_name, config_get( 'attachments_file_permissions' ) ); + $c_content = ''; } break; ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | mantisbt/api/soap mc_file_api.php,1.1,1.2, Victor Boctor |
|---|---|
| Next by Date: | mantisbt manage_proj_ver_copy.php,1.2,1.3, Victor Boctor |
| Previous by Thread: | mantisbt/api/soap mc_file_api.php,1.1,1.2, Victor Boctor |
| Next by Thread: | mantisbt manage_proj_ver_copy.php,1.2,1.3, Victor Boctor |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |