From 5c2fb8e20bbe7a7fd819058f69f9f8583b23525c Mon Sep 17 00:00:00 2001 From: Zipher Date: Sat, 23 Jul 2016 11:56:59 +0800 Subject: [PATCH] Update to be compatible to Mantis v1.3. --- InlineHistory/InlineHistory.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/InlineHistory/InlineHistory.php b/InlineHistory/InlineHistory.php index e2c6be2..f6a8b4b 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' => '1.3.0', ); $this->author = 'John Reese, MantisBT team'; @@ -75,7 +75,7 @@ function user_inline_view_enabled( $p_user_id=null ) { $t_query = "SELECT * FROM $t_user_table WHERE user_id=" . db_param(); - $t_result = db_query_bound( $t_query, array( $p_user_id ) ); + $t_result = db_query( $t_query, array( $p_user_id ) ); if ( db_num_rows ( $t_result ) < 1 ) { $s_enabled[ $p_user_id ] = plugin_config_get( 'default_enabled' ); @@ -101,13 +101,14 @@ function user_inline_view_enabled( $p_user_id=null ) { * @param int User ID */ function user_pref_update_form( $p_event, $p_user_id ) { - - echo '', - plugin_lang_get( 'view_inline_history' ), - '', - 'user_inline_view_enabled( $p_user_id ) ); - echo '/>'; + echo '
' + . '' + . '' + . 'user_inline_view_enabled( $p_user_id ), ON ); + echo '/>' + . '' + . '
'; } /** @@ -129,7 +130,7 @@ function user_pref_update( $p_event, $p_user_id ) { $t_query = "UPDATE $t_user_table SET enabled=" . db_param() . " WHERE user_id=" . db_param(); - db_query_bound( $t_query, array( $f_enabled, $p_user_id ) ); + db_query( $t_query, array( $f_enabled, $p_user_id ) ); } /**