aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/tree/nestedset.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-04-26 00:04:58 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-04-26 00:04:58 +0200
commita9f02d1efa0fc5210a0c113a3cf832b1d1f856ab (patch)
tree93d511600b82079c7dec62e12d62ec8a4717dc89 /phpBB/includes/tree/nestedset.php
parentbaff4287e5a7142b7af41e56c29b064bb56fd7fb (diff)
downloadforums-a9f02d1efa0fc5210a0c113a3cf832b1d1f856ab.tar
forums-a9f02d1efa0fc5210a0c113a3cf832b1d1f856ab.tar.gz
forums-a9f02d1efa0fc5210a0c113a3cf832b1d1f856ab.tar.bz2
forums-a9f02d1efa0fc5210a0c113a3cf832b1d1f856ab.tar.xz
forums-a9f02d1efa0fc5210a0c113a3cf832b1d1f856ab.zip
[ticket/11495] Make method names for add/remove more descriptive
PHPBB3-11495
Diffstat (limited to 'phpBB/includes/tree/nestedset.php')
-rw-r--r--phpBB/includes/tree/nestedset.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/tree/nestedset.php b/phpBB/includes/tree/nestedset.php
index ffe8687e54..ab6a9d6bb4 100644
--- a/phpBB/includes/tree/nestedset.php
+++ b/phpBB/includes/tree/nestedset.php
@@ -111,7 +111,7 @@ abstract class phpbb_tree_nestedset implements phpbb_tree_interface
$item_data[$this->column_item_id] = (int) $this->db->sql_nextid();
- return array_merge($item_data, $this->add($item_data));
+ return array_merge($item_data, $this->add_item_to_nestedset($item_data));
}
/**
@@ -120,7 +120,7 @@ abstract class phpbb_tree_nestedset implements phpbb_tree_interface
* @param array $item The item to be added
* @return bool True if the item was added
*/
- protected function add(array $item)
+ protected function add_item_to_nestedset(array $item)
{
$sql = 'SELECT MAX(' . $this->column_right_id . ') AS ' . $this->column_right_id . '
FROM ' . $this->table_name . '
@@ -152,7 +152,7 @@ abstract class phpbb_tree_nestedset implements phpbb_tree_interface
* @param int $item_id The item to be deleted
* @return array Item ids that have been removed
*/
- protected function remove($item_id)
+ protected function remove_item_from_nestedset($item_id)
{
$items = $this->get_children_branch_data($item_id);
$item_ids = array_keys($items);
@@ -167,7 +167,7 @@ abstract class phpbb_tree_nestedset implements phpbb_tree_interface
*/
public function delete($item_id)
{
- $removed_items = $this->remove($item_id);
+ $removed_items = $this->remove_item_from_nestedset($item_id);
$sql = 'DELETE FROM ' . $this->table_name . '
WHERE ' . $this->db->sql_in_set($this->column_item_id, $removed_items) . '