From 7b155e5226198e5e141997b7e7fc3db39d60fcc6 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Sat, 14 Sep 2002 13:51:57 +0000 Subject: - removing the blot it link when the blog module is not loaded and the user does not have access to post content. (Patch by Pierre Gorissen) --- modules/import.module | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'modules/import.module') diff --git a/modules/import.module b/modules/import.module index 2f48a9004..ec8669055 100644 --- a/modules/import.module +++ b/modules/import.module @@ -545,7 +545,7 @@ function import_page_last() { $output .= ""; while ($item = db_fetch_object($result)) { - if (module_exist("blog")) { + if (module_exist("blog") && user_access("post content")) { $links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog."))); } $links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("Read more syndicated news from this feed."))); @@ -581,7 +581,9 @@ function import_page_feed($fid) { $output .= "
"; while ($item = db_fetch_object($result)) { - $links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog."))); + if (module_exist("blog") && user_access("post content")) { + $links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog."))); + } $links[] = "link\">". t("visit") .""; if ($item->link) { @@ -616,7 +618,9 @@ function import_page_bundle($bid) { $output .= "
"; while ($item = db_fetch_object($result)) { - $links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog."))); + if (module_exist("blog") && user_access("post content")) { + $links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog."))); + } $links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("Read more syndicated news from this feed."))); $links[] = "link\">". t("visit") .""; -- cgit v1.2.3