diff options
-rw-r--r-- | engine/lib/actions.php | 2 | ||||
-rw-r--r-- | engine/lib/configuration.php | 2 | ||||
-rw-r--r-- | engine/lib/database.php | 2 | ||||
-rw-r--r-- | engine/lib/elgglib.php | 10 | ||||
-rw-r--r-- | engine/lib/entities.php | 6 | ||||
-rw-r--r-- | engine/lib/export.php | 2 | ||||
-rw-r--r-- | engine/lib/filestore.php | 2 | ||||
-rw-r--r-- | engine/lib/install.php | 2 | ||||
-rw-r--r-- | engine/lib/languages.php | 2 | ||||
-rw-r--r-- | engine/lib/notification.php | 2 | ||||
-rw-r--r-- | engine/lib/objects.php | 4 | ||||
-rw-r--r-- | engine/lib/sessions.php | 6 | ||||
-rw-r--r-- | engine/lib/sites.php | 6 | ||||
-rw-r--r-- | engine/lib/system_log.php | 2 | ||||
-rw-r--r-- | engine/lib/users.php | 6 | ||||
-rw-r--r-- | engine/start.php | 4 | ||||
-rw-r--r-- | mod/apitest/start.php | 2 | ||||
-rw-r--r-- | mod/dashboard/start.php | 2 | ||||
-rw-r--r-- | mod/exporttest/start.php | 2 | ||||
-rw-r--r-- | mod/guidbrowser/start.php | 2 | ||||
-rw-r--r-- | mod/profile/start.php | 2 |
21 files changed, 35 insertions, 35 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php index ee8c1b09d..07b52933d 100644 --- a/engine/lib/actions.php +++ b/engine/lib/actions.php @@ -105,6 +105,6 @@ // Register some actions ***************************************************
- register_event_handler("init","system","actions_init");
+ register_elgg_event_handler("init","system","actions_init");
?>
\ No newline at end of file diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php index bc243eb33..04257de42 100644 --- a/engine/lib/configuration.php +++ b/engine/lib/configuration.php @@ -138,6 +138,6 @@ * Register config_init
*/
- register_event_handler('boot','system','configuration_init',10);
+ register_elgg_event_handler('boot','system','configuration_init',10);
?>
\ No newline at end of file diff --git a/engine/lib/database.php b/engine/lib/database.php index 69f6f4c0f..75778f1e1 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -414,6 +414,6 @@ // Stuff for initialisation
- register_event_handler('boot','system','init_db',0);
+ register_elgg_event_handler('boot','system','init_db',0);
?>
\ No newline at end of file diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index eb4cd97df..e7e3abc12 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -620,13 +620,13 @@ *
* You can then simply register them using the following function. Optionally, this can be called with a priority nominally from 0 to 1000, where functions with lower priority values are called first (note that priorities CANNOT be negative):
*
- * register_event_handler($event, $object_type, $function_name [, $priority = 500]);
+ * register_elgg_event_handler($event, $object_type, $function_name [, $priority = 500]);
*
* Note that you can also use 'all' in place of both the event and object type.
*
* To trigger an event properly, you should always use:
*
- * trigger_event($event, $object_type [, $object]);
+ * trigger_elgg_event($event, $object_type [, $object]);
*
* Where $object is optional, and represents the $object_type the event concerns. This will return true if successful, or false if it fails.
*
@@ -713,7 +713,7 @@ * @param string $function The function name
* @return true|false Depending on success
*/
- function register_event_handler($event, $object_type, $function, $priority = 500) {
+ function register_elgg_event_handler($event, $object_type, $function, $priority = 500) {
return events($event, $object_type, $function, $priority);
}
@@ -725,7 +725,7 @@ * @param string $function The function name
* @return true|false Depending on success
*/
- function trigger_event($event, $object_type, $object = null) {
+ function trigger_elgg_event($event, $object_type, $object = null) {
$return = true;
$return1 = events($event, $object_type, "", null, true, $object);
if (!is_null($return1)) $return = $return1;
@@ -1147,7 +1147,7 @@ { // Test to see if we can actually execute code by calling any other functions - if (trigger_event("execute_privileged_codeblock", "all")) + if (trigger_elgg_event("execute_privileged_codeblock", "all")) { // Execute $result = null; diff --git a/engine/lib/entities.php b/engine/lib/entities.php index ea62da48f..f96a0a6f3 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -881,7 +881,7 @@ $entity = get_entity($guid); if ($entity->canEdit()) { - if (trigger_event('update',$entity->type,$entity)) { + if (trigger_elgg_event('update',$entity->type,$entity)) { $ret = update_data("UPDATE {$CONFIG->dbprefix}entities set owner_guid='$owner_guid', access_id='$access_id', time_updated='$time' WHERE guid=$guid"); // Handle cases where there was no error BUT no rows were updated! @@ -1086,7 +1086,7 @@ $guid = (int)$guid; if ($entity = get_entity($guid)) { - if (trigger_event('delete',$entity->type,$entity)) { + if (trigger_elgg_event('delete',$entity->type,$entity)) { if ($entity->canEdit()) { $entity->clearMetadata(); $entity->clearAnnotations(); @@ -1345,6 +1345,6 @@ register_plugin_hook("export", "all", "export_entity_plugin_hook", 0); /** Register init system event **/ - register_event_handler('init','system','entities_init'); + register_elgg_event_handler('init','system','entities_init'); ?> diff --git a/engine/lib/export.php b/engine/lib/export.php index 14a3ff76b..22ab3f07a 100644 --- a/engine/lib/export.php +++ b/engine/lib/export.php @@ -222,5 +222,5 @@ } // Register a startup event - register_event_handler('init','system','export_init',100); + register_elgg_event_handler('init','system','export_init',100); ?>
\ No newline at end of file diff --git a/engine/lib/filestore.php b/engine/lib/filestore.php index f9e8a306a..33f5cbaaf 100644 --- a/engine/lib/filestore.php +++ b/engine/lib/filestore.php @@ -721,5 +721,5 @@ } // Register a startup event - register_event_handler('init','system','filestore_init',100); + register_elgg_event_handler('init','system','filestore_init',100); ?>
\ No newline at end of file diff --git a/engine/lib/install.php b/engine/lib/install.php index a4d2f5933..d60a8ae34 100644 --- a/engine/lib/install.php +++ b/engine/lib/install.php @@ -50,6 +50,6 @@ register_action("systemsettings/install",true);
}
- register_event_handler("boot","system","install_init");
+ register_elgg_event_handler("boot","system","install_init");
?>
\ No newline at end of file diff --git a/engine/lib/languages.php b/engine/lib/languages.php index 696d3eff4..652a22961 100644 --- a/engine/lib/languages.php +++ b/engine/lib/languages.php @@ -99,6 +99,6 @@ }
}
- register_event_handler("boot","system","init_translations",5);
+ register_elgg_event_handler("boot","system","init_translations",5);
?>
\ No newline at end of file diff --git a/engine/lib/notification.php b/engine/lib/notification.php index d79266f51..8df897394 100644 --- a/engine/lib/notification.php +++ b/engine/lib/notification.php @@ -125,5 +125,5 @@ } // Register a startup event - register_event_handler('init','system','notification_init',0); + register_elgg_event_handler('init','system','notification_init',0); ?>
\ No newline at end of file diff --git a/engine/lib/objects.php b/engine/lib/objects.php index 925cf6c88..1914744a6 100644 --- a/engine/lib/objects.php +++ b/engine/lib/objects.php @@ -241,7 +241,7 @@ { // Update succeeded, continue $entity = get_entity($guid); - if (trigger_event('update',$entity->type,$entity)) { + if (trigger_elgg_event('update',$entity->type,$entity)) { return true; } else { delete_entity($guid); @@ -254,7 +254,7 @@ $result = insert_data("INSERT into {$CONFIG->dbprefix}objects_entity (guid, title, description) values ($guid, '$title','$description')"); if ($result!==false) { $entity = get_entity($guid); - if (trigger_event('create',$entity->type,$entity)) { + if (trigger_elgg_event('create',$entity->type,$entity)) { return true; } else { delete_entity($guid); diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php index 7a5edec2c..cb7f8c2ba 100644 --- a/engine/lib/sessions.php +++ b/engine/lib/sessions.php @@ -78,7 +78,7 @@ if (($persistent))
setcookie("elggperm", $code, (time()+(86400 * 30)),"/");
- if (!$user->save() || !trigger_event('login','user',$user)) {
+ if (!$user->save() || !trigger_elgg_event('login','user',$user)) {
unset($_SESSION['username']);
unset($_SESSION['name']);
unset($_SESSION['code']);
@@ -102,7 +102,7 @@ global $CONFIG;
if (isset($_SESSION['user'])) {
- if (!trigger_event('logout','user',$_SESSION['user'])) return false;
+ if (!trigger_elgg_event('logout','user',$_SESSION['user'])) return false;
$_SESSION['user']->code = "";
$_SESSION['user']->save();
}
@@ -188,7 +188,7 @@ if (!isloggedin()) forward();
}
- register_event_handler("boot","system","session_init",1);
+ register_elgg_event_handler("boot","system","session_init",1);
?>
\ No newline at end of file diff --git a/engine/lib/sites.php b/engine/lib/sites.php index f4478445a..5f496a58d 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -274,7 +274,7 @@ { // Update succeeded, continue $entity = get_entity($guid); - if (trigger_event('update',$entity->type,$entity)) { + if (trigger_elgg_event('update',$entity->type,$entity)) { return true; } else { delete_entity($guid); @@ -286,7 +286,7 @@ $result = insert_data("INSERT into {$CONFIG->dbprefix}sites_entity (guid, name, description, url) values ($guid, '$name','$description','$url')"); if ($result!==false) { $entity = get_entity($guid); - if (trigger_event('create',$entity->type,$entity)) { + if (trigger_elgg_event('create',$entity->type,$entity)) { return true; } else { delete_entity($guid); @@ -517,6 +517,6 @@ // Register event handlers
- register_event_handler('boot','system','sites_init',2);
+ register_elgg_event_handler('boot','system','sites_init',2);
?>
\ No newline at end of file diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php index a9d0bfb38..d35453c68 100644 --- a/engine/lib/system_log.php +++ b/engine/lib/system_log.php @@ -131,6 +131,6 @@ } /** Register event to listen to all events **/ - register_event_handler('all','all','system_log_listener', 400);
+ register_elgg_event_handler('all','all','system_log_listener', 400);
?>
\ No newline at end of file diff --git a/engine/lib/users.php b/engine/lib/users.php index cece8b91d..fd5011c9e 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -369,7 +369,7 @@ { // Update succeeded, continue $entity = get_entity($guid); - if (trigger_event('update',$entity->type,$entity)) { + if (trigger_elgg_event('update',$entity->type,$entity)) { return true; } else { delete_entity($guid); @@ -381,7 +381,7 @@ $result = insert_data("INSERT into {$CONFIG->dbprefix}users_entity (guid, name, username, password, email, language, code) values ($guid, '$name', '$username', '$password', '$email', '$language', '$code')"); if ($result!==false) { $entity = get_entity($guid); - if (trigger_event('create',$entity->type,$entity)) { + if (trigger_elgg_event('create',$entity->type,$entity)) { return true; } else { delete_entity($guid); @@ -731,6 +731,6 @@ //register actions *************************************************************
- register_event_handler('init','system','users_init',0);
+ register_elgg_event_handler('init','system','users_init',0);
?>
\ No newline at end of file diff --git a/engine/start.php b/engine/start.php index 5312d5093..214ed725b 100644 --- a/engine/start.php +++ b/engine/start.php @@ -122,7 +122,7 @@ // Autodetect some default configuration settings
set_default_config();
// Trigger events
- trigger_event('boot', 'system');
+ trigger_elgg_event('boot', 'system');
// Forward if we haven't been installed
if ((!is_installed() || !is_db_installed()) && !substr_count($_SERVER["PHP_SELF"],"install.php")) {
header("Location: install.php");
@@ -134,7 +134,7 @@ !substr_count($_SERVER["PHP_SELF"],"setup.php") &&
!$lightmode) {
// If default settings haven't been installed, forward to the default settings page
- trigger_event('init', 'system');
+ trigger_elgg_event('init', 'system');
if (!datalist_get('default_settings')) {
//forward("setup.php");
}
diff --git a/mod/apitest/start.php b/mod/apitest/start.php index 947da115c..d03c7925a 100644 --- a/mod/apitest/start.php +++ b/mod/apitest/start.php @@ -247,5 +247,5 @@ END; } // Make sure test_init is called on initialisation - register_event_handler('init','system','apitest_init'); + register_elgg_event_handler('init','system','apitest_init'); ?>
\ No newline at end of file diff --git a/mod/dashboard/start.php b/mod/dashboard/start.php index 8eb99a37c..48d82175f 100644 --- a/mod/dashboard/start.php +++ b/mod/dashboard/start.php @@ -17,6 +17,6 @@ }
// Make sure test_init is called on initialisation
- register_event_handler('init','system','dashboard_init');
+ register_elgg_event_handler('init','system','dashboard_init');
?>
\ No newline at end of file diff --git a/mod/exporttest/start.php b/mod/exporttest/start.php index 7563b0cd9..3e1817878 100644 --- a/mod/exporttest/start.php +++ b/mod/exporttest/start.php @@ -20,5 +20,5 @@ // Make sure test_init is called on initialisation - register_event_handler('init','system','exporttest_init'); + register_elgg_event_handler('init','system','exporttest_init'); ?>
\ No newline at end of file diff --git a/mod/guidbrowser/start.php b/mod/guidbrowser/start.php index 602fa5741..a75711c1d 100644 --- a/mod/guidbrowser/start.php +++ b/mod/guidbrowser/start.php @@ -56,5 +56,5 @@ // Make sure test_init is called on initialisation - register_event_handler('init','system','guidbrowser_init'); + register_elgg_event_handler('init','system','guidbrowser_init'); ?>
\ No newline at end of file diff --git a/mod/profile/start.php b/mod/profile/start.php index 0c0272bbe..ddf136425 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -109,7 +109,7 @@ }
// Make sure the profile initialisation function is called on initialisation
- register_event_handler('init','system','profile_init',1);
+ register_elgg_event_handler('init','system','profile_init',1);
// Register actions
global $CONFIG;
|