aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/tree/nestedset_forum.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-04-25 17:04:37 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-04-25 17:04:37 +0200
commitb334a2ce0fe3ae196da9686028667c430eb411d1 (patch)
tree2b56c0929cdbb03747614740b5e52429b9354410 /phpBB/includes/tree/nestedset_forum.php
parent94dee77647a7ae1a263632a156b5afc14722ad6a (diff)
downloadforums-b334a2ce0fe3ae196da9686028667c430eb411d1.tar
forums-b334a2ce0fe3ae196da9686028667c430eb411d1.tar.gz
forums-b334a2ce0fe3ae196da9686028667c430eb411d1.tar.bz2
forums-b334a2ce0fe3ae196da9686028667c430eb411d1.tar.xz
forums-b334a2ce0fe3ae196da9686028667c430eb411d1.zip
[ticket/11495] Move classes to tree/ as they all implement a tree
PHPBB3-11495
Diffstat (limited to 'phpBB/includes/tree/nestedset_forum.php')
-rw-r--r--phpBB/includes/tree/nestedset_forum.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/phpBB/includes/tree/nestedset_forum.php b/phpBB/includes/tree/nestedset_forum.php
new file mode 100644
index 0000000000..0a66e68915
--- /dev/null
+++ b/phpBB/includes/tree/nestedset_forum.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* @package Tree - Nested Set Forum
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+class phpbb_tree_nestedset_forum extends phpbb_tree_nestedset
+{
+ /**
+ * Column names in the table
+ * @var string
+ */
+ protected $column_item_id = 'forum_id';
+ protected $column_item_parents = 'forum_parents';
+
+ /**
+ * Prefix for the language keys returned by exceptions
+ * @var string
+ */
+ protected $message_prefix = 'FORUM_NESTEDSET_';
+
+ /**
+ * List of item properties to be cached in $item_parents
+ * @var array
+ */
+ protected $item_basic_data = array('forum_id', 'forum_name', 'forum_type');
+
+ /**
+ * Construct
+ *
+ * @param phpbb_db_driver $db Database connection
+ * @param phpbb_lock_db $lock Lock class used to lock the table when moving forums around
+ * @param string $table_name Table name
+ */
+ public function __construct(phpbb_db_driver $db, phpbb_lock_db $lock, $table_name)
+ {
+ $this->db = $db;
+ $this->lock = $lock;
+ $this->table_name = $table_name;
+ }
+}