From: David ‘Bombe’ Roden Date: Wed, 13 Oct 2010 11:48:52 +0000 (+0200) Subject: If the page can say whether it’s enabled in the menu, forward the request. X-Git-Tag: 0.1-RC1~495 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=215d3044366e1b594a907b66291a34224c1d7b3e;p=Sone.git If the page can say whether it’s enabled in the menu, forward the request. --- diff --git a/src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java b/src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java index 57a3439..6d4b8a6 100644 --- a/src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java +++ b/src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java @@ -173,6 +173,9 @@ public class PageToadlet extends Toadlet implements LinkEnabledCallback { */ @Override public boolean isEnabled(ToadletContext toadletContext) { + if (page instanceof LinkEnabledCallback) { + return ((LinkEnabledCallback) page).isEnabled(toadletContext); + } return true; }