Skip to content

Commit

Permalink
Improvement - stale is a website action
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardnico committed Aug 30, 2021
1 parent 37cfceb commit 0f59432
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Menuitem.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
class MenuItem extends AbstractItem
{


/**
* The first compile time, the javascript may not
* work, we send the user to the admin page
Expand All @@ -36,6 +37,7 @@ public function getLinkAttributes($classprefix = 'menuitem ')
{
$linkAttributes = parent::getLinkAttributes($classprefix);


$linkAttributes['id'] = self::MENU_HTML_ELEMENT_ID;

return $linkAttributes;
Expand All @@ -47,6 +49,8 @@ public function getType()
}




public function getTitle()
{
$stale = plugin_load('helper', helper_plugin_stale::PLUGIN_NAME);
Expand Down
2 changes: 1 addition & 1 deletion action.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function add_menu_item(Doku_Event $event, $param)
* https://www.dokuwiki.org/devel:menus
* If this is not the page menu, return
*/
if ($event->data['view'] != 'page') return;
if ($event->data['view'] != 'site') return;

/** @var helper_plugin_stale $stale */
$stale = plugin_load('helper', 'stale');
Expand Down

0 comments on commit 0f59432

Please sign in to comment.