Index: bug_update_advanced_page.php
===================================================================
--- bug_update_advanced_page.php (revision 5521)
+++ bug_update_advanced_page.php (working copy)
@@ -190,7 +190,10 @@
?>
-
+
@@ -203,7 +206,7 @@
}
if ( access_has_bug_level( config_get( 'due_date_update_threshold' ), $f_bug_id ) ) {
$t_date_to_display = '';
- if ( ! date_is_null( $t_bug->due_date ) ) {
+ if ( ! date_is_null( $t_bug->due_date ) ) {
$t_date_to_display = date( config_get( 'short_date_format' ), $t_bug->due_date );
}
print "";
@@ -212,7 +215,10 @@
?>
|
due_date != $t_null_date ) print_date( config_get( 'short_date_format' ), $t_bug->due_date ); }?>
+ if ( ! date_is_null($t_bug->due_date) ) {
+ print_date( config_get( 'short_date_format' ), $t_bug->due_date );
+ }
+ }?>
Index: admin/schema.php
===================================================================
--- admin/schema.php (revision 5521)
+++ admin/schema.php (working copy)
@@ -404,8 +404,8 @@
" ) );
$upgrade[] = Array( 'AddColumnSQL', Array( db_get_table( 'mantis_project_version_table' ), "
obsolete L NOTNULL DEFAULT \" '0' \"" ) );
-$upgrade[] = Array( 'AddColumnSQL', Array( db_get_table( 'mantis_bug_table' ), "
- due_date T NOTNULL DEFAULT '" . db_null_date() . "' " ) );
+#$upgrade[] = Array( 'AddColumnSQL', Array( db_get_table( 'mantis_bug_table' ), "
+# due_date T NOTNULL DEFAULT '" . db_null_date() . "' " ) );
$upgrade[] = Array( 'AddColumnSQL', Array( db_get_table( 'mantis_custom_field_table' ), "
filter_by L NOTNULL DEFAULT \" '1' \"" ) );
Index: core/date_api.php
===================================================================
--- core/date_api.php (revision 5521)
+++ core/date_api.php (working copy)
@@ -38,6 +38,32 @@
function date_get_null() {
return db_unixtimestamp( db_null_date() );
}
+
+ # --------------------
+ # converts date from user defined (short_date_format) string to timestamp
+ function date_remake( $p_date ) {
+ #get delimiter
+ $date_format_strings = array( "m", "d", "y", "M", "D", "Y" );
+ $date_delimiter = str_replace( $date_format_strings, "", config_get( 'short_date_format' ) );
+ $date_delimiter = $date_delimiter[0];
+
+ $t_due_date = explode( $date_delimiter, $p_date );
+ $date_format_order = explode( $date_delimiter, config_get( 'short_date_format' ) );
+ $i = 0;
+ foreach ( $date_format_order as $key ) {
+ switch( $key ) {
+ case 'd': $t_due_date_day = $t_due_date[$i];
+ break;
+ case 'm': $t_due_date_month = $t_due_date[$i];
+ break;
+ case 'Y': $t_due_date_year = $t_due_date[$i];
+ break;
+ }
+ $i = $i+1;
+ }
+ return gmmktime( 0, 0, 1, $t_due_date_month, $t_due_date_day, $t_due_date_year );
+ }
+
# --------------------
# prints the date given the formating string
Index: core/custom_field_api.php
===================================================================
--- core/custom_field_api.php (revision 5521)
+++ core/custom_field_api.php (working copy)
@@ -741,6 +741,7 @@
( pt.view_state = $t_priv and pult.user_id = $t_user_id ) OR
( pult.user_id is null and ut.access_level $t_access_clause ) )
ORDER BY cft.name ASC";
+// GROUP BY cft.id, cft.name
} else {
if ( is_array( $p_project_id ) ) {
if ( 1 == count( $p_project_id ) ) {
Index: bug_report.php
===================================================================
--- bug_report.php (revision 5521)
+++ bug_report.php (working copy)
@@ -55,12 +55,14 @@
$t_bug_data->steps_to_reproduce = gpc_get_string( 'steps_to_reproduce', config_get( 'default_bug_steps_to_reproduce' ) );
$t_bug_data->additional_information = gpc_get_string( 'additional_info', config_get ( 'default_bug_additional_info' ) );
$t_bug_data->due_date = gpc_get_string( 'due_date', '');
+
if ( is_blank ( $t_bug_data->due_date ) ) {
- $t_bug_data->due_date = date_get_null( );
- } else {
- $t_bug_data->due_date = db_unixtimestamp ( $t_bug_data->due_date, true ) + 1;
- }
+ $t_bug_data->due_date = date_get_null( );
+ } else {
+ $t_bug_data->due_date = date_remake( $t_bug_data->due_date );
+ }
+
$f_file = gpc_get_file( 'file', null ); #@@@ (thraxisp) Note that this always returns a structure
# size = 0, if no file
$f_report_stay = gpc_get_bool( 'report_stay', false );
Index: bug_update.php
===================================================================
--- bug_update.php (revision 5521)
+++ bug_update.php (working copy)
@@ -80,9 +80,10 @@
if ( is_blank ( $t_bug_data->due_date ) ) {
$t_bug_data->due_date = date_get_null( );
} else {
- $t_bug_data->due_date = db_unixtimestamp ( $t_bug_data->due_date, true ) + 1;
+ $t_bug_data->due_date = date_remake( $t_bug_data->due_date);
}
+
$t_bug_data->description = gpc_get_string( 'description', $t_bug_data->description );
$t_bug_data->steps_to_reproduce = gpc_get_string( 'steps_to_reproduce', $t_bug_data->steps_to_reproduce );
$t_bug_data->additional_information = gpc_get_string( 'additional_information', $t_bug_data->additional_information );