Example #1
0
/**
 * Loads plugins
 *
 * @deprecated 1.8 Use elgg_load_plugins()
 *
 * @return bool
 */
function load_plugins()
{
    elgg_deprecated_notice('load_plugins() is deprecated by elgg_load_plugins()', 1.8);
    return _elgg_load_plugins();
}
Example #2
0
if (!is_file("{$engine_dir}/settings.php")) {
    header("Location: install.php");
    exit;
}
if (!is_readable("{$engine_dir}/settings.php")) {
    echo "The Elgg settings file exists but the web server doesn't have read permission to it.";
    exit;
}
require_once "{$engine_dir}/settings.php";
// This will be overridden by the DB value but may be needed before the upgrade script can be run.
$CONFIG->default_limit = 10;
require_once "{$engine_dir}/load.php";
// Connect to database, load language files, load configuration, init session
// Plugins can't use this event because they haven't been loaded yet.
elgg_trigger_event('boot', 'system');
// Load the plugins that are active
_elgg_load_plugins();
// @todo move loading plugins into a single boot function that replaces 'boot', 'system' event
// and then move this code in there.
// This validates the view type - first opportunity to do it is after plugins load.
$viewtype = elgg_get_viewtype();
if (!elgg_is_registered_viewtype($viewtype)) {
    elgg_set_viewtype('default');
}
// @todo deprecate as plugins can use 'init', 'system' event
elgg_trigger_event('plugins_boot', 'system');
// Complete the boot process for both engine and plugins
elgg_trigger_event('init', 'system');
$CONFIG->boot_complete = true;
// System loaded and ready
elgg_trigger_event('ready', 'system');