From 28b6fe73d0cb1ba4f6081bc03ffbda29e42ffbb0 Mon Sep 17 00:00:00 2001
From: David Mudrak <david.mudrak@gmail.com>
Date: Mon, 7 Jun 2010 08:41:47 +0000
Subject: [PATCH] NOBUG Fixing an information on deprecated require_js()

Wherever possible, developers should use $PAGE->requires->js_module()
and wrap their JS code as a module in M namespace.
---
 lib/deprecatedlib.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php
index 830b0b8c1d6..f23c3d9d70b 100644
--- a/lib/deprecatedlib.php
+++ b/lib/deprecatedlib.php
@@ -1702,7 +1702,7 @@ function use_html_editor($name='', $editorhidebuttons='', $id='') {
 
 /**
  * The old method that was used to include JavaScript libraries.
- * Please use $PAGE->requires->js() or $PAGE->requires->yui2_lib() instead.
+ * Please use $PAGE->requires->js_module() instead.
  *
  * @param mixed $lib The library or libraries to load (a string or array of strings)
  *      There are three way to specify the library:
@@ -1722,8 +1722,7 @@ function require_js($lib) {
         return;
     }
 
-    debugging('Call to deprecated function require_js. Please use $PAGE->requires->js() ' .
-              'or $PAGE->requires->yui2_lib() instead.', DEBUG_DEVELOPER);
+    debugging('Call to deprecated function require_js. Please use $PAGE->requires->js_module() instead.', DEBUG_DEVELOPER);
 
     if (strpos($lib, 'yui_') === 0) {
         $PAGE->requires->yui2_lib(substr($lib, 4));