aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/start.php3
-rw-r--r--mod/groups/topicposts.php1
-rw-r--r--upgrade.php3
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') {