diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 852b0e72ab1..2d81c77c422 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -4375,3 +4375,17 @@ function count_login_failures($mode, $username, $lastlogin) { } return NULL; } + +/** + * Returns whether ajax is enabled/allowed or not. + * This function is deprecated and always returns true. + * + * @param array $unused - not used any more. + * @return bool + * @deprecated since 2.7 MDL-33099 - please do not use this function any more. + * @todo MDL-44088 This will be removed in Moodle 2.9. + */ +function ajaxenabled(array $browsers = null) { + debugging('ajaxenabled() is deprecated - please update your code to assume it returns true.', DEBUG_DEVELOPER); + return true; +} diff --git a/tag/edit.php b/tag/edit.php index 005dfdc79d6..e9449f7c925 100644 --- a/tag/edit.php +++ b/tag/edit.php @@ -162,8 +162,7 @@ if (!empty($errorstring)) { $tagform->display(); -if (ajaxenabled()) { - $PAGE->requires->js('/tag/tag.js'); - $PAGE->requires->js_function_call('init_tag_autocomplete', null, true); -} +$PAGE->requires->js('/tag/tag.js'); +$PAGE->requires->js_function_call('init_tag_autocomplete', null, true); + echo $OUTPUT->footer();