diff options
author | Marc Alexander <admin@m-a-styles.de> | 2018-01-07 11:02:31 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2018-01-07 11:02:31 +0100 |
commit | 1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99 (patch) | |
tree | d70037f3f547a71e4a6b87bcddb31aeb19db7328 /phpBB/phpbb/tree/nestedset.php | |
parent | 3ae016954212e90032a10d1427c34a4ff9d9637c (diff) | |
parent | 182a96f2738316adcb292816a9ac8af0e0cb5866 (diff) | |
download | forums-1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99.tar forums-1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99.tar.gz forums-1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99.tar.bz2 forums-1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99.tar.xz forums-1b4bad6583ffa8a7ba8a1e7f5f9c29c5654bba99.zip |
Merge remote-tracking branch 'upstream/3.2.x' into prep-release-3.2.2
Diffstat (limited to 'phpBB/phpbb/tree/nestedset.php')
-rw-r--r-- | phpBB/phpbb/tree/nestedset.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/phpbb/tree/nestedset.php b/phpBB/phpbb/tree/nestedset.php index 7149513fd9..eadd2b3273 100644 --- a/phpBB/phpbb/tree/nestedset.php +++ b/phpBB/phpbb/tree/nestedset.php @@ -533,7 +533,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface $row = $this->db->sql_fetchrow($result); $this->db->sql_freeresult($result); - $diff = ' + ' . ($row[$this->column_right_id] - (int) $item[$this->column_left_id] + 1); + $diff = ' + ' . ((int) $row[$this->column_right_id] - (int) $item[$this->column_left_id] + 1); } $sql = 'UPDATE ' . $this->table_name . ' @@ -706,7 +706,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface { $acquired_new_lock = $this->acquire_lock(); - $diff = sizeof($subset_items) * 2; + $diff = count($subset_items) * 2; $sql_subset_items = $this->db->sql_in_set($this->column_item_id, $subset_items); $sql_not_subset_items = $this->db->sql_in_set($this->column_item_id, $subset_items, true); @@ -746,7 +746,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface */ protected function prepare_adding_subset(array $subset_items, array $new_parent) { - $diff = sizeof($subset_items) * 2; + $diff = count($subset_items) * 2; $sql_not_subset_items = $this->db->sql_in_set($this->column_item_id, $subset_items, true); $set_left_id = $this->db->sql_case($this->column_left_id . ' > ' . (int) $new_parent[$this->column_right_id], $this->column_left_id . ' + ' . $diff, $this->column_left_id); |