From 215d3044366e1b594a907b66291a34224c1d7b3e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 13 Oct 2010 13:48:52 +0200 Subject: [PATCH] =?utf8?q?If=20the=20page=20can=20say=20whether=20it?= =?utf8?q?=E2=80=99s=20enabled=20in=20the=20menu,=20forward=20the=20reques?= =?utf8?q?t.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/web/page/PageToadlet.java | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.7.4