ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
class.ilForumPostsTree.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3
11
class
ilForumPostsTree
12
{
13
14
private
$thr_fk
= 0;
15
private
$pos_fk
= 0;
16
private
$parent_pos
= 0;
17
private
$lft
= 0;
18
private
$rgt
= 0;
19
private
$depth
= 0;
20
21
private
$source_thread_id
= 0;
22
private
$target_thread_id
= 0;
23
24
public
function
setDepth
(
$depth
)
25
{
26
$this->depth =
$depth
;
27
}
28
29
public
function
getDepth
()
30
{
31
return
$this->depth
;
32
}
33
34
public
function
setLft
(
$lft
)
35
{
36
$this->lft =
$lft
;
37
}
38
39
public
function
getLft
()
40
{
41
return
$this->lft
;
42
}
43
44
public
function
setParentPos
(
$parent_pos
)
45
{
46
$this->parent_pos =
$parent_pos
;
47
}
48
49
public
function
getParentPos
()
50
{
51
return
$this->parent_pos
;
52
}
53
54
public
function
setPosFk
(
$pos_fk
)
55
{
56
$this->pos_fk =
$pos_fk
;
57
}
58
59
public
function
getPosFk
()
60
{
61
return
$this->pos_fk
;
62
}
63
64
public
function
setRgt
(
$rgt
)
65
{
66
$this->rgt =
$rgt
;
67
}
68
69
public
function
getRgt
()
70
{
71
return
$this->rgt
;
72
}
73
74
public
function
setThrFk
(
$thr_fk
)
75
{
76
$this->thr_fk =
$thr_fk
;
77
}
78
79
public
function
getThrFk
()
80
{
81
return
$this->thr_fk
;
82
}
83
84
public
function
setSourceThreadId
(
$source_thread_id
)
85
{
86
$this->source_thread_id =
$source_thread_id
;
87
}
88
89
public
function
getSourceThreadId
()
90
{
91
return
$this->source_thread_id
;
92
}
93
94
public
function
setTargetThreadId
(
$target_thread_id
)
95
{
96
$this->target_thread_id =
$target_thread_id
;
97
}
98
99
public
function
getTargetThreadId
()
100
{
101
return
$this->target_thread_id
;
102
}
103
104
public
function
__construct
()
105
{
106
107
}
108
109
public
function
mergeParentPos
()
110
{
111
global
$ilDB
;
112
113
$ilDB->update(
'frm_posts_tree'
,
114
array
(
115
'parent_pos'
=>
array
(
'integer'
, $this->
getParentPos
()),
116
'lft'
=>
array
(
'integer'
, $this->
getLft
()),
117
'rgt'
=>
array
(
'integer'
, $this->
getRgt
()),
118
'depth'
=>
array
(
'integer'
, $this->
getDepth
()),
119
'thr_fk'
=>
array
(
'integer'
, $this->
getTargetThreadId
())
120
),
121
array
(
122
'pos_fk'
=>
array
(
'integer'
, $this->
getPosFk
()),
123
'parent_pos'
=>
array
(
'integer'
, 0),
124
'thr_fk'
=>
array
(
'integer'
, $this->
getSourceThreadId
())
125
));
126
}
127
public
function
merge
()
128
{
129
global
$ilDB
;
130
$ilDB->update(
'frm_posts_tree'
,
131
array
(
132
'lft'
=>
array
(
'integer'
, $this->
getLft
()),
133
'rgt'
=>
array
(
'integer'
, $this->
getRgt
()),
134
'depth'
=>
array
(
'integer'
, $this->
getDepth
()),
135
'thr_fk'
=>
array
(
'integer'
, $this->
getTargetThreadId
())
136
),
137
array
(
138
'pos_fk'
=>
array
(
'integer'
, $this->
getPosFk
()),
139
'parent_pos'
=>
array
(
'integer'
, $this->
getParentPos
()),
140
'thr_fk'
=>
array
(
'integer'
, $this->
getSourceThreadId
())
141
));
142
}
143
144
/***
145
* @param integer $root_node_id
146
* @param integer $rgt
147
*/
148
public
static
function
updateTargetRootRgt
($root_node_id,
$rgt
)
149
{
150
global
$ilDB
;
151
152
$ilDB->update(
'frm_posts_tree'
,
153
array
(
154
'rgt'
=>
array
(
'integer'
,
$rgt
)),
155
array
(
156
'parent_pos'
=>
array
(
'integer'
, 0),
157
'pos_fk'
=>
array
(
'integer'
, $root_node_id)
158
));
159
}
160
}
ilForumPostsTree\getThrFk
getThrFk()
Definition:
class.ilForumPostsTree.php:79
ilForumPostsTree\getDepth
getDepth()
Definition:
class.ilForumPostsTree.php:29
ilForumPostsTree\setLft
setLft($lft)
Definition:
class.ilForumPostsTree.php:34
ilForumPostsTree\setDepth
setDepth($depth)
Definition:
class.ilForumPostsTree.php:24
ilForumPostsTree\getRgt
getRgt()
Definition:
class.ilForumPostsTree.php:69
ilForumPostsTree\$rgt
$rgt
Definition:
class.ilForumPostsTree.php:18
ilForumPostsTree\$source_thread_id
$source_thread_id
Definition:
class.ilForumPostsTree.php:21
ilForumPostsTree\updateTargetRootRgt
static updateTargetRootRgt($root_node_id, $rgt)
Definition:
class.ilForumPostsTree.php:148
ilForumPostsTree\mergeParentPos
mergeParentPos()
Definition:
class.ilForumPostsTree.php:109
ilForumPostsTree\$target_thread_id
$target_thread_id
Definition:
class.ilForumPostsTree.php:22
ilForumPostsTree\getPosFk
getPosFk()
Definition:
class.ilForumPostsTree.php:59
ilForumPostsTree\getSourceThreadId
getSourceThreadId()
Definition:
class.ilForumPostsTree.php:89
ilForumPostsTree\$lft
$lft
Definition:
class.ilForumPostsTree.php:17
ilForumPostsTree\getLft
getLft()
Definition:
class.ilForumPostsTree.php:39
ilForumPostsTree\setRgt
setRgt($rgt)
Definition:
class.ilForumPostsTree.php:64
ilForumPostsTree\setPosFk
setPosFk($pos_fk)
Definition:
class.ilForumPostsTree.php:54
ilForumPostsTree\$thr_fk
$thr_fk
Definition:
class.ilForumPostsTree.php:14
ilForumPostsTree\getTargetThreadId
getTargetThreadId()
Definition:
class.ilForumPostsTree.php:99
ilForumPostsTree\getParentPos
getParentPos()
Definition:
class.ilForumPostsTree.php:49
ilForumPostsTree\setTargetThreadId
setTargetThreadId($target_thread_id)
Definition:
class.ilForumPostsTree.php:94
ilForumPostsTree\setParentPos
setParentPos($parent_pos)
Definition:
class.ilForumPostsTree.php:44
ilForumPostsTree\$depth
$depth
Definition:
class.ilForumPostsTree.php:19
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ilForumPostsTree\setThrFk
setThrFk($thr_fk)
Definition:
class.ilForumPostsTree.php:74
ilForumPostsTree\__construct
__construct()
Definition:
class.ilForumPostsTree.php:104
ilForumPostsTree\$pos_fk
$pos_fk
Definition:
class.ilForumPostsTree.php:15
ilForumPostsTree\setSourceThreadId
setSourceThreadId($source_thread_id)
Definition:
class.ilForumPostsTree.php:84
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilForumPostsTree\merge
merge()
Definition:
class.ilForumPostsTree.php:127
php
ilForumPostsTree
Definition:
class.ilForumPostsTree.php:11
ilForumPostsTree\$parent_pos
$parent_pos
Definition:
class.ilForumPostsTree.php:16
Modules
Forum
classes
class.ilForumPostsTree.php
Generated on Fri Jan 17 2025 19:00:59 for ILIAS by
1.8.13 (using
Doxyfile
)