From 97ae39875d163e565037df2722b9e9a4e6f82702 Mon Sep 17 00:00:00 2001 From: Schulz Date: Wed, 13 Sep 2017 14:37:36 +0200 Subject: [PATCH 1/3] changed mantis core version in plugin config to 2.0.0 --- InlineHistory/InlineHistory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InlineHistory/InlineHistory.php b/InlineHistory/InlineHistory.php index e2c6be2..64ce58f 100644 --- a/InlineHistory/InlineHistory.php +++ b/InlineHistory/InlineHistory.php @@ -24,7 +24,7 @@ function register() { $this->version = '0.1'; $this->requires = array( - 'MantisCore' => '1.2.0', + 'MantisCore' => '2.0.0', ); $this->author = 'John Reese, MantisBT team'; From 3cf9b6e66fefbb30a17ec799e6c9648fe4cf9587 Mon Sep 17 00:00:00 2001 From: Christian Schulz Date: Thu, 14 Sep 2017 10:53:35 +0200 Subject: [PATCH 2/3] repaired order function. now timestamps are compared instead of date strings --- InlineHistory/InlineHistory.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/InlineHistory/InlineHistory.php b/InlineHistory/InlineHistory.php index 64ce58f..cf14de2 100644 --- a/InlineHistory/InlineHistory.php +++ b/InlineHistory/InlineHistory.php @@ -236,7 +236,9 @@ private function need_next( $p_note_time ) { if ( !isset( $this->history[0] ) ) { return false; } - $t_need_next = $this->history[0]['date'] < $p_note_time; + + $t_need_next = strtotime($this->history[0]['date']) < strtotime($p_note_time); + if ( $this->order ) { return $t_need_next; } else { From 669e7a8deaaaab5300fe402e0b1e145ec49ce07f Mon Sep 17 00:00:00 2001 From: Schulz Date: Mon, 18 Sep 2017 13:05:27 +0200 Subject: [PATCH 3/3] fixed bug in user config page value for compare function now gets converted to bool --- InlineHistory/InlineHistory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InlineHistory/InlineHistory.php b/InlineHistory/InlineHistory.php index cf14de2..e55c707 100644 --- a/InlineHistory/InlineHistory.php +++ b/InlineHistory/InlineHistory.php @@ -106,7 +106,7 @@ function user_pref_update_form( $p_event, $p_user_id ) { plugin_lang_get( 'view_inline_history' ), '', 'user_inline_view_enabled( $p_user_id ) ); + check_checked( boolval($this->user_inline_view_enabled( $p_user_id )) ); echo '/>'; }