diff options
Diffstat (limited to 'plugins/Sitemap/SitemapPlugin.php')
-rw-r--r-- | plugins/Sitemap/SitemapPlugin.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/Sitemap/SitemapPlugin.php b/plugins/Sitemap/SitemapPlugin.php index 87a70585e..d4d295237 100644 --- a/plugins/Sitemap/SitemapPlugin.php +++ b/plugins/Sitemap/SitemapPlugin.php @@ -71,6 +71,7 @@ class SitemapPlugin extends Plugin case 'SitemapindexAction': case 'NoticesitemapAction': case 'UsersitemapAction': + case 'SitemapadminpanelAction': require_once $dir . '/' . strtolower(mb_substr($cls, 0, -6)) . '.php'; return false; case 'SitemapAction': @@ -124,6 +125,10 @@ class SitemapPlugin extends Plugin 'month' => '[01][0-9]', 'day' => '[0123][0-9]', 'index' => '[1-9][0-9]*')); + + $m->connect('admin/sitemap', + array('action' => 'sitemapadminpanel')); + return true; } @@ -199,4 +204,15 @@ class SitemapPlugin extends Plugin return true; } + + function onEndAdminPanelNav($menu) { + if (AdminPanelAction::canAdmin('sitemap')) { + // TRANS: Menu item title/tooltip + $menu_title = _('Sitemap configuration'); + // TRANS: Menu item for site administration + $menu->out->menuItem(common_local_url('sitemapadminpanel'), _('Sitemap'), + $menu_title, $action_name == 'sitemapadminpanel', 'nav_sitemap_admin_panel'); + } + return true; + } } |