Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
block.module
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
6 Aug 2009 at 11:32 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
figaro commentedDoes the following code actually do anything in your if-statement?:
$visible_regions = system_region_list($theme, REGIONS_VISIBLE)Comment #2
catchNope, but the alternative would be a nested if I think, not keen on either.
Comment #3
figaro commentedThat's my point. If you swap it with
isset($visible_regions[$region])it might just be a tad faster for when the other two conditions fail.Comment #4
catchThat's not possible though, since we need to set $visible_regions in order to do an isset() against it.
Comment #5
figaro commentedI understand your approach now, thanks
Comment #6
moshe weitzman commentedlooks good. this got introduced during some toolbar madness.
Comment #7
catchI'm going to set this back to RTBC, since I don't think it got committed.
Comment #8
dries commentedI think it is slightly cleaner to split that if-test. Can you do a quick re-roll?
Comment #9
catchHere it is with the nested if.
Comment #10
moshe weitzman commentedComment #11
dries commentedCommitted to CVS HEAD. Thanks.