diff options
| author | Graham Eames <grahamje@users.sourceforge.net> | 2006-05-24 18:49:39 +0000 |
|---|---|---|
| committer | Graham Eames <grahamje@users.sourceforge.net> | 2006-05-24 18:49:39 +0000 |
| commit | a59f59de21aa0abc311cd4601939c08259413d95 (patch) | |
| tree | 08a6b829a1bf17ddacbc2a1b5334eeb98ae5efc1 /phpBB/install | |
| parent | 28a306ae0001e07f467f46ec86ba0c7b2afbd229 (diff) | |
| download | forums-a59f59de21aa0abc311cd4601939c08259413d95.tar forums-a59f59de21aa0abc311cd4601939c08259413d95.tar.gz forums-a59f59de21aa0abc311cd4601939c08259413d95.tar.bz2 forums-a59f59de21aa0abc311cd4601939c08259413d95.tar.xz forums-a59f59de21aa0abc311cd4601939c08259413d95.zip | |
Fix a rather silly bug in the module install code.
Quick access works now :)
git-svn-id: file:///svn/phpbb/trunk@5964 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install')
| -rwxr-xr-x | phpBB/install/install_install.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 6e23cedffe..6d1ce62579 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1207,7 +1207,7 @@ class install_install extends module AND module_id = {$module_data['parent_id']}"; $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); + $row2 = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -1216,13 +1216,13 @@ class install_install extends module $sql = 'UPDATE ' . MODULES_TABLE . " SET left_id = left_id + 2, right_id = right_id + 2 WHERE module_class = '" . $module_class . "' - AND left_id > {$row['right_id']}"; + AND left_id > {$row2['right_id']}"; $db->sql_query($sql); $sql = 'UPDATE ' . MODULES_TABLE . " SET right_id = right_id + 2 WHERE module_class = '" . $module_class . "' - AND {$row['left_id']} BETWEEN left_id AND right_id"; + AND {$row2['left_id']} BETWEEN left_id AND right_id"; $db->sql_query($sql); } else @@ -1230,11 +1230,11 @@ class install_install extends module $sql = 'UPDATE ' . MODULES_TABLE . " SET left_id = left_id + 3, right_id = right_id + 3 WHERE module_class = '" . $module_class . "' - AND left_id > {$row['left_id']}"; + AND left_id > {$row2['left_id']}"; $db->sql_query($sql); } - $module_data['left_id'] = ($categories[$cat_name]['parent_id']) ? $row['right_id'] : $row['left_id'] + 1; - $module_data['right_id'] = ($categories[$cat_name]['parent_id']) ? $row['right_id'] + 1 : $row['left_id'] + 2; + $module_data['left_id'] = ($categories[$cat_name]['parent_id']) ? $row2['right_id'] : $row2['left_id'] + 1; + $module_data['right_id'] = ($categories[$cat_name]['parent_id']) ? $row2['right_id'] + 1 : $row2['left_id'] + 2; $sql = 'INSERT INTO ' . MODULES_TABLE . ' ' . $db->sql_build_array('INSERT', $module_data); $db->sql_query($sql); |
