diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-04-18 22:17:05 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-04-18 22:17:05 +0200 |
commit | 5cb7342dd3b7abd2366abbdb7c0ba11d3d27f922 (patch) | |
tree | a9b3bfb0e81a75d93369aac5be6a1f565bb382da /phpBB/includes | |
parent | b28180be1d911364e5c00e3e97e8dac9be6f3d6f (diff) | |
download | forums-5cb7342dd3b7abd2366abbdb7c0ba11d3d27f922.tar forums-5cb7342dd3b7abd2366abbdb7c0ba11d3d27f922.tar.gz forums-5cb7342dd3b7abd2366abbdb7c0ba11d3d27f922.tar.bz2 forums-5cb7342dd3b7abd2366abbdb7c0ba11d3d27f922.tar.xz forums-5cb7342dd3b7abd2366abbdb7c0ba11d3d27f922.zip |
[ticket/11495] Remove acquire locks from forum implementation
PHPBB3-11495
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/nestedset/forum.php | 65 |
1 files changed, 2 insertions, 63 deletions
diff --git a/phpBB/includes/nestedset/forum.php b/phpBB/includes/nestedset/forum.php index e723e3bf18..54a26772d5 100644 --- a/phpBB/includes/nestedset/forum.php +++ b/phpBB/includes/nestedset/forum.php @@ -17,15 +17,6 @@ if (!defined('IN_PHPBB')) class phpbb_nestedset_forum extends phpbb_nestedset_base { - /** @var phpbb_db_driver */ - protected $db; - - /** @var phpbb_lock_db */ - protected $lock; - - /** @var String */ - protected $table_name; - /** * Column names in the table * @var String @@ -34,12 +25,10 @@ class phpbb_nestedset_forum extends phpbb_nestedset_base protected $column_item_parents = 'forum_parents'; /** - * Additional SQL restrictions - * Allows to have multiple nestedsets in one table - * Columns must be prefixed with %1$s + * Prefix for the language keys returned by exceptions * @var String */ - protected $sql_where = ''; + protected $message_prefix = 'FORUM_NESTEDSET_'; /** * List of item properties to be cached in $item_parents @@ -60,54 +49,4 @@ class phpbb_nestedset_forum extends phpbb_nestedset_base $this->lock = $lock; $this->table_name = $table_name; } - - /** - * @inheritdoc - */ - public function move_children(array $current_parent, array $new_parent) - { - while (!$this->lock->acquire()) - { - // Retry after 0.2 seconds - usleep(200 * 1000); - } - - try - { - $return = parent::move_children($current_parent, $new_parent); - } - catch (phpbb_nestedset_exception $e) - { - $this->lock->release(); - throw new phpbb_nestedset_exception('FORUM_NESTEDSET_' . $e->getMessage()); - } - $this->lock->release(); - - return $return; - } - - /** - * @inheritdoc - */ - public function set_parent(array $item, array $new_parent) - { - while (!$this->lock->acquire()) - { - // Retry after 0.2 seconds - usleep(200 * 1000); - } - - try - { - $return = parent::set_parent($item, $new_parent); - } - catch (phpbb_nestedset_exception $e) - { - $this->lock->release(); - throw new phpbb_nestedset_exception('FORUM_NESTEDSET_' . $e->getMessage()); - } - $this->lock->release(); - - return $return; - } } |