diff --git a/_config.php b/_config.php index 8a8e595a..5ebf2214 100644 --- a/_config.php +++ b/_config.php @@ -26,4 +26,14 @@ Director::addRules(50, array( // Built-in modules LeftAndMain::populate_default_menu(); +// If there are reports, add the ReportAdmin tab in CMS +if(ReportAdmin::has_reports()) { + LeftAndMain::add_menu_item( + 'reports', + _t('LeftAndMain.REPORTS', 'Reports', PR_HIGH, 'Menu title'), + 'admin/reports/', + 'ReportAdmin' + ); +} + ?> diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 0a2414cc..4cbd491d 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -977,14 +977,6 @@ JS; "admin/assets/", "AssetAdmin" ); - if(ReportAdmin::has_reports()) { - self::add_menu_item( - "report", - _t('LeftAndMain.REPORTS',"Reports",PR_HIGH,'Menu title'), - "admin/reports/", - "ReportAdmin" - ); - } self::add_menu_item( "security", _t('LeftAndMain.SECURITY',"Security",PR_HIGH,'Menu title'),