diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-14 21:00:53 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-14 21:00:53 -0400 |
commit | 8163cd38fe4d963bfc9087f7fedc2461e655f43e (patch) | |
tree | 88a0139a58728050ab6f1e99024feabc59533307 /engine | |
parent | 0a54cabfe75fb0261fff12ee48cd868bfa8f06fb (diff) | |
download | elgg-8163cd38fe4d963bfc9087f7fedc2461e655f43e.tar.gz elgg-8163cd38fe4d963bfc9087f7fedc2461e655f43e.tar.bz2 |
Fixes #4705 validate view type
Diffstat (limited to 'engine')
-rw-r--r-- | engine/start.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engine/start.php b/engine/start.php index 5f4bded45..55b8ffa5b 100644 --- a/engine/start.php +++ b/engine/start.php @@ -100,6 +100,15 @@ 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. +$view_type = elgg_get_viewtype(); +if (!elgg_is_valid_view_type($view_type)) { + elgg_set_viewtype('default'); +} + // @todo deprecate as plugins can use 'init', 'system' event elgg_trigger_event('plugins_boot', 'system'); |