CoreAPI
[ class tree: CoreAPI ] [ index: CoreAPI ] [ all elements ]

Procedural File: file_api.php

Source Location: /core/file_api.php



Page Details:



Tags:

copyright:  Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
copyright:  Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
link:  http://www.mantisbt.org
usedby:  bug_get_attachments()


Includes:

require_once('bug_api.php') [line 32]
requires bug_api

require_once('history_api.php') [line 28]
requires history_api







diskfile_is_name_unique [line 576]

void diskfile_is_name_unique( $p_name, $p_filepath)



Parameters

   $p_name  
   $p_filepath  
[ Top ]



file_add [line 617]

void file_add( integer $p_bug_id, array $p_file, [ $p_table = 'bug'], [ $p_title = ''], [ $p_desc = ''], [ $p_user_id = null])

Add a file to the system using the configured storage method



Parameters

integer   $p_bug_id   the bug id
array   $p_file   the uploaded file info, as retrieved from gpc_get_file()
   $p_table  
   $p_title  
   $p_desc  
   $p_user_id  
[ Top ]



file_allow_bug_upload [line 760]

void file_allow_bug_upload( [ $p_bug_id = null], [ $p_user_id = null])



Parameters

   $p_bug_id  
   $p_user_id  
[ Top ]



file_allow_project_upload [line 743]

void file_allow_project_upload( [ $p_project_id = null], [ $p_user_id = null])



Parameters

   $p_project_id  
   $p_user_id  
[ Top ]



file_bug_attachment_count [line 61]

void file_bug_attachment_count( $p_bug_id)



Parameters

   $p_bug_id  
[ Top ]



file_bug_has_attachments [line 104]

void file_bug_has_attachments( $p_bug_id)



Parameters

   $p_bug_id  
[ Top ]



file_can_delete_bug_attachments [line 135]

void file_can_delete_bug_attachments( $p_bug_id)



Parameters

   $p_bug_id  
[ Top ]



file_can_download_bug_attachments [line 124]

void file_can_download_bug_attachments( $p_bug_id)



Parameters

   $p_bug_id  
[ Top ]



file_can_view_bug_attachments [line 113]

void file_can_view_bug_attachments( $p_bug_id)



Parameters

   $p_bug_id  
[ Top ]



file_clean_name [line 553]

void file_clean_name( $p_filename)



Parameters

   $p_filename  
[ Top ]



file_delete [line 479]

void file_delete( $p_file_id, [ $p_table = 'bug'])



Parameters

   $p_file_id  
   $p_table  
[ Top ]



file_delete_attachments [line 326]

void file_delete_attachments( $p_bug_id)



Parameters

   $p_bug_id  
[ Top ]



file_delete_local [line 458]

void file_delete_local( $p_filename)



Parameters

   $p_filename  
[ Top ]



file_delete_project_files [line 377]

void file_delete_project_files( $p_project_id)



Parameters

   $p_project_id  
[ Top ]



file_ensure_uploaded [line 813]

void file_ensure_uploaded( array $p_file)

Ensure a file was uploaded

This function perform various checks for determining if the upload was successful




Parameters

array   $p_file   the uploaded file info, as retrieved from gpc_get_file()
[ Top ]



file_ensure_valid_upload_path [line 799]

void file_ensure_valid_upload_path( $p_upload_path)



Parameters

   $p_upload_path  
[ Top ]



file_ftp_cache_cleanup [line 420]

void file_ftp_cache_cleanup( )



[ Top ]



file_ftp_connect [line 424]

void file_ftp_connect( )



[ Top ]



file_ftp_delete [line 448]

void file_ftp_delete( $p_conn_id, $p_filename)



Parameters

   $p_conn_id  
   $p_filename  
[ Top ]



file_ftp_disconnect [line 453]

void file_ftp_disconnect( $p_conn_id)



Parameters

   $p_conn_id  
[ Top ]



file_ftp_get [line 442]

void file_ftp_get( $p_conn_id, $p_local_filename, $p_remote_filename)



Parameters

   $p_conn_id  
   $p_local_filename  
   $p_remote_filename  
[ Top ]



file_ftp_put [line 436]

void file_ftp_put( $p_conn_id, $p_remote_filename, $p_local_filename)



Parameters

   $p_conn_id  
   $p_remote_filename  
   $p_local_filename  
[ Top ]



file_generate_name [line 560]

void file_generate_name( $p_seed)



Parameters

   $p_seed  
[ Top ]



file_generate_unique_name [line 566]

void file_generate_unique_name( $p_seed, $p_filepath)



Parameters

   $p_seed  
   $p_filepath  
[ Top ]



file_get_display_name [line 38]

void file_get_display_name( $p_filename)



Parameters

   $p_filename  
[ Top ]



file_get_extension [line 836]

void file_get_extension( $p_filename)



Parameters

   $p_filename  
[ Top ]



file_get_field [line 466]

void file_get_field( $p_file_id, $p_field_name, [ $p_table = 'bug'])



Parameters

   $p_file_id  
   $p_field_name  
   $p_table  
[ Top ]



file_get_icon_url [line 151]

void file_get_icon_url( $p_display_filename)



Parameters

   $p_display_filename  
[ Top ]



file_get_visible_attachments [line 257]

void file_get_visible_attachments( $p_bug_id)



Parameters

   $p_bug_id  
[ Top ]



file_is_name_unique [line 595]

void file_is_name_unique( $p_name, $p_bug_id)



Parameters

   $p_name  
   $p_bug_id  
[ Top ]



file_is_uploading_enabled [line 732]

void file_is_uploading_enabled( )



[ Top ]



file_normalize_attachment_path [line 194]

The file_normalize_attachment_path( string $p_diskfile, integer $p_project_id)

Nomalizes the disk file path based on the following algorithm:
  1. If disk file exists, then return as is.


2. If not, and a project path is available, then check with that, if exists return it. 3. If not, then use default upload path, then check with that, if exists return it. 4. If disk file doesn't include a path, then return expected path based on project path or default path. 5. Otherwise return as is.




Tags:

return:  normalized full path.


Parameters

string   $p_diskfile   The disk file (full path or just filename).
integer   $p_project_id   The project id - shouldn't be 0 (ALL_PROJECTS).
[ Top ]



file_path_combine [line 171]

The file_path_combine( string $p_path, string $p_filename)

Combines a path and a file name making sure that the separator exists.



Tags:

return:  combined full path.


Parameters

string   $p_path   The path.
string   $p_filename   The file name.
[ Top ]



file_type_check [line 519]

void file_type_check( $p_file_name)



Parameters

   $p_file_name  
[ Top ]



Documentation generated on Sun, 12 Dec 2010 23:50:28 +0900 by phpDocumentor 1.4.3
inserted by FC2 system