No edit, delete links on list of teasers attached to another node
shaisachs - June 7, 2009 - 12:03
| Project: | Admin links |
| Version: | 6.x-1.6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
If you have a node which, in full page mode, displays a list of teasers to other nodes, the edit and delete links will not appear on those teasers. A classic example is organic groups; suppose I have a blog for each organic group, and on my group's home page, I have teasers for the first ten blog posts. The edit/delete links won't appear for those blog posts. This is due, I believe, to a minor issue in the admin_links_link function, which this patch should fix. I've tested it in my own environment, and it works fine.
| Attachment | Size |
|---|---|
| admin_links.module.patch | 539 bytes |

#1
As a part of #503636: Copy the node/%/* local tasks instead of manually providing links I implemented the following function:
<?php/**
* Checks if the current page is a node page.
*
* @param
* An optional node ID to check if the current page is a specific node.
* @return
* TRUE if this is a node page, or FALSE otherwise.
*/
function admin_links_is_node_page($nid = FALSE) {
static $is_node_page = array();
if (!isset($is_node_page[$nid])) {
$is_node_page[$nid] = preg_match('%node/' . ($nid ? $nid : '\d+') . '%', $_GET['q']);
}
return $is_node_page[$nid];
}
?>
This should fix this issue. Once the 6.x-1.x-dev build is repackaged, please give it a try and let me know if it fixes this problem!
#2
Automatically closed -- issue fixed for 2 weeks with no activity.