diff --git a/EmailReporting.php b/EmailReporting.php
index 72ed48d..72b3651 100644
--- a/EmailReporting.php
+++ b/EmailReporting.php
@@ -63,7 +63,7 @@ function register()
$this->version = '0.9.3-DEV';
$this->requires = array(
- 'MantisCore' => '1.2.6, <1.3.99',
+ 'MantisCore' => '1.2.6, <2.0.99',
);
$this->author = plugin_lang_get( 'plugin_author' );
diff --git a/core/config_api.php b/core/config_api.php
index 2efb971..1690c81 100644
--- a/core/config_api.php
+++ b/core/config_api.php
@@ -98,6 +98,41 @@ function ERP_get_mailboxes( $p_mailbox_id = FALSE, $p_mailbox_plugin_content = T
}
}
+ # --------------------
+ # Page header en beginning.
+ function ERP_page_begin( $p_page = '' )
+ {
+ // MantisBT 2.0.x
+ if ( function_exists( 'layout_page_header' ) )
+ {
+ layout_page_header( $p_page );
+ layout_page_begin( 'manage_overview_page.php' );
+ print_manage_menu( 'manage_plugin_page.php' );
+ }
+ // pre-MantisBT 2.0.x
+ else
+ {
+ html_page_top( $p_page );
+ print_manage_menu();
+ }
+ }
+
+ # --------------------
+ # Page footer
+ function ERP_page_end( $p_page = '' )
+ {
+ // MantisBT 2.0.x
+ if ( function_exists( 'layout_page_end' ) )
+ {
+ layout_page_end();
+ }
+ // pre-MantisBT 2.0.x
+ else
+ {
+ html_page_bottom( $p_page );
+ }
+ }
+
# --------------------
# output the menu with the ERP menu links
function ERP_print_menu( $p_page = '' )
diff --git a/doc/CHANGELOG.txt b/doc/CHANGELOG.txt
index 99e9cae..3ec0e1a 100644
--- a/doc/CHANGELOG.txt
+++ b/doc/CHANGELOG.txt
@@ -1,5 +1,6 @@
Changelog:
Jul 2016 - EmailReporting-0.9.3-DEV
+ - Preliminary support for MantisBT 2.0.x and ModernUI
- Fix possible fatal error on return value
- Added error when __construct is not run when it should have
- Added fallback in case of an unknown email priority
diff --git a/pages/manage_config.php b/pages/manage_config.php
index dd76b26..d0a8f96 100644
--- a/pages/manage_config.php
+++ b/pages/manage_config.php
@@ -2,12 +2,10 @@
auth_reauthenticate( );
access_ensure_global_level( config_get( 'manage_plugin_threshold' ) );
-layout_page_header( plugin_lang_get( 'plugin_title' ) );
-
-layout_page_begin( 'manage_overview_page.php' );
-
plugin_require_api( 'core/config_api.php' );
+ERP_page_begin( plugin_lang_get( 'plugin_title' ) );
+
$t_this_page = 'manage_config';
ERP_print_menu( $t_this_page );
@@ -191,5 +189,5 @@
diff --git a/pages/manage_config_edit.php b/pages/manage_config_edit.php
index 1eb5e49..84d8deb 100644
--- a/pages/manage_config_edit.php
+++ b/pages/manage_config_edit.php
@@ -62,7 +62,7 @@
}
else
{
- layout_page_header( plugin_lang_get( 'plugin_title' ) );
+ ERP_page_begin( plugin_lang_get( 'plugin_title' ) );
echo '