Don't output block if no body text

moshe weitzman - December 28, 2006 - 15:49
Project:Help Tip
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:Dave Cohen
Status:closed
Description

small patch to stop sending an empty body in hook_block. useful when you have a php helptip that is only supposed to show to certain people (e.g. when viewing own profile page).

AttachmentSize
patch.helptip930 bytes

#1

Dave Cohen - January 4, 2007 - 21:02
Version:4.7.x-1.x-dev» HEAD
Assigned to:moshe weitzman» Dave Cohen

Does that patch really work? Just scanning it, I'm not sure how it makes a difference.

Attached is a patch (against HEAD), that I think does the job better. Any thoughts? Do you really need this for 4.7?

AttachmentSize
105612.diff.txt 1.46 KB

#2

moshe weitzman - January 4, 2007 - 22:45

i was working on a 4.7 site when i had this need ... can't test at the moment. if it looks good to you, i say just commit.

#3

Dave Cohen - January 5, 2007 - 03:26
Status:needs review» fixed

Here's an improved patch I will check in momentarily...

#4

Dave Cohen - January 5, 2007 - 03:27

and the patch I ment to attach.

AttachmentSize
105612.diff_0.txt 1.8 KB

#5

Anonymous - January 19, 2007 - 03:31
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.