From: <vb...@us...> - 2003-02-23 04:45:10
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1:/tmp/cvs-serv24219/core Modified Files: project_api.php Log Message: New config option (display_project_padding): controls the level of padding on project ids. This is now used in constructing file names for documents attached to projects. Index: project_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/project_api.php,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- project_api.php 22 Feb 2003 11:52:39 -0000 1.40 +++ project_api.php 23 Feb 2003 04:45:03 -0000 1.41 @@ -601,4 +601,15 @@ function project_delete_all_files( $p_project_id ) { file_delete_project_files( $p_project_id ); } + + #=================================== + # Other + #=================================== + + # -------------------- + # Pads the project id with the appropriate number of zeros. + function project_format_id( $p_project_id ) { + $t_padding = config_get( 'display_project_padding' ); + return( str_pad( $p_project_id, $t_padding, '0', STR_PAD_LEFT ) ); + } ?> |