1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[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
This commit is contained in:
Joas Schilling
2013-04-30 10:37:59 +02:00
parent 8a4260703f
commit 4810c61fd7
3 changed files with 10 additions and 16 deletions

View File

@@ -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);
}

View File

@@ -595,13 +595,16 @@ abstract class phpbb_tree_nestedset implements phpbb_tree_interface
}
/**
* Get base information of parent items
* Get basic data of all parent items
*
* Basic data is defined in the $item_basic_data property.
* Data is cached in the item_parents column in the item table
*
* @inheritdoc
* @param array $item The item to get the path from
* @return array Array of items (containing basic columns from the item table)
* ID => Item data
*/
public function get_parent_data(array $item)
public function get_path_basic_data(array $item)
{
$parents = array();
if ((int) $item[$this->column_parent_id])