From f104d3cc12134fc574373d6a643d9c84a317de44 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 26 Sep 2003 10:04:09 +0000 Subject: - Committed the admin menu integration patch. Thanks Adrian, Stefan and others. --- modules/poll/poll.module | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/poll/poll.module') diff --git a/modules/poll/poll.module b/modules/poll/poll.module index b93cdbb8d..36a903bd5 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -161,8 +161,10 @@ function poll_insert($node) { function poll_link($type, $node = 0, $main) { $links = array(); - if ($type == "menu.create" && user_access("create polls")) { - $links[] = l(t("create poll"), "node/add/poll", array("title" => t("Add a new poll."))); + if ($type == "system") { + if (user_access("create polls")) { + menu("node/add/poll",t("create poll"), NULL, NULL, 0); + } } else if ($type == "page" && user_access("access content")) { $links[] = l(t("polls"), "poll", array("title" => t("View the list of polls on this site."))); -- cgit v1.2.3