| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: mmedia_attach.module,v 1.4 2009/01/06 13:23:24 rhys Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_init(). |
* Implementation of hook_init(). |
| 114 |
* Implementation of hook_link(). |
* Implementation of hook_link(). |
| 115 |
*/ |
*/ |
| 116 |
function mmedia_attach_link($type, $node = NULL, $teaser = FALSE) { |
function mmedia_attach_link($type, $node = NULL, $teaser = FALSE) { |
| 117 |
if ($type == 'node' && !empty($node->media)) { |
if ($type == 'node' && !empty($node->media) && user_access('view attached media')) { |
| 118 |
$links = array(); |
$links = array(); |
| 119 |
foreach ($node->media as $aid => $mid) { |
foreach ($node->media as $aid => $mid) { |
| 120 |
$object = media_attach_load($aid); |
$object = media_attach_load($aid); |