diff --git a/template.php b/template.php index 8693e4e42757f21204816e67a144dc784975bc28..4998bd9134393d4cde25d75543688c8b3629ee2b 100755 --- a/template.php +++ b/template.php @@ -1,15 +1,18 @@ name)) { require_once $include->uri; @@ -31,7 +34,7 @@ function bootstrap_theme(&$existing, $type, $theme, $path) { // If we are auto-rebuilding the theme registry, warn about the feature. if ( // Only display for site config admins. - function_exists('user_access') && user_access('administer site configuration') + isset($GLOBALS['user']) && function_exists('user_access') && user_access('administer site configuration') && theme_get_setting('bootstrap_rebuild_registry') // Always display in the admin section, otherwise limit to three per hour. && (arg(0) == 'admin' || flood_is_allowed($GLOBALS['theme'] . '_rebuild_registry_warning', 3))