From 4de4fdfe864ed05f530680ac9c1d072f2bdb3527 Mon Sep 17 00:00:00 2001 From: gregb_cc Date: Fri, 27 Jun 2003 22:25:31 +0000 Subject: [PATCH] performance increase for make_editing_buttons, value for 'str' stored in static variable --- course/lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/course/lib.php b/course/lib.php index 131282982c0..c77ca9e29d3 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1149,9 +1149,10 @@ function move_module($cm, $move) { } } -function make_editing_buttons($moduleid, $absolute=false, $visible=true, $str=NULL) { +function make_editing_buttons($moduleid, $absolute=false, $visible=true) { global $CFG, $THEME; + static $str = ''; if (empty($str)) { $str->delete = get_string("delete"); $str->moveup = get_string("moveup");