From 6098703c373cc3ba9793ccf2ab5f792f98f6b516 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 10 Mar 2007 14:31:15 +0000 Subject: [PATCH] #8618 + padding store check git-svn-id: file:///svn/phpbb/trunk@7163 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 4 +++- phpBB/install/index.php | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index cb90b18b9d..f6dd702449 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -302,7 +302,9 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list } else if ($row['left_id'] > $right + 1) { - $padding = $padding_store[$row['parent_id']]; + // Ok, if the $padding_store for this parent is empty there is something wrong. For now we will skip over it. + // @todo digging deep to find out "how" this can happen. + $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : $padding; } $right = $row['right_id']; diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 6d5c8996ae..2baa7c2a2c 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -255,6 +255,9 @@ class module $this->error('No installation modules found', __LINE__, __FILE__); } + // Order to use and count further if modules get assigned to the same position or not having an order + $max_module_order = 1000; + foreach ($module as $row) { // Check any module pre-reqs @@ -262,6 +265,13 @@ class module { } + // Module order not specified or module already assigned at this position? + if (!isset($row['module_order']) || isset($this->module_ary[$row['module_order']])) + { + $row['module_order'] = $max_module_order; + $max_module_order++; + } + $this->module_ary[$row['module_order']]['name'] = $row['module_title']; $this->module_ary[$row['module_order']]['filename'] = $row['module_filename']; $this->module_ary[$row['module_order']]['subs'] = $row['module_subs'];