View Issue Details

IDProjectCategoryView StatusLast Update
0008258mantisbtfilterspublic2009-10-10 02:01
Reporterpengzhw Assigned To 
PrioritynormalSeverityminorReproducibilitysometimes
Status acknowledgedResolutionopen 
OSWindows XP 
Product Version1.0.8 
Summary0008258: last updated date of all issues sometimes shown bold
Description

We are recently upgrading PHP from 4.4.x to PHP 5.2.3.

Sometimes when we login with "All Projects", the last updated date of all issues are shown in bold font. If I choose some specific project, the dates are shown as normal.

Last update date was shown by function print_column_last_updated() in the file core/columns_api.php. By using short debugging code as following, I found $t_filter['highlight_changed'] is blank or null:

if ( $p_row['last_updated'] > strtotime( '-'.$t_filter['highlight_changed'].' hours' ) )
{
printf( '<span class="bold">%s</span>', $t_last_updated."@".$t_filter['highlight_changed'] );

} else
{
echo $t_last_updated."@".$t_filter['highlight_changed'];
}

For PHP5, $p_row['last_updated'] > strtotime('-'.$t_filter['highlight_changed'].' hours' ) is always true in case of null/blank $t_filter['highlight_changed'], which leads to bold last updated date. But for PHP4, it is always false.

Additional Information

server: Apache 2.0.59 for Win32, PHP 5.2.3/PHP 4.4.7, mantis 1.0.6/1.0.8,
Windows XP SP2
browser: Firefox 2.0.0.6, IE6

Tagspatch

Activities

pengzhw

pengzhw

2007-08-12 01:40

reporter   ~0015421

Last edited: 2007-08-12 01:42

Steps to reproduce:

  1. Have both PHP 4.4.7 and PHP 5.2.3 (from .zip binary) installed for Apache 2.0.59 Win32.
    PHP 4.4.7 (with its php.ini) in c:\php-4.4.x-Win32, while
    PHP 5.2.3 (with its php.ini) in c:\php-5.2.x-Win32. Here is part of my httpd.conf regarding php, with which I can easily switch between PHP 4 and PHP 5.

For PHP 4 do something like this:

#LoadModule php4_module "C:/php-4.4.x-Win32/php4apache2.dll"

Don't forget to copy the php4apache2.dll file from the sapi directory!

#AddType application/x-httpd-php .php

For PHP 5 do something like this:

LoadModule php5_module "C:/php-5.2.x-Win32/php5apache2.dll"
AddType application/x-httpd-php .php

configure the path to php.ini

PHPIniDir "C:/php-5.2.x-Win32"

  1. Switch from PHP 4 to PHP 5 and start Apache2;

  2. Login into mantis as administrator, usually "All Projects" being default project. Click "View Issues", and at this moment, last updated date of all issues are wrongly shown in bold font. (If bug not occur, use another browser or computer to login)

This is due to blank-valued $t_filter['highlight_changed']. But what causes it blank?

  1. Change current project to some specific project, or click "Apply Filter", then last updated date all become correctly shown. The reason is that $t_filter['highlight_changed'] now has valid value, default 6.