diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-09-14 13:51:57 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-09-14 13:51:57 +0000 |
commit | 7b155e5226198e5e141997b7e7fc3db39d60fcc6 (patch) | |
tree | 5c6ec5125af1514bdff73fd36cefdd2b106e3202 /modules/aggregator | |
parent | beddc135d268e5d791e2c4061d58ecb9bdfa29c0 (diff) | |
download | brdo-7b155e5226198e5e141997b7e7fc3db39d60fcc6.tar.gz brdo-7b155e5226198e5e141997b7e7fc3db39d60fcc6.tar.bz2 |
- 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)
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.module | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 2f48a9004..ec8669055 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -545,7 +545,7 @@ function import_page_last() { $output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">"; 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 .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">"; 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[] = "<a href=\"$item->link\">". t("visit") ."</a>"; if ($item->link) { @@ -616,7 +618,9 @@ function import_page_bundle($bid) { $output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">"; 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[] = "<a href=\"$item->link\">". t("visit") ."</a>"; |