Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fea788d3ba75
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cc89f12fe955
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 7, 2013

  1. Fix mysql upgrades if token table is not empty - it's feasible for th…

    …e token table to have 0000-00-00 timestamps for the 'expiry' field
    mantis committed Apr 7, 2013
    Copy the full SHA
    70874b6 View commit details
  2. Copy the full SHA
    cc89f12 View commit details
Showing with 5 additions and 1 deletion.
  1. +1 −1 admin/schema.php
  2. +4 −0 core/classes/MantisDatabase/MantisDatabase.class.php
2 changes: 1 addition & 1 deletion admin/schema.php
Original file line number Diff line number Diff line change
@@ -364,7 +364,7 @@ function db_null_date() {
enabled L NOTNULL DEFAULT '0'
", array( 'mysql' => 'ENGINE=MyISAM DEFAULT CHARSET=utf8', 'pgsql' => 'WITHOUT OIDS' ) ) );
/* 65 */ $upgrade[] = array('AlterColumnSQL', array( '{user_pref}', "redirect_delay I NOTNULL DEFAULT 0" ) );
/* 66 */ $upgrade[] = array('AlterColumnSQL', array( '{custom_field}', "possible_values X NOTNULL DEFAULT ''" ) );
/* 66 */ $upgrade[] = array('AlterColumnSQL', array( '{custom_field}', "possible_values X NOTNULL" ) );
/* 67 */ $upgrade[] = array( 'CreateTableSQL', array( '{category}', "
id I UNSIGNED NOTNULL PRIMARY AUTOINCREMENT,
project_id I UNSIGNED NOTNULL DEFAULT '0',
4 changes: 4 additions & 0 deletions core/classes/MantisDatabase/MantisDatabase.class.php
Original file line number Diff line number Diff line change
@@ -375,6 +375,10 @@ public function legacy_null_date() {
* @return int
*/
public function legacy_timestamp( $p_date ) {
if( $p_date == '0000-00-00 00:00:00' ) {
return 0;
}

$p_timestamp = strtotime( $p_date );
if ( $p_timestamp == false ) {
throw new MantisBT\Exception\UnknownException();