]> git.mjollnir.org Git - moodle.git/commitdiff
Don't try to use YUI when AJAX is not enabled
authormoodler <moodler>
Mon, 3 Sep 2007 06:15:58 +0000 (06:15 +0000)
committermoodler <moodler>
Mon, 3 Sep 2007 06:15:58 +0000 (06:15 +0000)
mod/wiki/view.php

index cb922e7a3c7160bb48628d96dcdd6f9a8d04042a..f201cf92c397928c00597ceadcdc4e62dd086543 100644 (file)
 ";
             }
         } else {
-            // OK, the page is now locked to us. Put in the AJAX for keeping the lock
-            $strlockcancelled=get_string('lockcancelled','wiki');
-            $strnojslockwarning=get_string('nojslockwarning','wiki');
-            $intervalms=WIKI_LOCK_RECONFIRM*1000;
-            print "
+            if (ajaxenabled()) {
+                // OK, the page is now locked to us. Put in the AJAX for keeping the lock
+                $strlockcancelled=get_string('lockcancelled','wiki');
+                $strnojslockwarning=get_string('nojslockwarning','wiki');
+                $intervalms=WIKI_LOCK_RECONFIRM*1000;
+                print "
 <script type='text/javascript'>
 var intervalID;
 function handleResponse(o) {
@@ -481,6 +482,7 @@ intervalID=setInterval(function() {
 $strnojslockwarning
 </p></noscript>
 ";
+            }
             // Print editor etc
             print $content;
         }