Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The admin title configured while creating a new custom block is not loaded into the $block
object while displaying the block. This information might be useful while theming the block and there should be no side-effect in including it, thus this should be backportable too.
Comment | File | Size | Author |
---|---|---|---|
#15 | block-1387668-15.patch | 756 bytes | plach |
#6 | block-1387668-6.patch | 776 bytes | plach |
#1 | block-1387668-1.patch | 815 bytes | plach |
Comments
Comment #1
plachComment #2
plachComment #3
joachim CreditAttribution: joachim commentedThe query should remain as a static query, as it's faster than dynamic.
-2 days to next Drupal core point release.
Comment #4
plachI thought the guidelines were about dbtng-ing all queries, when possible. Is there some reference documentation saying that we should make exceptions for performance reasons?
Comment #5
joachim CreditAttribution: joachim commentedThat's what everyone says... but here's a comment with a link to a post by Crell about it: http://drupal.org/node/310072#comment-4389610
Comment #6
plachThanks! One could argue that the query should be alterable and as such needing dbtng-ing anyway, but this would be another issue. Rerolled to leave the static query in place.
Comment #7
plach@joachim:
Anything else?
Comment #8
cweagansUpdating tags per http://drupal.org/node/1517250
Comment #9
plachbump
Comment #10
benjy CreditAttribution: benjy commentedComment #11
plachI think this does not apply to D8 anymore, now that we have custom blocks.
Comment #12
plachComment #13
plach#6: block-1387668-6.patch queued for re-testing.
Comment #15
plachComment #16
peximo CreditAttribution: peximo commentedHi, patch works as described.
Comment #17
David_Rothstein CreditAttribution: David_Rothstein commentedWhy should we tack this on for custom blocks but not any other kind of block? For any block (custom or not), if you need the admin description you can already get it by invoking hook_block_info().
It is also passed through directly to the theme but not sanitized anywhere. It may be inviting trouble to give themers $block->subject (which is sanitized for inclusion in HTML) along with $block->info (which is not).