diff --git a/action/historicalbreadcrumb.php b/action/historicalbreadcrumb.php index 01f8cd260..0b9dd2ae1 100644 --- a/action/historicalbreadcrumb.php +++ b/action/historicalbreadcrumb.php @@ -25,8 +25,6 @@ class action_plugin_combo_historicalbreadcrumb extends DokuWiki_Action_Plugin { - const HISTORICAL_BREADCRUMB_NAME = "historical-breadcrumb"; - public function register(Doku_Event_Handler $controller) { @@ -66,7 +64,7 @@ public function handle_breadcrumb_history(Doku_Event $event, $param) /** * Css */ - PluginUtility::getSnippetManager()->attachCssSnippetForRequest(self::HISTORICAL_BREADCRUMB_NAME); + PluginUtility::getSnippetManager()->attachCssSnippetForRequest(HistoricalBreadcrumbMenuItem::HISTORICAL_BREADCRUMB_NAME); array_splice($event->data['items'], -1, 0, array(new HistoricalBreadcrumbMenuItem())); diff --git a/class/DokuPath.php b/class/DokuPath.php index 309b7997a..57c846b0d 100644 --- a/class/DokuPath.php +++ b/class/DokuPath.php @@ -98,7 +98,10 @@ protected function __construct($absolutePath, $type, $rev = null) } else { if (substr($absolutePath, 0, 1) != DokuPath::PATH_SEPARATOR) { - LogUtility::msg("The path given ($absolutePath) is not qualified", LogUtility::LVL_MSG_ERROR); + if(PluginUtility::isDevOrTest()) { + // Feel too much the log, test are not seeing anything, may be minimap ? + LogUtility::msg("The path given ($absolutePath) is not qualified", LogUtility::LVL_MSG_ERROR); + } $this->absolutePath = ":" . $absolutePath; } $this->scheme = self::LOCAL_SCHEME; diff --git a/class/HistoricalBreadcrumbMenuItem.php b/class/HistoricalBreadcrumbMenuItem.php index 7a961a944..b1702ba3f 100644 --- a/class/HistoricalBreadcrumbMenuItem.php +++ b/class/HistoricalBreadcrumbMenuItem.php @@ -12,7 +12,6 @@ namespace ComboStrap; -require_once('PluginUtility.php'); use dokuwiki\Menu\Item\AbstractItem; @@ -30,6 +29,12 @@ class HistoricalBreadcrumbMenuItem extends AbstractItem const RECENT_PAGES_VISITED = "Recent Pages Visited"; + /** + * This unique name should not be in the {@link \action_plugin_combo_historicalbreadcrumb} + * to avoid circular reference + */ + const HISTORICAL_BREADCRUMB_NAME = "historical-breadcrumb"; + /** * @@ -62,7 +67,7 @@ public function getLinkAttributes($classprefix = 'menuitem ') */ $actualPageId = array_keys($pages)[0]; $actualPageName = array_shift($pages); - $html = $this->createLink($actualPageId,$actualPageName,\action_plugin_combo_historicalbreadcrumb::HISTORICAL_BREADCRUMB_NAME."-home"); + $html = $this->createLink($actualPageId,$actualPageName, self::HISTORICAL_BREADCRUMB_NAME ."-home"); $html .= '