diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-01-21 10:44:47 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-01-21 10:44:47 -0500 |
commit | a2cfbdeb100324090ffe19d58aeb71c2def83ac8 (patch) | |
tree | ed6b95ea6f9e21101fc467ffe02caaea3eda5975 /engine/lib/database.php | |
parent | b6284c6e781275e7d545778fb9ae41ba9107bdaa (diff) | |
download | elgg-a2cfbdeb100324090ffe19d58aeb71c2def83ac8.tar.gz elgg-a2cfbdeb100324090ffe19d58aeb71c2def83ac8.tar.bz2 |
cleans up the boot process
Diffstat (limited to 'engine/lib/database.php')
-rw-r--r-- | engine/lib/database.php | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php index 444bb7cc4..cc2b99f6a 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -189,22 +189,6 @@ function db_delayedexecution_shutdown_hook() { } /** - * Registers shutdown functions for database profiling and delayed queries. - * - * @note Database connections are established upon first call to database. - * - * @return true - * @elgg_event_handler boot system - * @access private - */ -function init_db() { - register_shutdown_function('db_delayedexecution_shutdown_hook'); - register_shutdown_function('db_profiling_shutdown_hook'); - - return true; -} - -/** * Returns (if required, also creates) a database link resource. * * Database link resources are stored in the {@link $dblink} global. These @@ -757,6 +741,13 @@ function sanitize_int($int, $signed = true) { } /** - * @elgg_register_event boot system init_db + * Registers shutdown functions for database profiling and delayed queries. + * + * @access private */ -elgg_register_event_handler('boot', 'system', 'init_db', 0); +function init_db() { + register_shutdown_function('db_delayedexecution_shutdown_hook'); + register_shutdown_function('db_profiling_shutdown_hook'); +} + +elgg_register_event_handler('init', 'system', 'init_db'); |