From c77f9f07db1b34d409336509cfb47de8e7b3e075 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 27 Aug 2007 04:36:09 +0000 Subject: [PATCH] Don't include AJAX libraries is AJAX is off across the site --- lib/weblib.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index cdb35ad9b0..3cc3bd94a4 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2322,10 +2322,14 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta = $meta."\n".$metapage; -/// Add the required JavaScript Libraries - $meta .= "\n".require_js(); +/// Add the required JavaScript Libraries for AJAX + if (!empty($CFG->enableajax)) { + $meta .= "\n".require_js(); + } + +/// Set up some navigation variables - if(is_newnav($navigation)){ + if (is_newnav($navigation)){ $home = false; } else { if ($navigation == 'home') { -- 2.39.5