From afddcaecf2886cd8f2442a419623bb1447d81aba Mon Sep 17 00:00:00 2001
From: Joas Schilling <nickvergessen@gmx.de>
Date: Wed, 17 Jun 2009 12:15:54 +0000
Subject: [PATCH] fix r9605

Authorised by: acydburn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9606 89ea8834-ac86-4346-8a33-228a782c2dd0
---
 phpBB/docs/CHANGELOG.html          | 2 +-
 phpBB/includes/functions_admin.php | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 3876990045..651cb54fa7 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -114,7 +114,7 @@
 		<li>[Fix] Display user's Jabber address in popup when Jabber functionality is disabled (Bug #20775 - Patch by nickvergessen)</li>
 		<li>[Fix] Exclude forum from active topics option is ignored (Bug #19135 - Patch by nickvergessen)</li>
 		<li>[Fix] Do not display birthdays of banned users (Bug #20625 - Patch by nickvergessen)</li>
-		<li>[Fix] Fix function to recalculate Binary Tree (Bug #41555 - Patch by EXreaction)</li>
+		<li>[Fix] Fix function to recalculate Nested Sets (Bug #41555 - Patch by EXreaction)</li>
 		<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
 		<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
 		<li>[Change] Template engine now permits to a limited extent variable includes.</li>
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index d74bad53e9..52a7017e09 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -17,17 +17,17 @@ if (!defined('IN_PHPBB'))
 }
 
 /**
-* Recalculate Binary Tree
+* Recalculate Nested Sets
 *
 * @param int	$new_id	first left_id (should start with 1)
 * @param string	$pkey	primary key-column (containing the id for the parent_id of the children)
 * @param string	$table	constant or fullname of the table
-* @param int	$parent_id parent_id of the current tree-path (default = 0)
+* @param int	$parent_id parent_id of the current set (default = 0)
 * @param array	$where	contains strings to compare closer on the where statement (additional)
 *
 * @author EXreaction
 */
-function recalc_btree(&$new_id, $pkey, $table, $parent_id = 0, $where = array())
+function recalc_nested_sets(&$new_id, $pkey, $table, $parent_id = 0, $where = array())
 {
 	global $db;
 
@@ -47,7 +47,7 @@ function recalc_btree(&$new_id, $pkey, $table, $parent_id = 0, $where = array())
 		$new_id++;
 
 		// Then we go through any children and update their left/right id's
-		recalc_btree($new_id, $pkey, $table, $row[$pkey], $where);
+		recalc_nested_sets($new_id, $pkey, $table, $row[$pkey], $where);
 
 		// Then we come back and update the right_id for this module
 		if ($row['right_id'] != $new_id)