[drupal-devel] [bug] $site redundant in theme('page')

robertDouglass drupal-devel at drupal.org
Sat Jul 30 15:36:37 UTC 2005

Issue status update for 
Post a follow up: 

 Project:      Drupal
 Version:      cvs
 Component:    theme system
 Category:     bug reports
 Priority:     normal
 Assigned to:  robertDouglass
 Reported by:  robertDouglass
 Updated by:   robertDouglass
 Status:       patch

I still think it is redundant and that the contrib usages should be
updated. In fact, the example that you quote is really a bug because it
overrides the toggle presented by the theme. $site_name is exactly the
same text, but only gets shown if the administrator has toggled it on.
It seems to me like PHPTemplate engine should only offer $site_name,
and if the theme really *wants* to override the toggle, they can still
call variable_get. I think the theme creator in the contrib example was
confused by the redundancy.


Previous comments:

Fri, 29 Jul 2005 17:41:48 +0000 : robertDouglass

Attachment: http://drupal.org/files/issues/phptemplate_redundant_var_patch.txt (815 bytes)

The $site variable is made redundant by $site_name, and is not used.


Fri, 29 Jul 2005 21:24:19 +0000 : Steven

Bluemarine declares $theme as global, but as far as I can tell it
doesn't use it anywhere. I think we can safely remove it?


Sat, 30 Jul 2005 10:07:33 +0000 : robertDouglass

agree. It can be removed.


Sat, 30 Jul 2005 14:05:32 +0000 : Dries

I think it is being used in bluemarine/page.tpl.php:
l(t('edit secondary links'),'admin/themes/settings/' .$theme)

Please double check.


Sat, 30 Jul 2005 14:53:09 +0000 : Steven

This is not present in the core bluemarine, I removed it.


Sat, 30 Jul 2005 15:01:18 +0000 : Steven

Sorry the two issues ($site and $theme) got mixed up. I probably just
pasted in the wrong tab :P.

$site is being used by several contrib modules... $site_name only
applies to the main name when displayed as a logo. Contrib usages show
"Welcome to $site". It's probably a good idea to keep it, no?

More information about the drupal-devel mailing list