From c70b19a91bfedbae40304cbfed7b5875c5aae342 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 2 Aug 2007 20:08:53 +0000 Subject: - Patch #163723 by Eaton and Frando: fix default page.tpl markup (and removed some whitespace). --- themes/engines/phptemplate/phptemplate.engine | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'themes/engines/phptemplate') 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'); } -- cgit v1.2.3