Merge branch 'MDL-33099-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
Dan Poltawski
2014-02-17 14:40:36 +08:00
16 changed files with 30 additions and 83 deletions
-28
View File
@@ -40,34 +40,6 @@ function user_preference_allow_ajax_update($name, $paramtype) {
$USER->ajax_updatable_user_prefs[$name] = $paramtype;
}
/**
* Returns whether ajax is enabled/allowed or not.
* @param array $browsers optional list of alowed browsers, empty means use default list
* @return bool
*/
function ajaxenabled(array $browsers = null) {
global $CFG;
if (!empty($browsers)) {
$valid = false;
foreach ($browsers as $brand => $version) {
if (core_useragent::check_browser_version($brand, $version)) {
$valid = true;
}
}
if (!$valid) {
return false;
}
}
if (!empty($CFG->enableajax)) {
return true;
} else {
return false;
}
}
/**
* Starts capturing output whilst processing an AJAX request.
*
+12
View File
@@ -4266,3 +4266,15 @@ function can_use_html_editor() {
debugging('can_use_html_editor has been deprecated please update your code to assume it returns true.', DEBUG_DEVELOPER);
return true;
}
/**
* Returns whether ajax is enabled/allowed or not.
* @param array $browsers optional list of alowed browsers, empty means use default list
* @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.', DEBUG_DEVELOPER);
return true;
}
+1
View File
@@ -17,6 +17,7 @@ DEPRECATIONS:
* The constants FRONTPAGECOURSELIST, FRONTPAGETOPICONLY & FRONTPAGECOURSELIMIT have been removed.
* Various cm_info methods have been deprecated in favour of their read-only properties (get_url(), get_content(), get_extra_classes(),
get_on_click(), get_custom_data(), get_after_link, get_after_edit_icons)
* The ajaxenabled function has been deprecated and always returns true. All code should be fully functional in Javascript.
YUI:
* The lightbox attribute for moodle-core-notification-dialogue has been