MantisBT: master 0a33bdfd

Author Committer Branch Timestamp Parent
dregad dregad master 2014-12-23 01:25 master 10a049f7
Affected Issues  0017980: manage_user_page php error due to time user creation time in the future
Changeset

Refactor db_helper_compare_days()

  1. Function renamed to db_helper_compare_time()
  2. It now accepts 4 parameters, which have been reordered
    • date 1
    • an SQL operator to use for the comparison
    • date 2
    • the number of seconds to compare against
      Note: the date parameters should only be strings (column names);
      date constants should be passed as DB parameters
  3. The comparison is rewritten based on sign of $p_num_secs to avoid
    issues with unsigned integers on MySQL

Returns: date1 [operator] date2 + days

All occurences of the function in MantisBT code base have been updated
accordingly.

Fixes 0017980

mod - core/database_api.php Diff File
mod - core/news_api.php Diff File
mod - core/summary_api.php Diff File
mod - manage_user_page.php Diff File
mod - manage_user_prune.php Diff File