ILIAS
Release_5_0_x_branch Revision 61816
|
Public Member Functions | |
__construct ($a_id=0, $a_is_moderator=false, $preventImplicitRead=false) | |
Constructor. | |
assignData ($data) | |
insert () | |
Inserts the object data into database. | |
update () | |
Updates an existing topic. | |
reload () | |
Calls the private method read() to load the topic data from database into the object. | |
getFirstPostId () | |
Fetches the primary key of the first post node of the current topic from database and returns it. | |
updateVisits () | |
Updates the visit counter of the current topic. | |
countPosts () | |
Fetches and returns the number of posts for the given user id. | |
countActivePosts () | |
Fetches and returns the number of active posts for the given user id. | |
getFirstPostNode () | |
Fetches and returns an object of the first post in the current topic. | |
getLastPost () | |
Fetches and returns an object of the last post in the current topic. | |
getLastActivePost () | |
Fetches and returns an object of the last active post in the current topic. | |
getAllPosts () | |
getPostTree (ilForumPost $a_post_node) | |
Fetches and returns an array of posts from the post tree, starting with the node object passed by the first paramter. | |
movePosts ($old_obj_id, $old_pk, $new_obj_id, $new_pk) | |
Moves all posts within the current thread to a new forum. | |
getNestedSetPostChildren ($pos_id=null, $expandedNodes=array()) | |
isNotificationEnabled ($a_user_id) | |
Check whether a user's notification about new posts in a thread is enabled (result > 0) or not (result == 0). | |
enableNotification ($a_user_id) | |
Enable a user's notification about new posts in a thread. | |
disableNotification ($a_user_id) | |
Disable a user's notification about new posts in a thread. | |
makeSticky () | |
Sets the current topic sticky. | |
unmakeSticky () | |
Sets the current topic non-sticky. | |
close () | |
Closes the current topic. | |
reopen () | |
Reopens the current topic. | |
getAverageRating () | |
setAverageRating ($average_rating) | |
setId ($a_id) | |
getId () | |
setForumId ($a_forum_id) | |
getForumId () | |
setDisplayUserId ($a_user_id) | |
getDisplayUserId () | |
setUserAlias ($a_user_alias) | |
getUserAlias () | |
setSubject ($a_subject) | |
getSubject () | |
setCreateDate ($a_createdate) | |
getCreateDate () | |
setChangeDate ($a_changedate) | |
getChangeDate () | |
setImportName ($a_import_name) | |
getImportName () | |
setLastPostString ($a_last_post) | |
getLastPostString () | |
setVisits ($a_visits) | |
getVisits () | |
setSticky ($a_sticky) | |
isSticky () | |
setClosed ($a_closed) | |
isClosed () | |
setOrderField ($a_order_field) | |
getOrderField () | |
setModeratorRight ($bool) | |
getModeratorRight () | |
getFrmObjId () | |
setThrAuthorId ($thr_author_id) | |
getThrAuthorId () | |
updateThreadTitle () | |
setNumPosts ($a_num_posts) | |
getNumPosts () | |
setNumNewPosts ($num_new_posts) | |
getNumNewPosts () | |
setNumUnreadPosts ($num_unread_posts) | |
getNumUnreadPosts () | |
setUserNotificationEnabled ($user_notification_enabled) | |
getUserNotificationEnabled () | |
setOrderDirection ($direction) | |
getOrderDirection () | |
getSorting () | |
updateMergedThread () |
Static Public Member Functions | |
static | _lookupTitle ($a_topic_id) |
Looks up the title/subject of a topic/thread. | |
static | lookupForumIdByTopicId ($a_topic_id) |
static | deleteByThreadId ($thr_id) |
static | _lookupDate ($thread_id) |
Static Protected Attributes | |
static | $possibleOrderDirections = array('ASC', 'DESC') |
Private Member Functions | |
read () | |
Reads the data of the current object id from database and loads it into the object. |
Private Attributes | |
$id = 0 | |
$forum_id = 0 | |
$frm_obj_id = 0 | |
$display_user_id = 0 | |
$user_alias = '' | |
$subject = '' | |
$createdate = '0000-00-00 00:00:00' | |
$changedate = '0000-00-00 00:00:00' | |
$num_posts = 0 | |
$last_post_string = '' | |
$visits = 0 | |
$import_name = '' | |
$is_sticky = 0 | |
$is_closed = 0 | |
$orderField = '' | |
$posts = array() | |
$db = null | |
$is_moderator = false | |
$thr_author_id = 0 | |
$average_rating = 0 | |
$orderDirection = 'DESC' |
Definition at line 12 of file class.ilForumTopic.php.
ilForumTopic::__construct | ( | $a_id = 0 , |
|
$a_is_moderator = false , |
|||
$preventImplicitRead = false |
|||
) |
Constructor.
Returns an object of a forum topic. The constructor calls the private method read() to load the topic data from database into the object.
integer | $a_id | primary key of a forum topic (optional) |
bool | $a_is_moderator | moderator-status of the current user (optional) |
bool | $preventImplicitRead | Prevents the implicit database query if an id was passed |
public
Definition at line 73 of file class.ilForumTopic.php.
|
static |
integer | $thread_id |
Definition at line 1281 of file class.ilForumTopic.php.
References $ilDB, $res, and $row.
Referenced by ilObjForumGUI\confirmMergeThreadsObject().
|
static |
Looks up the title/subject of a topic/thread.
integer | id of the topic/thread |
Definition at line 1121 of file class.ilForumTopic.php.
References $ilDB, $res, and $row.
Referenced by ilObjForumGUI\confirmMergeThreadsObject().
ilForumTopic::assignData | ( | $data | ) |
$data |
Definition at line 90 of file class.ilForumTopic.php.
References setAverageRating(), setChangeDate(), setClosed(), setCreateDate(), setDisplayUserId(), setForumId(), setId(), setImportName(), setLastPostString(), setNumNewPosts(), setNumPosts(), setNumUnreadPosts(), setSticky(), setSubject(), setThrAuthorId(), setUserAlias(), setUserNotificationEnabled(), and setVisits().
ilForumTopic::close | ( | ) |
Closes the current topic.
Definition at line 915 of file class.ilForumTopic.php.
ilForumTopic::countActivePosts | ( | ) |
Fetches and returns the number of active posts for the given user id.
integer | $a_user_id | user id |
Definition at line 317 of file class.ilForumTopic.php.
References $id, $ilUser, $res, and DB_FETCHMODE_ASSOC.
ilForumTopic::countPosts | ( | ) |
Fetches and returns the number of posts for the given user id.
integer | $a_user_id | user id |
Definition at line 297 of file class.ilForumTopic.php.
References $res, and DB_FETCHMODE_ASSOC.
|
static |
Definition at line 1268 of file class.ilForumTopic.php.
References $ilDB.
Referenced by ilForum\mergeThreads().
ilForumTopic::disableNotification | ( | $a_user_id | ) |
Disable a user's notification about new posts in a thread.
integer | $a_user_id | id of an user |
Definition at line 842 of file class.ilForumTopic.php.
ilForumTopic::enableNotification | ( | $a_user_id | ) |
Enable a user's notification about new posts in a thread.
integer | $a_user_id | id of an user |
Definition at line 811 of file class.ilForumTopic.php.
References isNotificationEnabled().
ilForumTopic::getAllPosts | ( | ) |
Definition at line 413 of file class.ilForumTopic.php.
References $posts, $res, $row, and DB_FETCHMODE_OBJECT.
Referenced by movePosts().
ilForumTopic::getAverageRating | ( | ) |
ilForumTopic::getChangeDate | ( | ) |
Definition at line 1030 of file class.ilForumTopic.php.
References $changedate.
ilForumTopic::getCreateDate | ( | ) |
Definition at line 1019 of file class.ilForumTopic.php.
References $createdate.
ilForumTopic::getDisplayUserId | ( | ) |
Definition at line 995 of file class.ilForumTopic.php.
References $display_user_id.
ilForumTopic::getFirstPostId | ( | ) |
Fetches the primary key of the first post node of the current topic from database and returns it.
Definition at line 254 of file class.ilForumTopic.php.
References $res, $row, and DB_FETCHMODE_OBJECT.
ilForumTopic::getFirstPostNode | ( | ) |
Fetches and returns an object of the first post in the current topic.
Definition at line 340 of file class.ilForumTopic.php.
References $res, $row, and DB_FETCHMODE_OBJECT.
ilForumTopic::getForumId | ( | ) |
Definition at line 987 of file class.ilForumTopic.php.
References $forum_id.
ilForumTopic::getFrmObjId | ( | ) |
Definition at line 1092 of file class.ilForumTopic.php.
References $frm_obj_id.
Referenced by getNestedSetPostChildren().
ilForumTopic::getId | ( | ) |
Definition at line 979 of file class.ilForumTopic.php.
References $id.
Referenced by updateMergedThread(), and updateThreadTitle().
ilForumTopic::getImportName | ( | ) |
Definition at line 1038 of file class.ilForumTopic.php.
References $import_name.
ilForumTopic::getLastActivePost | ( | ) |
Fetches and returns an object of the last active post in the current topic.
Definition at line 388 of file class.ilForumTopic.php.
References $ilUser, $res, $row, and DB_FETCHMODE_OBJECT.
ilForumTopic::getLastPost | ( | ) |
Fetches and returns an object of the last post in the current topic.
Definition at line 362 of file class.ilForumTopic.php.
References $res, $row, and DB_FETCHMODE_OBJECT.
ilForumTopic::getLastPostString | ( | ) |
Definition at line 1048 of file class.ilForumTopic.php.
References $last_post_string.
Referenced by updateMergedThread().
ilForumTopic::getModeratorRight | ( | ) |
Definition at line 1088 of file class.ilForumTopic.php.
References $is_moderator.
ilForumTopic::getNestedSetPostChildren | ( | $pos_id = null , |
|
$expandedNodes = array() |
|||
) |
Definition at line 636 of file class.ilForumTopic.php.
References $ilUser, $query, $res, $row, getFrmObjId(), and ilForumProperties\getInstance().
ilForumTopic::getNumNewPosts | ( | ) |
ilForumTopic::getNumPosts | ( | ) |
Definition at line 1163 of file class.ilForumTopic.php.
References $num_posts.
Referenced by updateMergedThread().
ilForumTopic::getNumUnreadPosts | ( | ) |
Definition at line 1199 of file class.ilForumTopic.php.
ilForumTopic::getOrderDirection | ( | ) |
Definition at line 1233 of file class.ilForumTopic.php.
References $orderDirection.
Referenced by getPostTree().
ilForumTopic::getOrderField | ( | ) |
Definition at line 1080 of file class.ilForumTopic.php.
References $orderField.
ilForumTopic::getPostTree | ( | ilForumPost | $a_post_node | ) |
Fetches and returns an array of posts from the post tree, starting with the node object passed by the first paramter.
ilForumPost | $a_post_node | node-object of a post |
Definition at line 443 of file class.ilForumTopic.php.
References $ilUser, $posts, $query, $res, $row, ilForumPost\getLft(), getOrderDirection(), ilForumPost\getRgt(), and ilForumPost\getThreadId().
ilForumTopic::getSorting | ( | ) |
Definition at line 1250 of file class.ilForumTopic.php.
ilForumTopic::getSubject | ( | ) |
Definition at line 1011 of file class.ilForumTopic.php.
References $subject.
Referenced by updateMergedThread(), and updateThreadTitle().
ilForumTopic::getThrAuthorId | ( | ) |
ilForumTopic::getUserAlias | ( | ) |
Definition at line 1003 of file class.ilForumTopic.php.
References $user_alias.
ilForumTopic::getUserNotificationEnabled | ( | ) |
Definition at line 1217 of file class.ilForumTopic.php.
ilForumTopic::getVisits | ( | ) |
Definition at line 1056 of file class.ilForumTopic.php.
References $visits.
Referenced by updateMergedThread().
ilForumTopic::insert | ( | ) |
Inserts the object data into database.
Definition at line 120 of file class.ilForumTopic.php.
ilForumTopic::isClosed | ( | ) |
Definition at line 1072 of file class.ilForumTopic.php.
ilForumTopic::isNotificationEnabled | ( | $a_user_id | ) |
Check whether a user's notification about new posts in a thread is enabled (result > 0) or not (result == 0).
integer | $a_user_id | id of an user |
Definition at line 784 of file class.ilForumTopic.php.
References $result.
Referenced by enableNotification().
ilForumTopic::isSticky | ( | ) |
Definition at line 1064 of file class.ilForumTopic.php.
|
static |
Definition at line 1238 of file class.ilForumTopic.php.
References $ilDB, $res, and $row.
Referenced by ilObjForumGUI\confirmMergeThreadsObject().
ilForumTopic::makeSticky | ( | ) |
Sets the current topic sticky.
Definition at line 865 of file class.ilForumTopic.php.
ilForumTopic::movePosts | ( | $old_obj_id, | |
$old_pk, | |||
$new_obj_id, | |||
$new_pk | |||
) |
Moves all posts within the current thread to a new forum.
integer | $old_obj_id | object id of the current forum |
integer | $old_pk | primary key of old forum |
integer | $new_obj_id | object id of the new forum |
integer | $new_pk | primary key of new forum |
Definition at line 550 of file class.ilForumTopic.php.
References $ilDB, $posts, ilForum\_lookupObjIdForForumId(), DB_FETCHMODE_ASSOC, getAllPosts(), ilNewsItem\getFirstNewsIdForContext(), and ilDB\LOCK_WRITE.
|
private |
Reads the data of the current object id from database and loads it into the object.
private
Definition at line 195 of file class.ilForumTopic.php.
References $res, $row, and DB_FETCHMODE_OBJECT.
Referenced by __construct(), and reload().
ilForumTopic::reload | ( | ) |
Calls the private method read() to load the topic data from database into the object.
Definition at line 243 of file class.ilForumTopic.php.
References read().
ilForumTopic::reopen | ( | ) |
Reopens the current topic.
Definition at line 940 of file class.ilForumTopic.php.
ilForumTopic::setAverageRating | ( | $average_rating | ) |
int | $average_rating |
Definition at line 970 of file class.ilForumTopic.php.
References $average_rating.
Referenced by assignData().
ilForumTopic::setChangeDate | ( | $a_changedate | ) |
Definition at line 1023 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setClosed | ( | $a_closed | ) |
Definition at line 1068 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setCreateDate | ( | $a_createdate | ) |
Definition at line 1015 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setDisplayUserId | ( | $a_user_id | ) |
Definition at line 991 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setForumId | ( | $a_forum_id | ) |
Definition at line 983 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setId | ( | $a_id | ) |
Definition at line 975 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setImportName | ( | $a_import_name | ) |
Definition at line 1034 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setLastPostString | ( | $a_last_post | ) |
Definition at line 1042 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setModeratorRight | ( | $bool | ) |
Definition at line 1084 of file class.ilForumTopic.php.
ilForumTopic::setNumNewPosts | ( | $num_new_posts | ) |
int | $num_new_posts |
Definition at line 1172 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setNumPosts | ( | $a_num_posts | ) |
$a_num_posts |
Definition at line 1154 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setNumUnreadPosts | ( | $num_unread_posts | ) |
int | $num_unread_posts |
Definition at line 1190 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setOrderDirection | ( | $direction | ) |
Definition at line 1222 of file class.ilForumTopic.php.
ilForumTopic::setOrderField | ( | $a_order_field | ) |
Definition at line 1076 of file class.ilForumTopic.php.
ilForumTopic::setSticky | ( | $a_sticky | ) |
Definition at line 1060 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setSubject | ( | $a_subject | ) |
Definition at line 1007 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setThrAuthorId | ( | $thr_author_id | ) |
int | $thr_author_id |
Definition at line 1100 of file class.ilForumTopic.php.
References $thr_author_id.
Referenced by assignData().
ilForumTopic::setUserAlias | ( | $a_user_alias | ) |
Definition at line 999 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setUserNotificationEnabled | ( | $user_notification_enabled | ) |
boolean | $user_notification_enabled |
Definition at line 1208 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::setVisits | ( | $a_visits | ) |
Definition at line 1052 of file class.ilForumTopic.php.
Referenced by assignData().
ilForumTopic::unmakeSticky | ( | ) |
Sets the current topic non-sticky.
Definition at line 890 of file class.ilForumTopic.php.
ilForumTopic::update | ( | ) |
Updates an existing topic.
Definition at line 158 of file class.ilForumTopic.php.
ilForumTopic::updateMergedThread | ( | ) |
Definition at line 1254 of file class.ilForumTopic.php.
References $ilDB, getId(), getLastPostString(), getNumPosts(), getSubject(), and getVisits().
ilForumTopic::updateThreadTitle | ( | ) |
Definition at line 1140 of file class.ilForumTopic.php.
References $ilDB, getId(), and getSubject().
ilForumTopic::updateVisits | ( | ) |
Updates the visit counter of the current topic.
public
Definition at line 272 of file class.ilForumTopic.php.
References $_SESSION.
|
private |
Definition at line 55 of file class.ilForumTopic.php.
Referenced by getAverageRating(), and setAverageRating().
|
private |
Definition at line 28 of file class.ilForumTopic.php.
Referenced by getChangeDate().
|
private |
Definition at line 26 of file class.ilForumTopic.php.
Referenced by getCreateDate().
|
private |
Definition at line 46 of file class.ilForumTopic.php.
|
private |
Definition at line 20 of file class.ilForumTopic.php.
Referenced by getDisplayUserId().
|
private |
Definition at line 16 of file class.ilForumTopic.php.
Referenced by getForumId().
|
private |
Definition at line 18 of file class.ilForumTopic.php.
Referenced by getFrmObjId().
|
private |
Definition at line 14 of file class.ilForumTopic.php.
Referenced by countActivePosts(), and getId().
|
private |
Definition at line 36 of file class.ilForumTopic.php.
Referenced by getImportName().
|
private |
Definition at line 40 of file class.ilForumTopic.php.
|
private |
Definition at line 48 of file class.ilForumTopic.php.
Referenced by getModeratorRight().
|
private |
Definition at line 38 of file class.ilForumTopic.php.
|
private |
Definition at line 32 of file class.ilForumTopic.php.
Referenced by getLastPostString().
|
private |
Definition at line 30 of file class.ilForumTopic.php.
Referenced by getNumPosts().
|
private |
Definition at line 57 of file class.ilForumTopic.php.
Referenced by getOrderDirection().
|
private |
Definition at line 42 of file class.ilForumTopic.php.
Referenced by getOrderField().
|
staticprotected |
Definition at line 59 of file class.ilForumTopic.php.
|
private |
Definition at line 44 of file class.ilForumTopic.php.
Referenced by getAllPosts(), getPostTree(), and movePosts().
|
private |
Definition at line 24 of file class.ilForumTopic.php.
Referenced by getSubject().
|
private |
Definition at line 50 of file class.ilForumTopic.php.
Referenced by getThrAuthorId(), and setThrAuthorId().
|
private |
Definition at line 22 of file class.ilForumTopic.php.
Referenced by getUserAlias().
|
private |
Definition at line 34 of file class.ilForumTopic.php.
Referenced by getVisits().