From af3443b176e7be7d18ea7f724f5b8c88ab7b73cf Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 20 Nov 2008 15:14:08 +0000 Subject: No need to trigger the init event on upgrade. git-svn-id: https://code.elgg.org/elgg/trunk@2478 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/start.php | 3 ++- mod/groups/topicposts.php | 1 + upgrade.php | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/start.php b/engine/start.php index 7a69760db..e6bfa3078 100644 --- a/engine/start.php +++ b/engine/start.php @@ -175,7 +175,8 @@ // Trigger events if (!substr_count($_SERVER["PHP_SELF"],"install.php") && !substr_count($_SERVER["PHP_SELF"],"setup.php") && - !$lightmode) { + !$lightmode + && !(defined('upgrading') && upgrading == 'upgrading')) { // If default settings haven't been installed, forward to the default settings page trigger_elgg_event('init', 'system'); //if (!datalist_get('default_settings')) { diff --git a/mod/groups/topicposts.php b/mod/groups/topicposts.php index 6a732ca52..d16b33148 100644 --- a/mod/groups/topicposts.php +++ b/mod/groups/topicposts.php @@ -19,6 +19,7 @@ // get the entity from id $topic = get_entity(get_input('topic')); + if (!$topic) forward(); // Display them $area2 = elgg_view("forum/viewposts", array('entity' => $topic)); diff --git a/upgrade.php b/upgrade.php index 52477aea1..f81864251 100644 --- a/upgrade.php +++ b/upgrade.php @@ -13,7 +13,8 @@ * @link http://elgg.org/ */ - // Include elgg engine + // Include elgg engine + define('upgrading','upgrading'); require_once(dirname(__FILE__) . "/engine/start.php"); if (get_input('upgrade') == 'upgrade') { -- cgit v1.2.3