From ce45515e7d99a7c94204970497331217d6c1b2fa Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 16 Sep 2003 06:35:37 +0000 Subject: [PATCH] Err ... whose idea was it to cache the strings in forum_make_mail_post? :-) --- mod/forum/lib.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 4626a76c03..699b26a5ca 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -950,14 +950,6 @@ function forum_make_mail_post(&$post, $user, $touser, $course, // returns the HTML in a string. This is designed for sending via HTML email. global $THEME, $CFG; - static $stredit, $strdelete, $strreply, $strparent; - - if (empty($stredit)) { - $stredit = get_string("edit", "forum"); - $strdelete = get_string("delete", "forum"); - $strreply = get_string("reply", "forum"); - $strparent = get_string("parent", "forum"); - } $output = ""; @@ -1002,18 +994,19 @@ function forum_make_mail_post(&$post, $user, $touser, $course, $output .= "

"; if ($post->parent) { - $output .= "wwwroot/mod/forum/discuss.php?d=$post->discussion&parent=$post->parent\">$strparent | "; + $output .= "wwwroot/mod/forum/discuss.php?d=$post->discussion&parent=$post->parent\">".get_string("parent", "forum")." | "; } + $age = time() - $post->created; if ($ownpost) { - $output .= "wwwroot/mod/forum/post.php?delete=$post->id\">$strdelete"; + $output .= "wwwroot/mod/forum/post.php?delete=$post->id\">".get_string("delete", "forum").""; if ($reply) { - $output .= " | wwwroot/mod/forum/post.php?reply=$post->id\">$strreply"; + $output .= " | wwwroot/mod/forum/post.php?reply=$post->id\">".get_string("reply", "forum").""; } $output .= "  "; } else { if ($reply) { - $output .= "wwwroot/mod/forum/post.php?reply=$post->id\">$strreply  "; + $output .= "wwwroot/mod/forum/post.php?reply=$post->id\">".get_string("reply", "forum")."  "; } } -- 2.39.5