when (only) feedapi module is activated, 2 blocks get created. one called s and the other one called c.

CommentFileSizeAuthor
#2 feedapi_weird_blocks_fix.diff308 bytesaron novak
#1 201291.patch1.06 KBtomdeb

Comments

tomdeb’s picture

StatusFileSize
new1.06 KB

modified the hook_block implementation to create a incremented block only when there is a need for a block.

Index: feedapi.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feedapi/feedapi.module,v
retrieving revision 1.23.2.101
diff -u -p -r1.23.2.101 feedapi.module
--- feedapi.module 14 Dec 2007 21:16:20 -0000 1.23.2.101
+++ feedapi.module 15 Dec 2007 19:39:16 -0000
@@ -172,9 +172,11 @@ function feedapi_block($op = 'list', $de
$blocks[$type]['info'] = t('FeedAPI: Quick create !preset', array('!preset' => $name));
}
case 'view':
- if (node_access('create', $delta)) {
- $blocks['subject'] = t('Create !preset', array('!preset' => $names[$delta]));
- $blocks['content'] = drupal_get_form('feedapi_simplified_form', $delta);
+ if ((node_access('create', $delta)) && (!empty($names))) {
+ $blocks[] = array(
+ subject => t('Create !preset', array('!preset' => $names[$delta])),
+ content => drupal_get_form('feedapi_simplified_form', $delta),
+ );
}
}
return $blocks;

aron novak’s picture

Assigned: Unassigned » aron novak
Status: Active » Fixed
StatusFileSize
new308 bytes

Thanks for the report. The fix is in the CVS (or you can apply the attached patch).

Anonymous’s picture

Status: Fixed » Closed (fixed)

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