]> git.mjollnir.org Git - moodle.git/commitdiff
performance increase for make_editing_buttons, value for 'str' stored in static variable
authorgregb_cc <gregb_cc>
Fri, 27 Jun 2003 22:25:31 +0000 (22:25 +0000)
committergregb_cc <gregb_cc>
Fri, 27 Jun 2003 22:25:31 +0000 (22:25 +0000)
course/lib.php

index 131282982c0b975ca151ceb91ce8111eab1409d5..c77ca9e29d395f23aacacb7c0b7c3e4e5f4f3089 100644 (file)
@@ -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");