From d281e128d4c3149dc353397df2cd2c912b8ea5a7 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 30 Dec 2006 21:24:00 +0000 Subject: [PATCH] Update for new location of global template utilities. Note that templates/util_global.php is already included by the Template class so is ALWAYS available for ALL template files. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12021 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/template/Template.class.php | 2 +- src/addressbook.php | 2 +- src/left_main.php | 2 +- templates/default/compose_attachments.tpl | 5 +---- templates/default/footer.tpl | 5 +---- templates/default/left_main.tpl | 2 -- templates/default/message_list.tpl | 1 - templates/default/printer_friendly_bottom.tpl | 4 +--- templates/default/read_attachments.tpl | 4 +--- templates/default/search_list.tpl | 4 +--- templates/default_advanced/left_main.tpl | 2 -- templates/default_advanced/login.tpl | 2 -- templates/default_advanced/options_highlight_list.tpl | 4 +--- templates/default_advanced/options_order.tpl | 4 +--- 14 files changed, 10 insertions(+), 33 deletions(-) diff --git a/class/template/Template.class.php b/class/template/Template.class.php index 4853ea88..c5b6198f 100644 --- a/class/template/Template.class.php +++ b/class/template/Template.class.php @@ -18,7 +18,7 @@ */ /** load template functions */ -require(SM_PATH . 'functions/template.php'); +require(SM_PATH . 'functions/template/general_util.php'); /** * The SquirrelMail Template class. diff --git a/src/addressbook.php b/src/addressbook.php index 90a9b3b2..24a5bcfc 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -21,7 +21,7 @@ include('../include/init.php'); /* address book functions */ require_once(SM_PATH . 'functions/addressbook.php'); include_once(SM_PATH . 'templates/util_addressbook.php'); -include_once(SM_PATH . 'templates/util_global.php'); +include_once(SM_PATH . 'functions/template/general_util.php'); /* form functions */ require_once(SM_PATH . 'functions/forms.php'); diff --git a/src/left_main.php b/src/left_main.php index d7feb633..99cbcff2 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -20,7 +20,7 @@ require('../include/init.php'); /* SquirrelMail required files. */ require_once(SM_PATH . 'functions/imap_general.php'); require_once(SM_PATH . 'functions/date.php'); -require_once(SM_PATH . 'templates/util_global.php'); +require_once(SM_PATH . 'functions/template/general_util.php'); require_once(SM_PATH . 'templates/util_left_main.php'); /* These constants are used for folder stuff. */ diff --git a/templates/default/compose_attachments.tpl b/templates/default/compose_attachments.tpl index ced5e89b..dd66910a 100644 --- a/templates/default/compose_attachments.tpl +++ b/templates/default/compose_attachments.tpl @@ -13,9 +13,6 @@ * @subpackage templates */ -/** add required includes **/ -include_once(SM_PATH . 'templates/util_global.php'); - /** extract template variables **/ extract($t); @@ -67,4 +64,4 @@ extract($t); } ?> - \ No newline at end of file + diff --git a/templates/default/footer.tpl b/templates/default/footer.tpl index 23a0bc21..c4645e44 100644 --- a/templates/default/footer.tpl +++ b/templates/default/footer.tpl @@ -12,9 +12,6 @@ * @subpackage templates */ -/** add required includes */ -include_once(SM_PATH . 'templates/util_global.php'); - /* retrieve the template vars */ extract($t); @@ -22,4 +19,4 @@ displayErrors(); ?> - \ No newline at end of file + diff --git a/templates/default/left_main.tpl b/templates/default/left_main.tpl index 902473ea..92e6c555 100644 --- a/templates/default/left_main.tpl +++ b/templates/default/left_main.tpl @@ -69,8 +69,6 @@ * @author Steve Brown */ -/** include required files */ -include_once(SM_PATH . 'templates/util_global.php'); /* * Recursively parse the mailbox structure to build the navigation tree. diff --git a/templates/default/message_list.tpl b/templates/default/message_list.tpl index 734265fa..67bffe51 100644 --- a/templates/default/message_list.tpl +++ b/templates/default/message_list.tpl @@ -13,7 +13,6 @@ */ /** add required includes */ -include_once(SM_PATH . 'templates/util_global.php'); include_once(SM_PATH . 'templates/util_message_list.php'); /* retrieve the template vars */ diff --git a/templates/default/printer_friendly_bottom.tpl b/templates/default/printer_friendly_bottom.tpl index 0ba6c7c8..1506f836 100644 --- a/templates/default/printer_friendly_bottom.tpl +++ b/templates/default/printer_friendly_bottom.tpl @@ -37,8 +37,6 @@ * @subpackage templates */ -/** add required includes **/ -include_once(SM_PATH . 'templates/util_global.php'); /** extract template variables **/ extract($t); @@ -110,4 +108,4 @@ if (count($attachments) > 0) { } } ?> - \ No newline at end of file + diff --git a/templates/default/read_attachments.tpl b/templates/default/read_attachments.tpl index f41f7861..9bd648cc 100644 --- a/templates/default/read_attachments.tpl +++ b/templates/default/read_attachments.tpl @@ -30,8 +30,6 @@ * @subpackage templates */ -/** add required includes **/ -include_once(SM_PATH . 'templates/util_global.php'); /** extract template variables **/ extract($t); @@ -99,4 +97,4 @@ if (count($attachments)==0) { - \ No newline at end of file + diff --git a/templates/default/search_list.tpl b/templates/default/search_list.tpl index 4ae0c014..1eca419e 100644 --- a/templates/default/search_list.tpl +++ b/templates/default/search_list.tpl @@ -28,8 +28,6 @@ * @subpackage templates */ -/** add required includes **/ -require_once(SM_PATH . 'templates/util_global.php'); /** extract template variables **/ extract($t); @@ -103,4 +101,4 @@ extract($t); } ?> - \ No newline at end of file + diff --git a/templates/default_advanced/left_main.tpl b/templates/default_advanced/left_main.tpl index 37904af6..c8bad7ab 100644 --- a/templates/default_advanced/left_main.tpl +++ b/templates/default_advanced/left_main.tpl @@ -75,8 +75,6 @@ * @author Steve Brown */ -/** include required files */ -include_once(SM_PATH . 'templates/util_global.php'); /* * Recursively parse the mailbox structure to build the navigation tree. diff --git a/templates/default_advanced/login.tpl b/templates/default_advanced/login.tpl index d4c85a57..6159239a 100644 --- a/templates/default_advanced/login.tpl +++ b/templates/default_advanced/login.tpl @@ -25,8 +25,6 @@ * @subpackage templates */ -// add includes -include_once(SM_PATH . 'templates/util_global.php'); /* retrieve the template vars */ extract($t); diff --git a/templates/default_advanced/options_highlight_list.tpl b/templates/default_advanced/options_highlight_list.tpl index 0fc7d12c..e91535f3 100644 --- a/templates/default_advanced/options_highlight_list.tpl +++ b/templates/default_advanced/options_highlight_list.tpl @@ -24,8 +24,6 @@ * @subpackage templates */ -/** add required includes **/ -require(SM_PATH . 'templates/util_global.php'); /** extract template variables **/ extract($t); @@ -107,4 +105,4 @@ extract($t); - \ No newline at end of file + diff --git a/templates/default_advanced/options_order.tpl b/templates/default_advanced/options_order.tpl index ede9357e..6a5e7689 100644 --- a/templates/default_advanced/options_order.tpl +++ b/templates/default_advanced/options_order.tpl @@ -25,8 +25,6 @@ * @subpackage templates */ -/** add required includes **/ -include(SM_PATH . 'templates/util_global.php'); /** extract template variables **/ extract($t); @@ -92,4 +90,4 @@ extract($t); - \ No newline at end of file + -- 2.25.1