All of my nodes are displaying "refresh" and "remove items" in the local tasks. These are feedapi tasks that should only appear for feedapi-enabled node types.

CommentFileSizeAuthor
#1 feedapi_access_op.patch698 bytesmustafau

Comments

mustafau’s picture

StatusFileSize
new698 bytes

Attached patch fixes this issue by calling feedapi_enabled() inside feedapi_access_op().

Additionaly I think that feedapi_access_op() should be renamed to _feedapi_op_access().

Anonymous’s picture

Status: Active » Needs work

This patch causes the local tasks to disappear on every node, including those nodes here they should appear.

additionally, i am given this notice:

notice: Trying to get property of non-object in /home/bangpound/drupal6-site/modules/feedapi/feedapi.module on line 96.
Anonymous’s picture

I'm seeing that instead of a node's nid, the whole node object is being passed. This function should be:

function feedapi_access_op($node) {
  if (!feedapi_enabled($node->type)) {
    return FALSE;
  }
  global $user;
  $own_feed = $node->uid == $user->uid && user_access('edit own '. $node->type .' content') ? TRUE : FALSE;
  return user_access('administer feedapi') || $own_feed;
}
aron novak’s picture

Status: Needs work » Fixed

Thanks, it's committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.