From b334a2ce0fe3ae196da9686028667c430eb411d1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 25 Apr 2013 17:04:37 +0200 Subject: [ticket/11495] Move classes to tree/ as they all implement a tree PHPBB3-11495 --- phpBB/includes/tree/interface.php | 171 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 phpBB/includes/tree/interface.php (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php new file mode 100644 index 0000000000..fd10bd357f --- /dev/null +++ b/phpBB/includes/tree/interface.php @@ -0,0 +1,171 @@ + down, > 0 => up + * @return bool True if the item was moved + */ + public function move($item_id, $delta); + + /** + * Move an item down by 1 + * + * @param int $item_id The item to be moved + * @return bool True if the item was moved + */ + public function move_down($item_id); + + /** + * Move an item up by 1 + * + * @param int $item_id The item to be moved + * @return bool True if the item was moved + */ + public function move_up($item_id); + + /** + * Moves all children of one item to another item + * + * If the new parent already has children, the new children are appended + * to the list. + * + * @param int $current_parent_id The current parent item + * @param int $new_parent_id The new parent item + * @return bool True if any items where moved + */ + public function move_children($current_parent_id, $new_parent_id); + + /** + * Change parent item + * + * Moves the item to the bottom of the new parent's list of children + * + * @param int $item_id The item to be moved + * @param int $new_parent_id The new parent item + * @return bool True if the parent was set successfully + */ + public function change_parent($item, $new_parent_id); + + /** + * Get children and parent branch of the item + * + * @param int $item_id The item id to get the parents/children from + * @param bool $order_desc Order the items descending (most outer parent first) + * @param bool $include_item Should the item (matching the given item id) be included in the list aswell + * @return array Array of items (containing all columns from the item table) + * ID => Item data + */ + public function get_full_branch_data($item_id, $order_desc, $include_item); + + /** + * Get parent branch of the item + * + * @param int $item_id The item id to get the parents from + * @param bool $order_desc Order the items descending (most outer parent first) + * @param bool $include_item Should the item (matching the given item id) be included in the list aswell + * @return array Array of items (containing all columns from the item table) + * ID => Item data + */ + public function get_parent_branch_data($item_id, $order_desc, $include_item); + + /** + * Get children branch of the item + * + * @param int $item_id The item id to get the children from + * @param bool $order_desc Order the items descending (most outer parent first) + * @param bool $include_item Should the item (matching the given item id) be included in the list aswell + * @return array Array of items (containing all columns from the item table) + * ID => Item data + */ + public function get_children_branch_data($item_id, $order_desc, $include_item); + + /** + * Get base information of parent items + * + * @param array $item The item to get the branch from + * @return array Array of items (containing basic columns from the item table) + * ID => Item data + */ + public function get_parent_data(array $item); + + /** + * Regenerate left/right ids from parent/child relationship + * + * This method regenerates the left/right ids for the nested set based on + * the parent/child relations. This function executes three queries per + * item, so it should only be called, when the set has one of the following + * problems: + * - The set has a duplicated value inside the left/right id chain + * - The set has a missing value inside the left/right id chain + * - The set has items that do not have a left/right is set + * + * When regenerating the items, the items are sorted by parent id and their + * current left id, so the current child/parent relationships are kept + * and running the function on a working set will not change any orders. + * + * @param int $new_id First left_id to be used (should start with 1) + * @param int $parent_id parent_id of the current set (default = 0) + * @param bool $reset_ids Should we reset all left_id/right_id on the first call? + * @return int $new_id The next left_id/right_id that should be used + */ + public function regenerate_left_right_ids($new_id, $parent_id = 0, $reset_ids = false); +} -- cgit v1.2.1 From 73d873548400f18b02167ef49195a50a11970c24 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 25 Apr 2013 17:19:52 +0200 Subject: [ticket/11495] Remove fixing function from tree interface The fixing function is implementation dependent. PHPBB3-11495 --- phpBB/includes/tree/interface.php | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index fd10bd357f..babd0ad03d 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -18,7 +18,7 @@ if (!defined('IN_PHPBB')) interface phpbb_tree_interface { /** - * Insert an item into the nested set (also insert the rows into the table) + * Insert an item into the tree (also insert the rows into the table) * * @param array $item The item to be added * @return array Array with item data as set in the database @@ -26,7 +26,7 @@ interface phpbb_tree_interface public function insert(array $additional_data); /** - * Add an item at the end of the nested set + * Add an item at the end of the tree * * @param array $item The item to be added * @return bool True if the item was added @@ -34,9 +34,9 @@ interface phpbb_tree_interface public function add(array $item); /** - * Remove an item from the nested set + * Remove an item from the tree * - * Also removes all subitems from the nested set + * Also removes all subitems from the tree * * @param int $item_id The item to be deleted * @return array Item ids that have been removed @@ -44,9 +44,9 @@ interface phpbb_tree_interface public function remove($item); /** - * Delete an item from the nested set (also deletes the rows form the table) + * Delete an item from the tree * - * Also deletes all subitems from the nested set + * Also deletes all subitems from the tree * * @param int $item_id The item to be deleted * @return array Item ids that have been deleted @@ -146,26 +146,4 @@ interface phpbb_tree_interface * ID => Item data */ public function get_parent_data(array $item); - - /** - * Regenerate left/right ids from parent/child relationship - * - * This method regenerates the left/right ids for the nested set based on - * the parent/child relations. This function executes three queries per - * item, so it should only be called, when the set has one of the following - * problems: - * - The set has a duplicated value inside the left/right id chain - * - The set has a missing value inside the left/right id chain - * - The set has items that do not have a left/right is set - * - * When regenerating the items, the items are sorted by parent id and their - * current left id, so the current child/parent relationships are kept - * and running the function on a working set will not change any orders. - * - * @param int $new_id First left_id to be used (should start with 1) - * @param int $parent_id parent_id of the current set (default = 0) - * @param bool $reset_ids Should we reset all left_id/right_id on the first call? - * @return int $new_id The next left_id/right_id that should be used - */ - public function regenerate_left_right_ids($new_id, $parent_id = 0, $reset_ids = false); } -- cgit v1.2.1 From abfb7bc51fa254edd6274e39625eb8a4edec32be Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 25 Apr 2013 17:24:18 +0200 Subject: [ticket/11495] Remove add/remove from the interface PHPBB3-11495 --- phpBB/includes/tree/interface.php | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index babd0ad03d..3f03363151 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -18,31 +18,13 @@ if (!defined('IN_PHPBB')) interface phpbb_tree_interface { /** - * Insert an item into the tree (also insert the rows into the table) + * Insert an item into the tree * * @param array $item The item to be added * @return array Array with item data as set in the database */ public function insert(array $additional_data); - /** - * Add an item at the end of the tree - * - * @param array $item The item to be added - * @return bool True if the item was added - */ - public function add(array $item); - - /** - * Remove an item from the tree - * - * Also removes all subitems from the tree - * - * @param int $item_id The item to be deleted - * @return array Item ids that have been removed - */ - public function remove($item); - /** * Delete an item from the tree * -- cgit v1.2.1 From baff4287e5a7142b7af41e56c29b064bb56fd7fb Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 25 Apr 2013 22:39:24 +0200 Subject: [ticket/11495] Fix comments and package docs PHPBB3-11495 --- phpBB/includes/tree/interface.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index 3f03363151..4e22e322f3 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -1,7 +1,7 @@ Date: Fri, 26 Apr 2013 08:42:44 +0200 Subject: [ticket/11495] Fix doc blocks once more PHPBB3-11495 --- phpBB/includes/tree/interface.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index 4e22e322f3..ed0ccca3f1 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -18,7 +18,7 @@ if (!defined('IN_PHPBB')) interface phpbb_tree_interface { /** - * Insert an item into the tree (also insert the rows into the table) + * Inserts an item into the database table and into the tree. * * @param array $item The item to be added * @return array Array with item data as set in the database @@ -26,9 +26,9 @@ interface phpbb_tree_interface public function insert(array $additional_data); /** - * Delete an item from the tree (also deletes the rows form the table) + * Delete an item from the tree and from the database table * - * Also deletes all subitems from the tree + * Also deletes all subitems from the tree and from the database table * * @param int $item_id The item to be deleted * @return array Item ids that have been deleted -- cgit v1.2.1 From 8a4260703fa76bb92f144b527b3d55289568db74 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Apr 2013 10:32:01 +0200 Subject: [ticket/11495] Fix some docs and replace branch with other terms PHPBB3-11495 --- phpBB/includes/tree/interface.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index ed0ccca3f1..1b462768a0 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -28,12 +28,12 @@ interface phpbb_tree_interface /** * Delete an item from the tree and from the database table * - * Also deletes all subitems from the tree and from the database table + * Also deletes the subtree from the tree and from the database table * * @param int $item_id The item to be deleted * @return array Item ids that have been deleted */ - public function delete($item); + public function delete($item_id); /** * Move an item by a given delta @@ -79,16 +79,16 @@ interface phpbb_tree_interface /** * Change parent item * - * Moves the item to the bottom of the new parent's list of children + * Moves the item to the bottom of the new parent's subtree * * @param int $item_id The item to be moved * @param int $new_parent_id The new parent item * @return bool True if the parent was set successfully */ - public function change_parent($item, $new_parent_id); + public function change_parent($item_id, $new_parent_id); /** - * Get children and parent branch of the item + * Get all items that are either a parent or part of the subtree of the item * * @param int $item_id The item id to get the parents/children from * @param bool $order_desc Order the items descending (most outer parent first) @@ -96,10 +96,10 @@ interface phpbb_tree_interface * @return array Array of items (containing all columns from the item table) * ID => Item data */ - public function get_full_branch_data($item_id, $order_desc, $include_item); + public function get_path_and_subtree_data($item_id, $order_desc, $include_item); /** - * Get parent branch of the item + * Get all parent items of the item * * @param int $item_id The item id to get the parents from * @param bool $order_desc Order the items descending (most outer parent first) @@ -107,10 +107,10 @@ interface phpbb_tree_interface * @return array Array of items (containing all columns from the item table) * ID => Item data */ - public function get_parent_branch_data($item_id, $order_desc, $include_item); + public function get_path_data($item_id, $order_desc, $include_item); /** - * Get children branch of the item + * Get all items of the item's subtree * * @param int $item_id The item id to get the children from * @param bool $order_desc Order the items descending (most outer parent first) @@ -118,7 +118,7 @@ interface phpbb_tree_interface * @return array Array of items (containing all columns from the item table) * ID => Item data */ - public function get_children_branch_data($item_id, $order_desc, $include_item); + public function get_subtree_data($item_id, $order_desc, $include_item); /** * Get base information of parent items -- cgit v1.2.1 From 4810c61fd7b912ea2914b99f7db502b6f503068f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Apr 2013 10:37:59 +0200 Subject: [ticket/11495] Remove get_parent_data from interface and rename it The method is implementation specific and has no use, apart from cache, that is not covered by get_path_data(). PHPBB3-11495 --- phpBB/includes/tree/interface.php | 9 --------- 1 file changed, 9 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index 1b462768a0..bd8181beb2 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -119,13 +119,4 @@ interface phpbb_tree_interface * ID => Item data */ public function get_subtree_data($item_id, $order_desc, $include_item); - - /** - * Get base information of parent items - * - * @param array $item The item to get the branch from - * @return array Array of items (containing basic columns from the item table) - * ID => Item data - */ - public function get_parent_data(array $item); } -- cgit v1.2.1 From 67f2edae170576104e619ffb38672cabf44e20fa Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Apr 2013 13:54:50 +0200 Subject: [ticket/11495] Use descendants and ancestors instead of parents/children PHPBB3-11495 --- phpBB/includes/tree/interface.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index bd8181beb2..e09fcea4fa 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -65,9 +65,9 @@ interface phpbb_tree_interface public function move_up($item_id); /** - * Moves all children of one item to another item + * Moves all descendants of one item to another item * - * If the new parent already has children, the new children are appended + * If the new parent already has descendants, the new descendants are appended * to the list. * * @param int $current_parent_id The current parent item @@ -88,35 +88,35 @@ interface phpbb_tree_interface public function change_parent($item_id, $new_parent_id); /** - * Get all items that are either a parent or part of the subtree of the item + * Get all items that are either an ancestors or descendants of the item * - * @param int $item_id The item id to get the parents/children from - * @param bool $order_desc Order the items descending (most outer parent first) + * @param int $item_id The item to get the ancestors/descendants from + * @param bool $order_asc Order the items ascending (most outer ancestor first) * @param bool $include_item Should the item (matching the given item id) be included in the list aswell * @return array Array of items (containing all columns from the item table) * ID => Item data */ - public function get_path_and_subtree_data($item_id, $order_desc, $include_item); + public function get_path_and_subtree_data($item_id, $order_asc, $include_item); /** - * Get all parent items of the item + * Get all ancestors items of the item * - * @param int $item_id The item id to get the parents from - * @param bool $order_desc Order the items descending (most outer parent first) + * @param int $item_id The item id to get the ancestors from + * @param bool $order_asc Order the items ascending (most outer ancestor first) * @param bool $include_item Should the item (matching the given item id) be included in the list aswell * @return array Array of items (containing all columns from the item table) * ID => Item data */ - public function get_path_data($item_id, $order_desc, $include_item); + public function get_path_data($item_id, $order_asc, $include_item); /** - * Get all items of the item's subtree + * Get all descendants of the item * - * @param int $item_id The item id to get the children from - * @param bool $order_desc Order the items descending (most outer parent first) + * @param int $item_id The item id to get the descendants from + * @param bool $order_asc Order the items ascending * @param bool $include_item Should the item (matching the given item id) be included in the list aswell * @return array Array of items (containing all columns from the item table) * ID => Item data */ - public function get_subtree_data($item_id, $order_desc, $include_item); + public function get_subtree_data($item_id, $order_asc, $include_item); } -- cgit v1.2.1 From 87e8e60d3c09c96a4495dda748673fb8b9078a3e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Apr 2013 14:12:45 +0200 Subject: [ticket/11495] Correctly distinguish between children and descendants PHPBB3-11495 --- phpBB/includes/tree/interface.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index e09fcea4fa..5e43478e22 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -65,9 +65,9 @@ interface phpbb_tree_interface public function move_up($item_id); /** - * Moves all descendants of one item to another item + * Moves all children of one item to another item * - * If the new parent already has descendants, the new descendants are appended + * If the new parent already has children, the new children are appended * to the list. * * @param int $current_parent_id The current parent item @@ -79,7 +79,7 @@ interface phpbb_tree_interface /** * Change parent item * - * Moves the item to the bottom of the new parent's subtree + * Moves the item to the bottom of the new parent's list of children * * @param int $item_id The item to be moved * @param int $new_parent_id The new parent item @@ -88,7 +88,7 @@ interface phpbb_tree_interface public function change_parent($item_id, $new_parent_id); /** - * Get all items that are either an ancestors or descendants of the item + * Get all items that are either ancestors or descendants of the item * * @param int $item_id The item to get the ancestors/descendants from * @param bool $order_asc Order the items ascending (most outer ancestor first) -- cgit v1.2.1 From 863d0c7687cc926dfda0ddd20b34e7942748fb2e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Apr 2013 14:36:26 +0200 Subject: [ticket/11495] Fix some more comments and the package tag PHPBB3-11495 --- phpBB/includes/tree/interface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index 5e43478e22..9bd633a5eb 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -99,7 +99,7 @@ interface phpbb_tree_interface public function get_path_and_subtree_data($item_id, $order_asc, $include_item); /** - * Get all ancestors items of the item + * Get all ancestors of the item * * @param int $item_id The item id to get the ancestors from * @param bool $order_asc Order the items ascending (most outer ancestor first) -- cgit v1.2.1 From 98e6207c35910bf9761433e62ca5fe5af3459873 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Apr 2013 18:13:32 +0200 Subject: [ticket/11495] Fix "as well" typo and remove brackets PHPBB3-11495 --- phpBB/includes/tree/interface.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index 9bd633a5eb..546e00ed06 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -92,7 +92,7 @@ interface phpbb_tree_interface * * @param int $item_id The item to get the ancestors/descendants from * @param bool $order_asc Order the items ascending (most outer ancestor first) - * @param bool $include_item Should the item (matching the given item id) be included in the list aswell + * @param bool $include_item Should the item matching the given item id be included in the list as well * @return array Array of items (containing all columns from the item table) * ID => Item data */ @@ -103,7 +103,7 @@ interface phpbb_tree_interface * * @param int $item_id The item id to get the ancestors from * @param bool $order_asc Order the items ascending (most outer ancestor first) - * @param bool $include_item Should the item (matching the given item id) be included in the list aswell + * @param bool $include_item Should the item matching the given item id be included in the list as well * @return array Array of items (containing all columns from the item table) * ID => Item data */ @@ -114,7 +114,7 @@ interface phpbb_tree_interface * * @param int $item_id The item id to get the descendants from * @param bool $order_asc Order the items ascending - * @param bool $include_item Should the item (matching the given item id) be included in the list aswell + * @param bool $include_item Should the item matching the given item id be included in the list as well * @return array Array of items (containing all columns from the item table) * ID => Item data */ -- cgit v1.2.1 From 2f54a63b0fb998c84730e21a3af4150281c22cab Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Apr 2013 18:24:54 +0200 Subject: [ticket/11495] Fix more grammar issues in doc blocks PHPBB3-11495 --- phpBB/includes/tree/interface.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index 546e00ed06..2eb40b066c 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -90,8 +90,8 @@ interface phpbb_tree_interface /** * Get all items that are either ancestors or descendants of the item * - * @param int $item_id The item to get the ancestors/descendants from - * @param bool $order_asc Order the items ascending (most outer ancestor first) + * @param int $item_id The item id the ancestors/descendants should be retrieved from + * @param bool $order_asc Order the items ascendingly (most outer ancestor first) * @param bool $include_item Should the item matching the given item id be included in the list as well * @return array Array of items (containing all columns from the item table) * ID => Item data @@ -99,10 +99,10 @@ interface phpbb_tree_interface public function get_path_and_subtree_data($item_id, $order_asc, $include_item); /** - * Get all ancestors of the item + * Get all of the item's ancestors * - * @param int $item_id The item id to get the ancestors from - * @param bool $order_asc Order the items ascending (most outer ancestor first) + * @param int $item_id The item id the ancestors should be retrieved from + * @param bool $order_asc Order the items ascendingly (most outer ancestor first) * @param bool $include_item Should the item matching the given item id be included in the list as well * @return array Array of items (containing all columns from the item table) * ID => Item data @@ -110,10 +110,10 @@ interface phpbb_tree_interface public function get_path_data($item_id, $order_asc, $include_item); /** - * Get all descendants of the item + * Get all of the item's descendants * - * @param int $item_id The item id to get the descendants from - * @param bool $order_asc Order the items ascending + * @param int $item_id The item id the descendants should be retrieved from + * @param bool $order_asc Order the items ascendingly * @param bool $include_item Should the item matching the given item id be included in the list as well * @return array Array of items (containing all columns from the item table) * ID => Item data -- cgit v1.2.1 From 6a7378ecbdeea1ad356cbde8a085aa7510c61788 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Apr 2013 18:39:22 +0200 Subject: [ticket/11495] Some more doc changes PHPBB3-11495 --- phpBB/includes/tree/interface.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/tree/interface.php') diff --git a/phpBB/includes/tree/interface.php b/phpBB/includes/tree/interface.php index 2eb40b066c..cc8aab2115 100644 --- a/phpBB/includes/tree/interface.php +++ b/phpBB/includes/tree/interface.php @@ -90,7 +90,7 @@ interface phpbb_tree_interface /** * Get all items that are either ancestors or descendants of the item * - * @param int $item_id The item id the ancestors/descendants should be retrieved from + * @param int $item_id Id of the item to retrieve the ancestors/descendants from * @param bool $order_asc Order the items ascendingly (most outer ancestor first) * @param bool $include_item Should the item matching the given item id be included in the list as well * @return array Array of items (containing all columns from the item table) @@ -101,7 +101,7 @@ interface phpbb_tree_interface /** * Get all of the item's ancestors * - * @param int $item_id The item id the ancestors should be retrieved from + * @param int $item_id Id of the item to retrieve the ancestors from * @param bool $order_asc Order the items ascendingly (most outer ancestor first) * @param bool $include_item Should the item matching the given item id be included in the list as well * @return array Array of items (containing all columns from the item table) @@ -112,7 +112,7 @@ interface phpbb_tree_interface /** * Get all of the item's descendants * - * @param int $item_id The item id the descendants should be retrieved from + * @param int $item_id Id of the item to retrieve the descendants from * @param bool $order_asc Order the items ascendingly * @param bool $include_item Should the item matching the given item id be included in the list as well * @return array Array of items (containing all columns from the item table) -- cgit v1.2.1