http://api.drupal.org/api/HEAD/function/phptemplate_page
http://api.drupal.org/api/HEAD/function/theme_page

theme_page() calls theme_closure(); directly
phptemplate_page() calls theme('closure')

one of both does it the false way...

CommentFileSizeAuthor
#3 theme_closure_0.patch532 bytesflk
#1 theme_closure.patch.txt980 bytesTobias Maier
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tobias Maier’s picture

Priority: Normal » Minor
Status: Active » Needs review
FileSize
980 bytes

since I cant see which one is the right one and it looks like that theme_closure() only contains logic
I replaced theme('closure') with theme_closure()

tenrapid’s picture

I think theme('closure') is right. It's a regular theme function and thus should be possible to override. The base function in theme.inc simply collects and concatenates the output of the closure hooks at the moment but one would like to process this further (putting it in a table, ...).

flk’s picture

FileSize
532 bytes

I would have to agree with tenrapid.
theme('closure') seems more right to me then theme_closure(). also it seems more in uniform with the other theme calls.
also wouldnt it be better to bring themes.inc inline with phptemplate.engine rather than the other way round?

btw whilst reading the api.d.o and found this:

For example, to retrieve the HTML that is output by theme_page($output), a module should call theme('page',$output).

so in theory theme.inc should be calling theme('closure') rather than theme_closure()...but then again it could be said theme.inc is not a module.

Anyways i made a patch to change theme_closure() to theme('closure') in theme.inc

flk’s picture

change status

Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

killes@www.drop.org’s picture

also to 4.7

Anonymous’s picture

Status: Fixed » Closed (fixed)