Skip to content

Commit

Permalink
tidied up date
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@34 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Dec 6, 2000
1 parent 309d1c7 commit 3d763d3
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions core_API.php
Expand Up @@ -198,7 +198,7 @@ function print_bug_date_summary( $p_date_array ) {

$arr_count = count( $p_date_array );
for ($i=0;$i<$arr_count;$i++) {
$t_enum_count = get_bug_count_by_date2( $p_date_array[$i] );
$t_enum_count = get_bug_count_by_date( $p_date_array[$i] );

### alternate row colors
if ( $i % 2 == 1) {
Expand Down Expand Up @@ -378,19 +378,9 @@ function sql_to_unix_time( $p_timeString ) {
substr( $p_timeString, 0, 4 ) );
}
#--------------------
function get_bug_count_by_date( $p_num_days=1 ) {
global $g_mantis_bug_table;

#$day = strtotime( "-1 month" );
$day = time() - 86400*$p_num_days;
$query = "SELECT COUNT(id)
FROM $g_mantis_bug_table
WHERE UNIX_TIMESTAMP(last_updated)>$day";
$result = mysql_query( $query );
return mysql_result( $result, 0 );
}
#--------------------
function get_bug_count_by_date2( $p_time_length="day" ) {
# expects the paramter to be neutral in time length
# automatically adds the -
function get_bug_count_by_date( $p_time_length="day" ) {
global $g_mantis_bug_table;

$day = strtotime( "-".$p_time_length );
Expand Down

0 comments on commit 3d763d3

Please sign in to comment.