From c50651f7fb348ec2dc6e29cdf462f22d64045002 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 9 Dec 2008 07:16:10 +0000 Subject: - Patch #340557 by Dave Reid: use static caching in drupal_is_front_page(). --- modules/simpletest/tests/system_test.module | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/simpletest/tests') diff --git a/modules/simpletest/tests/system_test.module b/modules/simpletest/tests/system_test.module index fadc05e3c..dfe25bbf8 100644 --- a/modules/simpletest/tests/system_test.module +++ b/modules/simpletest/tests/system_test.module @@ -149,6 +149,16 @@ function system_test_boot() { watchdog('system_test', 'hook_boot'); } +/** + * Implementation of hook_init(). + */ +function system_test_init() { + // Used by FrontPageTestCase to get the results of drupal_is_front_page(). + if (variable_get('front_page_output', 0) && drupal_is_front_page()) { + drupal_set_message(t('On front page.')); + } +} + /** * Implementation of hook_exit(). */ -- cgit v1.2.3