Merge branch 'w32_MDL-40815_m26_deprevent' of https://github.com/skodak/moodle

Conflicts:
	lib/deprecatedlib.php
This commit is contained in:
Sam Hemelryk
2013-08-06 15:38:18 +12:00
4 changed files with 25 additions and 8 deletions
+1 -1
View File
@@ -482,7 +482,7 @@ abstract class base implements \IteratorAggregate {
$this->dispatched = true;
if ($legacyeventname = $this->get_legacy_eventname()) {
events_trigger($legacyeventname, $this->get_legacy_eventdata());
events_trigger_legacy($legacyeventname, $this->get_legacy_eventdata());
}
}
+15
View File
@@ -56,6 +56,21 @@ function css_minify_css($files) {
return core_minify::css_files($files);
}
/**
* Function to call all event handlers when triggering an event
*
* @deprecated since 2.6
*
* @param string $eventname name of the event
* @param mixed $eventdata event data object
* @return int number of failed events
*/
function events_trigger($eventname, $eventdata) {
// TODO: uncomment after conversion of all events in standard distribution
// debugging('events_trigger() is deprecated, please use new events instead', DEBUG_DEVELOPER);
return events_trigger_legacy($eventname, $eventdata);
}
/**
* List all core subsystems and their location
*
+4 -7
View File
@@ -473,18 +473,15 @@ function events_cron($eventname='') {
return $processed;
}
/**
* Function to call all event handlers when triggering an event
* Do not call directly, this is intended to be used from new event base only.
*
* @access public Part of the public API.
* @category event
* @private
* @param string $eventname name of the event
* @param string $eventdata event data object. This should contain any data the
* event wants to share and should really be documented by the event publisher
* @param mixed $eventdata event data object
* @return int number of failed events
*/
function events_trigger($eventname, $eventdata) {
function events_trigger_legacy($eventname, $eventdata) {
global $CFG, $USER, $DB;
$failedcount = 0; // number of failed events.
+5
View File
@@ -95,6 +95,11 @@ YUI:
* exception
* ajaxexception
Event triggering and event handlers:
* All existing events and event handlers should be replaced by new
event classes and matching new event observers.
* See http://docs.moodle.org/dev/Event_2 for more information.
=== 2.5.1 ===
* New get_course() function for use when obtaining the course record from database. Will