summaryrefslogtreecommitdiff
path: root/core/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'core/hooks')
-rw-r--r--core/hooks/init_gallery.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/hooks/init_gallery.php b/core/hooks/init_gallery.php
index ce32fcfc..2c36795a 100644
--- a/core/hooks/init_gallery.php
+++ b/core/hooks/init_gallery.php
@@ -18,16 +18,19 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
+// If var/database.php doesn't exist, then we assume that the Gallery is not properly installed
+// and send users to the installer.
if (!file_exists(VARPATH . "database.php")) {
url::redirect(url::abs_file("installer"));
}
Event::add("system.ready", array("I18n", "instance"));
-Event::add("system.post_routing", array("theme", "load_themes"));
Event::add("system.ready", array("module", "load_modules"));
+Event::add("system.ready", array("core", "ready"));
+Event::add("system.post_routing", array("theme", "load_themes"));
Event::add("system.post_routing", array("url", "parse_url"));
-Event::add("system.shutdown", array("module", "shutdown"));
Event::add("system.post_routing", array("core", "maintenance_mode"));
+Event::add("system.shutdown", array("core", "shutdown"));
// Override the cookie if we have a session id in the URL.
// @todo This should probably be an event callback