From 4910106afc70e9864cc5cf7ad6723154e30fd8de Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 24 Nov 2004 22:33:11 +0000 Subject: [PATCH] Following up on my long standing threat to remove internal_link hook. Templates make it unnecessary, it is inefficient, and the only plugin using it requires a source patch to the same code anyway. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8397 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 1 + doc/plugin.txt | 1 - functions/page_header.php | 17 +++++++++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5c49977..66bbc3b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -161,6 +161,7 @@ Version 1.5.1 -- CVS - Handle a reload of the signout page gracefully: do not present an error about having to be logged in to be able to sign out. Fixes #1070069. - Prevent & being eaten in set_url_var, thanks Marcin Orlowski. Fixes #1053725. + - Removed internal_link hook Version 1.5.0 -------------------- diff --git a/doc/plugin.txt b/doc/plugin.txt index 5aa907a8..bb143818 100644 --- a/doc/plugin.txt +++ b/doc/plugin.txt @@ -294,7 +294,6 @@ but may be out of date soon thereafter. You never know. ;-) decode_body functions/mime.php hook_func generic_header functions/page_header.php do_hook menuline functions/page_header.php do_hook - internal_link functions/page_header.php hook_func loading_prefs include/load_prefs.php do_hook addrbook_html_search_below src/addrbook_search_html.php do_hook addressbook_bottom src/addressbook.php do_hook diff --git a/functions/page_header.php b/functions/page_header.php index 9561f0f4..8fed43b9 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -96,9 +96,18 @@ function makeInternalLink($path, $text, $target='') { if ($target != '') { $target = " target=\"$target\""; } - $hooktext = do_hook_function('internal_link',$text); - if ($hooktext != '') - $text = $hooktext; + + // This is an inefficient hook and is only used by + // one plugin that still needs to patch this code, + // plus if we are templat-izing SM, visual hooks + // are not needed. However, I am leaving the code + // here just in case we find a good (non-visual?) + // use for the internal_link hook. + // + //$hooktext = do_hook_function('internal_link',$text); + //if ($hooktext != '') + // $text = $hooktext; + return ''.$text.''; } @@ -431,4 +440,4 @@ function compose_Header($color, $mailbox) { echo "\n\n"; } -?> \ No newline at end of file +?> -- 2.25.1