1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-24 09:30:34 +01:00

[ticket/15339] Free sql results in migration module tool

PHPBB3-15339
This commit is contained in:
Oliver Schramm 2017-11-17 01:31:31 +01:00
parent aa961991fd
commit 719a49d387

View File

@ -273,8 +273,9 @@ class module implements \phpbb\db\migration\tool\tool_interface
AND parent_id = " . (int) $parent . "
AND module_langname = '" . $this->db->sql_escape($before_langname) . "'"
. (($before_mode) ? " AND module_mode = '" . $this->db->sql_escape($before_mode) . "'" : '');
$this->db->sql_query($sql);
$result = $this->db->sql_query($sql);
$to_left = (int) $this->db->sql_fetchfield('left_id');
$this->db->sql_freeresult($result);
$sql = 'UPDATE ' . $this->modules_table . "
SET left_id = left_id + 2, right_id = right_id + 2
@ -309,8 +310,9 @@ class module implements \phpbb\db\migration\tool\tool_interface
AND parent_id = " . (int) $parent . "
AND module_langname = '" . $this->db->sql_escape($after_langname) . "'"
. (($after_mode) ? " AND module_mode = '" . $this->db->sql_escape($after_mode) . "'" : '');
$this->db->sql_query($sql);
$result = $this->db->sql_query($sql);
$to_right = (int) $this->db->sql_fetchfield('right_id');
$this->db->sql_freeresult($result);
$sql = 'UPDATE ' . $this->modules_table . "
SET left_id = left_id + 2, right_id = right_id + 2