ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilForumPost Class Reference
+ Collaboration diagram for ilForumPost:

Public Member Functions

 __construct ($a_id=0, $a_is_moderator=false, $preventImplicitRead=false)
 __destruct ()
 insert ()
 update ()
 getDataAsArray ()
 getDataAsArrayForExplorer ()
 isAnyParentDeactivated ()
 reload ()
 setFullname ($a_fullname)
 getFullname ()
 setLoginName ($a_loginname)
 getLoginName ()
 activatePost ()
 activatePostAndChildPosts ()
 activateParentPosts ()
 deactivatePostAndChildPosts ()
 isPostRead ()
 isRead ($a_user_id=0)
 hasReplies ()
 isOwner ($a_user_id=0)
 setId ($a_id)
 getId ()
 setForumId ($a_forum_id)
 getForumId ()
 setThreadId ($a_thread_id)
 getThreadId ()
 setDisplayUserId ($a_user_id)
 getDisplayUserId ()
 setUserAlias ($a_user_alias)
 getUserAlias ()
 setSubject ($a_subject)
 getSubject ()
 setMessage ($a_message)
 getMessage ()
 setCreateDate ($a_createdate)
 getCreateDate ()
 setChangeDate ($a_changedate)
 getChangeDate ()
 setUpdateUserId ($a_user_id_update)
 getUpdateUserId ()
 setCensorship ($a_censorship)
 isCensored ()
 setCensorshipComment ($a_comment)
 getCensorshipComment ()
 setNotification ($a_notification)
 isNotificationEnabled ()
 setImportName ($a_import_name)
 getImportName ()
 setStatus ($a_status)
 isActivated ()
 setTreeId ($a_tree_id)
 getTreeId ()
 setParentId ($a_parent_id)
 setIsRead ($a_is_read)
 getIsRead ()
 getParentId ()
 setLft ($a_lft)
 getLft ()
 setRgt ($a_rgt)
 getRgt ()
 setDepth ($a_depth)
 getDepth ()
 setThread (ilForumTopic $thread)
 getThread ()
 setPosAuthorId ($pos_author_id)
 getPosAuthorId ()
 getIsAuthorModerator ()
 setIsAuthorModerator ($is_author_moderator)
 assignData ($row)

Static Public Member Functions

static mergePosts ($source_thread_id, $target_thread_id)

Protected Member Functions

 buildUserRelatedData ($row)

Private Member Functions

 read ()
 getUserData ()

Private Attributes

 $id = 0
 $forum_id = 0
 $thread_id = 0
 $display_user_id = 0
 $user_alias = ''
 $subject = ''
 $message = ''
 $createdate = '0000-00-00 00:00:00'
 $changedate = '0000-00-00 00:00:00'
 $user_id_update = 0
 $censored = 0
 $censorship_comment = ''
 $notification = 0
 $import_name = ''
 $status = 1
 $tree_id = 0
 $parent_id = 0
 $lft = 0
 $rgt = 0
 $depth = 0
 $fullname = ''
 $loginname = ''
 $objThread = null
 $db = null
 $is_moderator = false
 $is_author_moderator = null
 $post_read = false
 $pos_author_id = 0

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 12 of file class.ilForumPost.php.

Constructor & Destructor Documentation

ilForumPost::__construct (   $a_id = 0,
  $a_is_moderator = false,
  $preventImplicitRead = false 
)

Definition at line 78 of file class.ilForumPost.php.

References $ilDB, and read().

{
global $ilDB;
$this->db = $ilDB;
$this->id = $a_id;
if( !$preventImplicitRead )
{
$this->read();
}
}

+ Here is the call graph for this function:

ilForumPost::__destruct ( )

Definition at line 91 of file class.ilForumPost.php.

{
unset($this->db);
unset($this->objThread);
}

Member Function Documentation

ilForumPost::activateParentPosts ( )

Definition at line 407 of file class.ilForumPost.php.

References $query, $result, and $row.

Referenced by activatePost(), and activatePostAndChildPosts().

{
if ($this->id)
{
$query = "SELECT pos_pk FROM frm_posts "
. "INNER JOIN frm_posts_tree ON pos_fk = pos_pk "
. "WHERE lft < %s AND rgt > %s AND thr_fk = %s";
$result = $this->db->queryF(
array('integer', 'integer', 'integer'),
array($this->lft, $this->rgt, $this->thread_id)
);
while($row = $this->db->fetchAssoc($result))
{
$this->db->update('frm_posts',
array('pos_status' => array('integer', 1)),
array('pos_pk' => array('integer', $row['pos_pk'])));
}
return true;
}
return false;
}

+ Here is the caller graph for this function:

ilForumPost::activatePost ( )

Definition at line 361 of file class.ilForumPost.php.

References activateParentPosts().

{
if ($this->id)
{
$this->db->update('frm_posts',
array('pos_status' => array('integer', 1)),
array('pos_pk' => array('integer', $this->id)));
return true;
}
return false;
}

+ Here is the call graph for this function:

ilForumPost::activatePostAndChildPosts ( )

Definition at line 377 of file class.ilForumPost.php.

References $query, $result, $row, and activateParentPosts().

{
if ($this->id)
{
$query = "SELECT pos_pk FROM frm_posts_tree treea "
. "INNER JOIN frm_posts_tree treeb ON treeb.thr_fk = treea.thr_fk "
. "AND treeb.lft BETWEEN treea.lft AND treea.rgt "
. "INNER JOIN frm_posts ON pos_pk = treeb.pos_fk "
. "WHERE treea.pos_fk = %s";
$result = $this->db->queryF(
array('integer'),
array($this->id)
);
while($row = $this->db->fetchAssoc($result))
{
$this->db->update('frm_posts',
array('pos_status' => array('integer', 1)),
array('pos_pk' => array('integer', $row['pos_pk'])));
}
return true;
}
return false;
}

+ Here is the call graph for this function:

ilForumPost::assignData (   $row)

Definition at line 725 of file class.ilForumPost.php.

References $row, buildUserRelatedData(), setCensorship(), setCensorshipComment(), setChangeDate(), setCreateDate(), setDepth(), setDisplayUserId(), setForumId(), setImportName(), setIsAuthorModerator(), setIsRead(), setLft(), setMessage(), setNotification(), setParentId(), setPosAuthorId(), setRgt(), setStatus(), setSubject(), setThreadId(), setTreeId(), setUpdateUserId(), and setUserAlias().

{
$this->setUserAlias($row['pos_usr_alias']);
$this->setSubject($row['pos_subject']);
$this->setCreateDate($row['pos_date']);
$this->setMessage($row['pos_message']);
$this->setForumId($row['pos_top_fk']);
$this->setThreadId($row['pos_thr_fk']);
$this->setChangeDate($row['pos_update']);
$this->setUpdateUserId($row['update_user']);
$this->setCensorship($row['pos_cens']);
$this->setCensorshipComment($row['pos_cens_com']);
$this->setNotification($row['notify']);
$this->setImportName($row['import_name']);
$this->setStatus($row['pos_status']);
$this->setTreeId($row['fpt_pk']);
$this->setParentId($row['parent_pos']);
$this->setLft($row['lft']);
$this->setRgt($row['rgt']);
$this->setDepth($row['depth']);
$this->setIsRead($row['post_read']);
$this->setDisplayUserId($row['pos_display_user_id']);
$this->setPosAuthorId($row['pos_author_id']);
$this->setIsAuthorModerator($row['is_author_moderator']);
}

+ Here is the call graph for this function:

ilForumPost::buildUserRelatedData (   $row)
protected

Definition at line 295 of file class.ilForumPost.php.

References $lng, and $row.

Referenced by assignData().

{
global $lng;
if ($row['pos_display_user_id'] && $row['pos_pk'])
{
require_once 'Services/User/classes/class.ilObjUser.php';
$tmp_user = new ilObjUser();
$tmp_user->setFirstname($row['firstname']);
$tmp_user->setLastname($row['lastname']);
$tmp_user->setUTitle($row['title']);
$tmp_user->setLogin($row['login']);
$this->fullname = $tmp_user->getFullname();
$this->loginname = $tmp_user->getLogin();
$this->fullname = $this->fullname ? $this->fullname : ($this->import_name ? $this->import_name : $lng->txt('unknown'));
return true;
}
}

+ Here is the caller graph for this function:

ilForumPost::deactivatePostAndChildPosts ( )

Definition at line 433 of file class.ilForumPost.php.

References $query, $result, and $row.

{
if ($this->id)
{
$query = "SELECT pos_pk FROM frm_posts_tree treea "
. "INNER JOIN frm_posts_tree treeb ON treeb.thr_fk = treea.thr_fk "
. "AND treeb.lft BETWEEN treea.lft AND treea.rgt "
. "INNER JOIN frm_posts ON pos_pk = treeb.pos_fk "
. "WHERE treea.pos_fk = %s";
$result = $this->db->queryF(
array('integer'),
array($this->id)
);
while($row = $this->db->fetchAssoc($result))
{
$this->db->update('frm_posts',
array('pos_status' => array('integer', 0)),
array('pos_pk' => array('integer', $row['pos_pk'])));
}
return true;
}
return false;
}
ilForumPost::getCensorshipComment ( )

Definition at line 606 of file class.ilForumPost.php.

References $censorship_comment.

ilForumPost::getChangeDate ( )

Definition at line 582 of file class.ilForumPost.php.

References $changedate.

{
}
ilForumPost::getCreateDate ( )

Definition at line 574 of file class.ilForumPost.php.

References $createdate.

{
}
ilForumPost::getDataAsArray ( )

Definition at line 167 of file class.ilForumPost.php.

{
$data = array(
'pos_pk' => $this->id,
'pos_top_fk' => $this->forum_id,
'pos_thr_fk' => $this->thread_id,
'pos_display_user_id' => $this->display_user_id,
'pos_usr_alias' => $this->user_alias,
'title' => $this->fullname,
'loginname' => $this->loginname,
'pos_message' => $this->message,
'pos_subject' => $this->subject,
'pos_cens_com' => $this->censorship_comment,
'pos_cens' => $this->censored,
'pos_date' => $this->createdate,
'pos_update' => $this->changedate,
'update_user' => $this->user_id_update,
'notify' => $this->notification,
'import_name' => $this->import_name,
'pos_status' => $this->status,
'pos_author_id' => $this->pos_author_id,
'is_author_moderator' => $this->is_author_moderator
);
return $data;
}
ilForumPost::getDataAsArrayForExplorer ( )

Definition at line 194 of file class.ilForumPost.php.

{
$data = array(
'pos_pk' => $this->id,
'child' => $this->id,
'author' => $this->display_user_id,
'alias' => $this->user_alias,
'title' => $this->fullname,
'loginname' => $this->loginname,
'type' => 'post',
'message' => $this->message,
'subject' => $this->subject,
'pos_cens_com' => $this->censorship_comment,
'pos_cens' => $this->censored,
'date' => $this->createdate,
'create_date' => $this->createdate,
'update' => $this->changedate,
'update_user' => $this->user_id_update,
'tree' => $this->thread_id,
'parent' => $this->parent_id,
'lft' => $this->lft,
'rgt' => $this->rgt,
'depth' => $this->depth,
'id' => $this->tree_id,
'notify' => $this->notification,
'import_name' => $this->import_name,
'pos_status' => $this->status,
'pos_author_id' => $this->pos_author_id,
'is_author_moderator' => $this->is_author_moderator
);
return $data;
}
ilForumPost::getDepth ( )

Definition at line 681 of file class.ilForumPost.php.

References $depth.

{
return $this->depth;
}
ilForumPost::getDisplayUserId ( )

Definition at line 542 of file class.ilForumPost.php.

References $display_user_id.

ilForumPost::getForumId ( )

Definition at line 526 of file class.ilForumPost.php.

References $forum_id.

{
}
ilForumPost::getFullname ( )

Definition at line 348 of file class.ilForumPost.php.

References $fullname.

{
return $this->fullname;
}
ilForumPost::getId ( )

Definition at line 518 of file class.ilForumPost.php.

References $id.

{
return $this->id;
}
ilForumPost::getImportName ( )

Definition at line 622 of file class.ilForumPost.php.

References $import_name.

{
}
ilForumPost::getIsAuthorModerator ( )
Returns
int|null

Definition at line 712 of file class.ilForumPost.php.

References $is_author_moderator.

ilForumPost::getIsRead ( )

Definition at line 652 of file class.ilForumPost.php.

References $post_read.

Referenced by isPostRead().

{
}

+ Here is the caller graph for this function:

ilForumPost::getLft ( )

Definition at line 665 of file class.ilForumPost.php.

References $lft.

Referenced by ilForumTopic\getPostTree().

{
return $this->lft;
}

+ Here is the caller graph for this function:

ilForumPost::getLoginName ( )

Definition at line 356 of file class.ilForumPost.php.

References $loginname.

{
}
ilForumPost::getMessage ( )

Definition at line 566 of file class.ilForumPost.php.

References $message.

{
}
ilForumPost::getParentId ( )

Definition at line 657 of file class.ilForumPost.php.

References $parent_id.

{
}
ilForumPost::getPosAuthorId ( )
Returns
int

Definition at line 705 of file class.ilForumPost.php.

References $pos_author_id.

{
}
ilForumPost::getRgt ( )

Definition at line 673 of file class.ilForumPost.php.

References $rgt.

Referenced by ilForumTopic\getPostTree().

{
return $this->rgt;
}

+ Here is the caller graph for this function:

ilForumPost::getSubject ( )

Definition at line 558 of file class.ilForumPost.php.

References $subject.

{
}
ilForumPost::getThread ( )

Definition at line 689 of file class.ilForumPost.php.

References $objThread.

{
}
ilForumPost::getThreadId ( )

Definition at line 534 of file class.ilForumPost.php.

References $thread_id.

Referenced by ilForumTopic\getPostTree().

{
}

+ Here is the caller graph for this function:

ilForumPost::getTreeId ( )

Definition at line 638 of file class.ilForumPost.php.

References $tree_id.

{
}
ilForumPost::getUpdateUserId ( )

Definition at line 590 of file class.ilForumPost.php.

References $user_id_update.

{
}
ilForumPost::getUserAlias ( )

Definition at line 550 of file class.ilForumPost.php.

References $user_alias.

{
}
ilForumPost::getUserData ( )
private

Definition at line 317 of file class.ilForumPost.php.

References $lng, and ilObjForumAccess\getCachedUserInstance().

Referenced by read().

{
global $lng;
if ($this->id && $this->display_user_id)
{
require_once("Modules/Forum/classes/class.ilObjForumAccess.php");
if(($tmp_user = ilObjForumAccess::getCachedUserInstance($this->display_user_id)))
{
$this->fullname = $tmp_user->getFullname();
$this->loginname = $tmp_user->getLogin();
unset($tmp_user);
}
$this->fullname = $this->fullname ? $this->fullname : ($this->import_name ? $this->import_name : $lng->txt('unknown'));
return true;
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilForumPost::hasReplies ( )

Definition at line 484 of file class.ilForumPost.php.

References $res.

{
if ($this->id && $this->rgt && $this->lft)
{
$res = $this->db->queryf('
SELECT * FROM frm_posts_tree
WHERE lft > %s AND rgt < %s
AND thr_fk = %s',
array('integer', 'integer', 'integer'),
array($this->lft, $this->rgt, $this->thread_id));
return $res->numRows() ? true : false;
}
return false;
}
ilForumPost::insert ( )

Definition at line 97 of file class.ilForumPost.php.

References $ilDB.

{
global $ilDB;
if ($this->forum_id && $this->thread_id)
{
$this->id = $this->db->nextId('frm_posts');
$ilDB->insert('frm_posts', array(
'pos_pk' => array('integer', $this->id),
'pos_top_fk' => array('integer', $this->forum_id),
'pos_thr_fk' => array('integer', $this->thread_id),
'pos_display_user_id' => array('integer', $this->display_user_id),
'pos_usr_alias' => array('text', $this->user_alias),
'pos_subject' => array('text', $this->subject),
'pos_message' => array('clob', $this->message),
'pos_date' => array('timestamp', $this->createdate),
'pos_update' => array('timestamp', $this->createdate),
'update_user' => array('integer', $this->user_id_update),
'pos_cens' => array('integer', $this->censored),
'notify' => array('integer', (int)$this->notification),
'import_name' => array('text', (string)$this->import_name),
'pos_status' => array('integer', (int)$this->status),
'pos_author_id' => array('integer', (int)$this->pos_author_id),
'is_author_moderator' => array('integer', $this->is_author_moderator)
));
return true;
}
return false;
}
ilForumPost::isActivated ( )

Definition at line 630 of file class.ilForumPost.php.

{
return $this->status == 1 ? true : false;
}
ilForumPost::isAnyParentDeactivated ( )

Definition at line 276 of file class.ilForumPost.php.

References $res.

{
if ($this->id)
{
$res = $this->db->queryf('
SELECT * FROM frm_posts_tree
INNER JOIN frm_posts ON pos_pk = pos_fk
WHERE pos_status = %s
AND lft < %s AND rgt > %s
AND thr_fk = %s',
array('integer', 'integer', 'integer', 'integer'),
array('0', $this->lft, $this->rgt, $this->thread_id));
return $res->numRows();
}
return false;
}
ilForumPost::isCensored ( )

Definition at line 598 of file class.ilForumPost.php.

{
return $this->censored == 1 ? true : false;
}
ilForumPost::isNotificationEnabled ( )

Definition at line 614 of file class.ilForumPost.php.

{
return $this->notification == 1 ? true : false;
}
ilForumPost::isOwner (   $a_user_id = 0)

Definition at line 501 of file class.ilForumPost.php.

{
if ($this->pos_author_id && $a_user_id)
{
if ((int) $this->pos_author_id == (int) $a_user_id)
{
return true;
}
return false;
}
return false;
}
ilForumPost::isPostRead ( )

Definition at line 461 of file class.ilForumPost.php.

References getIsRead().

{
return $this->getIsRead();
}

+ Here is the call graph for this function:

ilForumPost::isRead (   $a_user_id = 0)

Definition at line 466 of file class.ilForumPost.php.

References $res.

{
if ($a_user_id && $this->id)
{
$res = $this->db->queryf('
SELECT * FROM frm_user_read
WHERE usr_id = %s
AND post_id = %s',
array('integer', 'integer'),
array($a_user_id, $this->id));
return $res->numRows() ? true : false;
}
return false;
}
static ilForumPost::mergePosts (   $source_thread_id,
  $target_thread_id 
)
static

Definition at line 752 of file class.ilForumPost.php.

References $ilDB.

Referenced by ilForum\mergeThreads().

{
global $ilDB;
$ilDB->update('frm_posts',
array('pos_thr_fk' => array('integer', $target_thread_id)),
array('pos_thr_fk' => array('integer', $source_thread_id)));
}

+ Here is the caller graph for this function:

ilForumPost::read ( )
private

Definition at line 228 of file class.ilForumPost.php.

References $res, $row, and getUserData().

Referenced by __construct(), and reload().

{
if ($this->id)
{
$res = $this->db->queryf('
SELECT * FROM frm_posts
INNER JOIN frm_posts_tree ON pos_fk = pos_pk
WHERE pos_pk = %s',
array('integer'), array($this->id));
$row = $this->db->fetchObject($res);
if (is_object($row))
{
$this->id = $row->pos_pk;
$this->forum_id = $row->pos_top_fk;
$this->thread_id = $row->pos_thr_fk;
$this->display_user_id = $row->pos_display_user_id;
$this->user_alias = $row->pos_usr_alias;
$this->subject = $row->pos_subject;
$this->message = $row->pos_message;
$this->createdate = $row->pos_date;
$this->changedate = $row->pos_update;
$this->user_id_update = $row->update_user;
$this->censored = $row->pos_cens;
$this->censorship_comment = $row->pos_cens_com;
$this->notification = $row->notify;
$this->import_name = $row->import_name;
$this->status = $row->pos_status;
$this->tree_id = $row->fpt_pk;
$this->parent_id = $row->parent_pos;
$this->lft = $row->lft;
$this->rgt = $row->rgt;
$this->depth = $row->depth;
$this->pos_author_id = $row->pos_author_id;
$this->is_author_moderator = $row->is_author_moderator;
$this->getUserData();
$this->objThread = new ilForumTopic($this->thread_id, $this->is_moderator);
return true;
}
return false;
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilForumPost::reload ( )

Definition at line 339 of file class.ilForumPost.php.

References read().

{
return $this->read();
}

+ Here is the call graph for this function:

ilForumPost::setCensorship (   $a_censorship)

Definition at line 594 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->censored = $a_censorship;
}

+ Here is the caller graph for this function:

ilForumPost::setCensorshipComment (   $a_comment)

Definition at line 602 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->censorship_comment = $a_comment;
}

+ Here is the caller graph for this function:

ilForumPost::setChangeDate (   $a_changedate)

Definition at line 578 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->changedate = $a_changedate;
}

+ Here is the caller graph for this function:

ilForumPost::setCreateDate (   $a_createdate)

Definition at line 570 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->createdate = $a_createdate;
}

+ Here is the caller graph for this function:

ilForumPost::setDepth (   $a_depth)

Definition at line 677 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->depth = $a_depth;
}

+ Here is the caller graph for this function:

ilForumPost::setDisplayUserId (   $a_user_id)

Definition at line 538 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->display_user_id = $a_user_id;
}

+ Here is the caller graph for this function:

ilForumPost::setForumId (   $a_forum_id)

Definition at line 522 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->forum_id = $a_forum_id;
}

+ Here is the caller graph for this function:

ilForumPost::setFullname (   $a_fullname)

Definition at line 344 of file class.ilForumPost.php.

{
$this->fullname = $a_fullname;
}
ilForumPost::setId (   $a_id)

Definition at line 514 of file class.ilForumPost.php.

{
$this->id = $a_id;
}
ilForumPost::setImportName (   $a_import_name)

Definition at line 618 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->import_name = $a_import_name;
}

+ Here is the caller graph for this function:

ilForumPost::setIsAuthorModerator (   $is_author_moderator)
Parameters
int|null

Definition at line 720 of file class.ilForumPost.php.

References $is_author_moderator.

Referenced by assignData().

{
$this->is_author_moderator = $is_author_moderator;
}

+ Here is the caller graph for this function:

ilForumPost::setIsRead (   $a_is_read)

Definition at line 647 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->post_read = $a_is_read;
}

+ Here is the caller graph for this function:

ilForumPost::setLft (   $a_lft)

Definition at line 661 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->lft = $a_lft;
}

+ Here is the caller graph for this function:

ilForumPost::setLoginName (   $a_loginname)

Definition at line 352 of file class.ilForumPost.php.

{
$this->loginname = $a_loginname;
}
ilForumPost::setMessage (   $a_message)

Definition at line 562 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->message = $a_message;
}

+ Here is the caller graph for this function:

ilForumPost::setNotification (   $a_notification)

Definition at line 610 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->notification = $a_notification;
}

+ Here is the caller graph for this function:

ilForumPost::setParentId (   $a_parent_id)

Definition at line 642 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->parent_id = $a_parent_id;
}

+ Here is the caller graph for this function:

ilForumPost::setPosAuthorId (   $pos_author_id)
Parameters
int$pos_author_id

Definition at line 697 of file class.ilForumPost.php.

References $pos_author_id.

Referenced by assignData().

{
$this->pos_author_id = $pos_author_id;
}

+ Here is the caller graph for this function:

ilForumPost::setRgt (   $a_rgt)

Definition at line 669 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->rgt = $a_rgt;
}

+ Here is the caller graph for this function:

ilForumPost::setStatus (   $a_status)

Definition at line 626 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->status = $a_status;
}

+ Here is the caller graph for this function:

ilForumPost::setSubject (   $a_subject)

Definition at line 554 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->subject = $a_subject;
}

+ Here is the caller graph for this function:

ilForumPost::setThread ( ilForumTopic  $thread)

Definition at line 685 of file class.ilForumPost.php.

{
$this->objThread = $thread;
}
ilForumPost::setThreadId (   $a_thread_id)

Definition at line 530 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->thread_id = $a_thread_id;
}

+ Here is the caller graph for this function:

ilForumPost::setTreeId (   $a_tree_id)

Definition at line 634 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->tree_id = $a_tree_id;
}

+ Here is the caller graph for this function:

ilForumPost::setUpdateUserId (   $a_user_id_update)

Definition at line 586 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->user_id_update = $a_user_id_update;
}

+ Here is the caller graph for this function:

ilForumPost::setUserAlias (   $a_user_alias)

Definition at line 546 of file class.ilForumPost.php.

Referenced by assignData().

{
$this->user_alias = $a_user_alias;
}

+ Here is the caller graph for this function:

ilForumPost::update ( )

Definition at line 130 of file class.ilForumPost.php.

References $id, and $ilDB.

{
global $ilDB;
if($this->id)
{
$ilDB->update('frm_posts',
array(
'pos_top_fk' => array('integer', $this->forum_id),
'pos_thr_fk' => array('integer', $this->thread_id),
'pos_subject' => array('text', $this->subject),
'pos_message' => array('clob', $this->message),
'pos_update' => array('timestamp', $this->changedate),
'update_user' => array('integer', $this->user_id_update),
'pos_cens' => array('integer', $this->censored),
'pos_cens_com' => array('text', $this->censorship_comment),
'notify' => array('integer', (int)$this->notification),
'pos_status' => array('integer', (int)$this->status)
),
array(
'pos_pk' => array('integer', (int)$this->id)
)
);
if($this->objThread->getFirstPostId() == $this->id)
{
$this->objThread->setSubject($this->subject);
$this->objThread->update();
$this->objThread->reload();
}
return true;
}
return false;
}

Field Documentation

ilForumPost::$censored = 0
private

Definition at line 34 of file class.ilForumPost.php.

ilForumPost::$censorship_comment = ''
private

Definition at line 36 of file class.ilForumPost.php.

Referenced by getCensorshipComment().

ilForumPost::$changedate = '0000-00-00 00:00:00'
private

Definition at line 30 of file class.ilForumPost.php.

Referenced by getChangeDate().

ilForumPost::$createdate = '0000-00-00 00:00:00'
private

Definition at line 28 of file class.ilForumPost.php.

Referenced by getCreateDate().

ilForumPost::$db = null
private

Definition at line 60 of file class.ilForumPost.php.

ilForumPost::$depth = 0
private

Definition at line 52 of file class.ilForumPost.php.

Referenced by getDepth().

ilForumPost::$display_user_id = 0
private

Definition at line 20 of file class.ilForumPost.php.

Referenced by getDisplayUserId().

ilForumPost::$forum_id = 0
private

Definition at line 16 of file class.ilForumPost.php.

Referenced by getForumId().

ilForumPost::$fullname = ''
private

Definition at line 54 of file class.ilForumPost.php.

Referenced by getFullname().

ilForumPost::$id = 0
private

Definition at line 14 of file class.ilForumPost.php.

Referenced by getId(), and update().

ilForumPost::$import_name = ''
private

Definition at line 40 of file class.ilForumPost.php.

Referenced by getImportName().

ilForumPost::$is_author_moderator = null
private

Definition at line 72 of file class.ilForumPost.php.

Referenced by getIsAuthorModerator(), and setIsAuthorModerator().

ilForumPost::$is_moderator = false
private

Definition at line 66 of file class.ilForumPost.php.

ilForumPost::$lft = 0
private

Definition at line 48 of file class.ilForumPost.php.

Referenced by getLft().

ilForumPost::$loginname = ''
private

Definition at line 56 of file class.ilForumPost.php.

Referenced by getLoginName().

ilForumPost::$message = ''
private

Definition at line 26 of file class.ilForumPost.php.

Referenced by getMessage().

ilForumPost::$notification = 0
private

Definition at line 38 of file class.ilForumPost.php.

ilForumPost::$objThread = null
private

Definition at line 58 of file class.ilForumPost.php.

Referenced by getThread().

ilForumPost::$parent_id = 0
private

Definition at line 46 of file class.ilForumPost.php.

Referenced by getParentId().

ilForumPost::$pos_author_id = 0
private

Definition at line 76 of file class.ilForumPost.php.

Referenced by getPosAuthorId(), and setPosAuthorId().

ilForumPost::$post_read = false
private

Definition at line 74 of file class.ilForumPost.php.

Referenced by getIsRead().

ilForumPost::$rgt = 0
private

Definition at line 50 of file class.ilForumPost.php.

Referenced by getRgt().

ilForumPost::$status = 1
private

Definition at line 42 of file class.ilForumPost.php.

ilForumPost::$subject = ''
private

Definition at line 24 of file class.ilForumPost.php.

Referenced by getSubject().

ilForumPost::$thread_id = 0
private

Definition at line 18 of file class.ilForumPost.php.

Referenced by getThreadId().

ilForumPost::$tree_id = 0
private

Definition at line 44 of file class.ilForumPost.php.

Referenced by getTreeId().

ilForumPost::$user_alias = ''
private

Definition at line 22 of file class.ilForumPost.php.

Referenced by getUserAlias().

ilForumPost::$user_id_update = 0
private

Definition at line 32 of file class.ilForumPost.php.

Referenced by getUpdateUserId().


The documentation for this class was generated from the following file: