diff options
Diffstat (limited to 'themes/engines/phptemplate')
-rw-r--r-- | themes/engines/phptemplate/phptemplate.engine | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/themes/engines/phptemplate/phptemplate.engine b/themes/engines/phptemplate/phptemplate.engine index 48f620838..007c7a735 100644 --- a/themes/engines/phptemplate/phptemplate.engine +++ b/themes/engines/phptemplate/phptemplate.engine @@ -36,6 +36,7 @@ function phptemplate_theme($existing, $type, $theme, $path) { * The name of the theme function being executed. */ function phptemplate_engine_preprocess(&$variables, $hook) { + global $user; static $count = array(); // Create variables so anything which is themed can be zebra striped automatically. @@ -46,4 +47,7 @@ function phptemplate_engine_preprocess(&$variables, $hook) { // Tell all templates where they are located. $variables['directory'] = path_to_theme(); $variables['is_front'] = drupal_is_front_page(); + // Tell all templates by which kind of user they're viewed. + $variables['logged_in'] = ($user->uid > 0); + $variables['is_admin'] = user_access('access administration pages'); } |