Public Member Functions | Data Fields

ilChatRoom Class Reference

Public Member Functions

 ilChatRoom ($a_id)
 Constructor public.
 getErrorMessage ()
 setRoomId ($a_id)
 getRoomId ()
 getObjId ()
 setOwnerId ($a_id)
 getOwnerId ()
 getName ()
 setTitle ($a_title)
 getTitle ()
 getGuests ()
 setUserId ($a_id)
 getUserId ()
 invite ($a_id)
 drop ($a_id)
 checkAccess ()
 isInvited ($a_id)
 isOwner ()
 appendMessageToDb ($message)
 getAllMessages ()
 deleteAllMessages ()
 updateLastVisit ()
 setKicked ($a_usr_id)
 setUnkicked ($a_usr_id)
 isKicked ($a_usr_id)
 getCountActiveUser ($chat_id, $room_id)
 _getCountActiveUsers ($chat_id, $room_id=0)
 getActiveUsers ()
 _isActive ($usr_id)
 getOnlineUsers ()
 validate ()
 deleteRooms ($a_ids)
 delete ($a_id, $a_owner=0)
 rename ()
 lookupRoomId ()
 add ()
 getInternalName ()
 getRooms ()
 getRoomsOfObject ()
 getAllRoomsOfObject ()
 getAllRooms ()
 checkWriteAccess ()
 __getCountLines ()
 __deleteFirstLine ()
 __addLine ($message)
 __read ()
 _unkick ($a_usr_id)

Data Fields

 $ilias
 $lng
 $error_msg
 $ref_id
 $owner_id
 $room_id
 $guests
 $title
 $user_id

Detailed Description

Definition at line 33 of file class.ilChatRoom.php.


Member Function Documentation

ilChatRoom::__addLine ( message  ) 

Definition at line 589 of file class.ilChatRoom.php.

References $query, $res, getObjId(), and getRoomId().

Referenced by appendMessageToDb().

        {
                $query = "INSERT INTO chat_room_messages ".
                        "VALUES('0','".$this->getObjId()."','".$this->getRoomId()."','".addslashes($message)."',now())";
                
                $res = $this->ilias->db->query($query);

                $this->chat_record = new ilChatRecording($this->getObjId());
                $this->chat_record->setRoomId($this->getRoomId());
                if ($this->chat_record->isRecording())
                {
                        $query = "INSERT INTO chat_record_data VALUES (
                                                '0', 
                                                '" . $this->chat_record->getRecordId() . "', 
                                                '" . ilUtil::addslashes($message) . "', 
                                                '" . time() . "')";

                        $res = $this->ilias->db->query($query);
                }

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilChatRoom::__deleteFirstLine (  ) 

Definition at line 568 of file class.ilChatRoom.php.

References $query, $res, and $row.

Referenced by appendMessageToDb().

        {
                $query = "SELECT entry_id, MIN(commit_timestamp) as last_comm FROM chat_room_messages ".
                        "WHERE chat_id = '".$this->getObjId()."' ".
                        "AND room_id = '".$this->getRoomId()."' ".
                        "GROUP BY null";

                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $entry_id = $row->entry_id;
                }
                if($entry_id)
                {
                        $query = "DELETE FROM chat_room_messages ".
                                "WHERE entry_id = '".$entry_id."'";
                        
                        $res = $this->ilias->db->query($query);
                }
                return true;
        }

Here is the caller graph for this function:

ilChatRoom::__getCountLines (  ) 

Definition at line 555 of file class.ilChatRoom.php.

References $query, $res, and $row.

Referenced by appendMessageToDb().

        {
                $query = "SELECT COUNT(entry_id) as number_lines FROM chat_room_messages ".
                        "WHERE chat_id = '".$this->getObjId()."' ".
                        "AND room_id = '".$this->getRoomId()."'";

                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        return $row->number_lines;
                }
                return 0;
        }

Here is the caller graph for this function:

ilChatRoom::__read (  ) 

Definition at line 613 of file class.ilChatRoom.php.

References $query, $res, $row, setOwnerId(), and setTitle().

Referenced by setRoomId().

        {
                $this->guests = array();

                $query = "SELECT * FROM chat_rooms ".
                        "WHERE room_id = '".$this->getRoomId()."'";

                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $this->setTitle($row->title);
                        $this->setOwnerId($row->owner);
                }

                $query = "SELECT * FROM chat_invitations ".
                        "WHERE room_id = '".$this->getRoomId()."'";

                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $this->guests[] = $row->guest_id;
                }
                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilChatRoom::_getCountActiveUsers ( chat_id,
room_id = 0 
)

Definition at line 277 of file class.ilChatRoom.php.

References $query, and $res.

Referenced by ilObjChatListGUI::getProperties(), and ilObjChatGUI::viewObject().

        {
                global $ilDB;

                $query = "SELECT * FROM chat_user ".
                        "WHERE chat_id = '".$chat_id."' ".
                        "AND room_id = '".$room_id."' ".
                        "AND last_conn_timestamp > ".time()." - 40";
                $res = $ilDB->query($query);

                return $res->numRows();
        }

Here is the caller graph for this function:

ilChatRoom::_isActive ( usr_id  ) 

Definition at line 306 of file class.ilChatRoom.php.

References $query, $res, and $row.

Referenced by ilPersonalDesktopGUI::__showActiveChatsOfUser().

        {
                global $ilDB;

                $query = "SELECT * FROM chat_user ".
                        "WHERE room_id = 0 ".
                        "AND usr_id = '".(int) $usr_id."' ".
                        "AND last_conn_timestamp > ".time()." - 40";
                
                $res = $ilDB->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        return $row->chat_id;
                }
                return false;
        }

Here is the caller graph for this function:

ilChatRoom::_unkick ( a_usr_id  ) 

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

Referenced by ilStartUpGUI::showLogin().

        {
                global $ilDB;

                $ilDB->query("UPDATE chat_user SET kicked = 0 WHERE usr_id = '".$a_usr_id."'");

                return true;
        }

Here is the caller graph for this function:

ilChatRoom::add (  ) 

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

References $id, $query, $res, and getTitle().

        {
                $query = "INSERT INTO chat_rooms ".
                        "SET title = '".ilUtil::prepareDBString($this->getTitle())."', ".
                        "chat_id = '".$this->getObjId()."', ".
                        "owner = '".$this->getOwnerId()."'";

                $res = $this->ilias->db->query($query);


                return ($id = $this->ilias->db->getLastInsertId()) ? $id : false;
        }

Here is the call graph for this function:

ilChatRoom::appendMessageToDb ( message  ) 

Definition at line 178 of file class.ilChatRoom.php.

References __addLine(), __deleteFirstLine(), and __getCountLines().

        {
                if($this->__getCountLines() >= MAX_LINES)
                {
                        $this->__deleteFirstLine();
                }
                $this->__addLine($message);

                return true;
        }

Here is the call graph for this function:

ilChatRoom::checkAccess (  ) 

Definition at line 147 of file class.ilChatRoom.php.

References getRoomId(), getUserId(), isInvited(), isOwner(), and setRoomId().

        {
                if($this->getRoomId())
                {
                        if(!$this->isInvited($this->getUserId()) and !$this->isOwner())
                        {
                                $this->setRoomId(0);
                                return false;
                        }
                }
                return true;
        }

Here is the call graph for this function:

ilChatRoom::checkWriteAccess (  ) 

Definition at line 533 of file class.ilChatRoom.php.

References getOwnerId(), getRoomId(), getUserId(), isInvited(), and isKicked().

        {
                if($this->isKicked($this->getUserId()))
                {
                        return false;
                }
                if(!$this->getRoomId())
                {
                        return true;
                }
                if($this->getUserId() == $this->getOwnerId())
                {
                        return true;
                }
                if($this->isInvited($this->getUserId()))
                {
                        return true;
                }
                return false;
        }

Here is the call graph for this function:

ilChatRoom::delete ( a_id,
a_owner = 0 
)

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

References $data, $query, and $res.

        {
                // DELETE ROOM
                $query = "DELETE FROM chat_rooms WHERE ".
                        "room_id = '".$a_id."'";
                if ($a_owner > 0)
                {
                        " AND owner = '".$a_owner."'";
                }
                $res = $this->ilias->db->query($query);

                // DELETE INVITATIONS
                $query = "DELETE FROM chat_invitations WHERE ".
                        "room_id = '".$a_id."'";
                $res = $this->ilias->db->query($query);

                // DELETE MESSAGES
                $query = "DELETE FROM chat_room_messages WHERE ".
                        "room_id = '".$a_id."'";
                $res = $this->ilias->db->query($query);

                // DELETE USER_DATA
                $query = "DELETE FROM chat_user WHERE ".
                        "room_id = '".$a_id."'";
                if ($a_owner > 0)
                {
                        " AND owner = '".$a_owner."'";
                }
                $res = $this->ilias->db->query($query);
                        
                // AND ALL RECORDINGS
                $query = "SELECT record_id FROM chat_records WHERE 
                                        room_id = '".$a_id."'";
                $res = $this->ilias->db->query($query);
                if (DB::isError($res)) die("ilObjChat::delete(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
                if (($num = $res->numRows()) > 0)
                {
                        for ($i = 0; $i < $num; $i++)
                        {
                                $data = $res->fetchRow(DB_FETCHMODE_ASSOC);
                                $this->ilias->db->query("DELETE FROM chat_record_data WHERE record_id = '" . $data["record_id"] . "'");
                        }
                        
                }
                $query = "DELETE FROM chat_records WHERE 
                                        room_id = '".$a_id."'";
                $res = $this->ilias->db->query($query);

                return true;
        }

ilChatRoom::deleteAllMessages (  ) 

Definition at line 202 of file class.ilChatRoom.php.

References $query, and $res.

        {
                $query = "DELETE FROM chat_room_messages ".
                        "WHERE chat_id = '".$this->getObjId()."' ".
                        "AND room_id = '".$this->getRoomId()."'";

                $res = $this->ilias->db->query($query);

                return true;
        }

ilChatRoom::deleteRooms ( a_ids  ) 

Definition at line 343 of file class.ilChatRoom.php.

References $id.

        {
                if(!is_array($a_ids))
                {
                        $this->ilias->raiseError("ARRAY REQUIRED",$this->ilias->error_obj->FATAL);
                }
                foreach($a_ids as $id)
                {
                        $this->delete($id);
                }
                return true;
        }

ilChatRoom::drop ( a_id  ) 

Definition at line 138 of file class.ilChatRoom.php.

References $query, and $res.

        {
                $query = "DELETE FROM chat_invitations ".
                        "WHERE room_id = '".$this->getRoomId()."' ".
                        "AND guest_id = '".$a_id."'";

                $res = $this->ilias->db->query($query);
        }

ilChatRoom::getActiveUsers (  ) 

Definition at line 291 of file class.ilChatRoom.php.

References $query, $res, and $row.

        {
                $query = "SELECT * FROM chat_user ".
                        "WHERE chat_id = '".$this->getObjId()."' ".
                        "AND room_id = '".$this->room_id."' ".
                        "AND last_conn_timestamp > ".time()." - 40";
                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $usr_ids[] = $row->usr_id;
                }
                return $usr_ids ? $usr_ids : array();
        }

ilChatRoom::getAllMessages (  ) 

Definition at line 188 of file class.ilChatRoom.php.

References $data, $query, $res, and $row.

        {
                $query = "SELECT message FROM chat_room_messages ".
                        "WHERE chat_id = '".$this->getObjId()."' ".
                        "AND room_id = '".$this->getRoomId()."' ".
                        "ORDER BY commit_timestamp ";

                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $data[] = $row->message;
                }
                return is_array($data) ? implode("<br />",$data) : "";
        }

ilChatRoom::getAllRooms (  ) 

Definition at line 510 of file class.ilChatRoom.php.

References $chat_id, $obj_id, and ilUtil::_getObjectsByOperations().

        {
                global $ilObjDataCache,$ilUser;

                $obj_ids = array();
                $unique_chats = array();
                foreach(ilUtil::_getObjectsByOperations("chat","read",$ilUser->getId(),-1) as $chat_id)
                {
                        $obj_id = $ilObjDataCache->lookupObjId($chat_id);
                        if(!in_array($obj_id,$obj_ids))
                        {
                                $unique_data['child'] = $chat_id;
                                $unique_data['title'] = $ilObjDataCache->lookupTitle($obj_id);
                                $unique_data['obj_id'] = $obj_id;
                                $unique_data['ref_id'] = $chat_id;
                                
                                $unique_chats[] = $unique_data;
                                $obj_ids[] = $obj_id;
                        }
                }
                return $unique_chats ? $unique_chats : array();
        }

Here is the call graph for this function:

ilChatRoom::getAllRoomsOfObject (  ) 

Definition at line 494 of file class.ilChatRoom.php.

References $data, $query, $res, and $row.

        {
                $query = "SELECT * FROM chat_rooms ".
                        "WHERE chat_id = '".$this->getObjId()."'";

                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $data[$row->room_id]["room_id"] = $row->room_id;
                        $data[$row->room_id]["owner"] = $row->owner;
                        $data[$row->room_id]["title"] = $row->title;
                        $data[$row->room_id]["owner"] = $row->owner;
                }
                return $data ? $data : array();
        }               

ilChatRoom::getCountActiveUser ( chat_id,
room_id 
)

Definition at line 266 of file class.ilChatRoom.php.

References $query, and $res.

        {
                $query = "SELECT * FROM chat_user ".
                        "WHERE chat_id = '".$chat_id."' ".
                        "AND room_id = '".$room_id."' ".
                        "AND last_conn_timestamp > ".time()." - 40";
                $res = $this->ilias->db->query($query);

                return $res->numRows();
        }

ilChatRoom::getErrorMessage (  ) 

Definition at line 69 of file class.ilChatRoom.php.

        {
                return $this->error_msg;
        }

ilChatRoom::getGuests (  ) 

Definition at line 117 of file class.ilChatRoom.php.

        {
                return $this->guests ? $this->guests : array();
        }

ilChatRoom::getInternalName (  ) 

Definition at line 446 of file class.ilChatRoom.php.

References getObjId(), and getRoomId().

        {
                if(!$this->getRoomId())
                {
                        return $this->getObjId();
                }
                else
                {
                        return $this->getObjId()."_".$this->getRoomId();
                }
        }

Here is the call graph for this function:

ilChatRoom::getName (  ) 

Definition at line 98 of file class.ilChatRoom.php.

References getObjId(), and getRoomId().

        {
                if(!$this->getRoomId())
                {
                        return $this->getObjId();
                }
                else
                {
                        // GET NAME OF PRIVATE CHATROOM
                }
        }

Here is the call graph for this function:

ilChatRoom::getObjId (  ) 

Definition at line 85 of file class.ilChatRoom.php.

Referenced by __addLine(), getInternalName(), and getName().

        {
                return $this->obj_id;
        }

Here is the caller graph for this function:

ilChatRoom::getOnlineUsers (  ) 

Definition at line 323 of file class.ilChatRoom.php.

References ilUtil::getUsersOnline().

        {
                // TODO: CHECK INVITABLE AND ALLOW MESSAGES 
                return ilUtil::getUsersOnline();
        }

Here is the call graph for this function:

ilChatRoom::getOwnerId (  ) 

Definition at line 93 of file class.ilChatRoom.php.

Referenced by checkWriteAccess(), isOwner(), and validate().

        {
                return $this->owner_id;
        }

Here is the caller graph for this function:

ilChatRoom::getRoomId (  ) 

Definition at line 81 of file class.ilChatRoom.php.

Referenced by __addLine(), checkAccess(), checkWriteAccess(), getInternalName(), and getName().

        {
                return $this->room_id;
        }

Here is the caller graph for this function:

ilChatRoom::getRooms (  ) 

Definition at line 457 of file class.ilChatRoom.php.

References $data, $query, $res, $row, and $tree.

        {
                global $tree;

                $query = "SELECT DISTINCT(cr.room_id) as room_id,owner,title,chat_id FROM chat_rooms AS cr NATURAL LEFT JOIN chat_invitations ".
                        "WHERE (owner = '".$this->getUserId()."') ".
                        "OR (guest_id = '".$this->getUserId()."')";

                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $data[$row->room_id]["room_id"] = $row->room_id;
                        $data[$row->room_id]["chat_id"] = $row->chat_id;
                        $data[$row->room_id]["owner"] = $row->owner;
                        $data[$row->room_id]["title"] = $row->title;
                }
                return $data ? $data : array();
        }

ilChatRoom::getRoomsOfObject (  ) 

Definition at line 478 of file class.ilChatRoom.php.

References $data, $query, $res, and $row.

        {
                $query = "SELECT * FROM chat_rooms ".
                        "WHERE chat_id = '".$this->getObjId()."' ".
                        "AND owner = '".$this->getUserId()."'";

                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        $data[$row->room_id]["room_id"] = $row->room_id;
                        $data[$row->room_id]["owner"] = $row->owner;
                        $data[$row->room_id]["title"] = $row->title;
                        $data[$row->room_id]["owner"] = $row->owner;
                }
                return $data ? $data : array();
        }

ilChatRoom::getTitle (  ) 

Definition at line 113 of file class.ilChatRoom.php.

Referenced by add(), lookupRoomId(), rename(), and validate().

        {
                return $this->title;
        }

Here is the caller graph for this function:

ilChatRoom::getUserId (  ) 

Definition at line 125 of file class.ilChatRoom.php.

Referenced by checkAccess(), checkWriteAccess(), and isOwner().

        {
                return $this->user_id;
        }

Here is the caller graph for this function:

ilChatRoom::ilChatRoom ( a_id  ) 

Constructor public.

Parameters:
integer reference_id or object_id
boolean treat the id as reference_id (true) or object_id (false)

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

References $_SESSION, $ilias, and $lng.

        {
                global $ilias,$lng;

                define(MAX_LINES,1000);

                $this->ilias =& $ilias;
                $this->lng =& $lng;

                $this->obj_id = $a_id;
                $this->owner_id = $a_owner_id;
                $this->user_id = $_SESSION["AccountId"];
        }

ilChatRoom::invite ( a_id  ) 

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

References $query, and $res.

        {
                $query = "REPLACE INTO chat_invitations ".
                        "SET room_id = '".$this->getRoomId()."',".
                        "guest_id = '".$a_id."'";

                $res = $this->ilias->db->query($query);
        }

ilChatRoom::isInvited ( a_id  ) 

Definition at line 160 of file class.ilChatRoom.php.

References $query, and $res.

Referenced by checkAccess(), and checkWriteAccess().

        {
                $query = "SELECT * FROM chat_invitations AS ci JOIN chat_rooms AS ca ".
                        "WHERE ci.room_id = ca.room_id ".
                        "AND ci.room_id = '".$this->getRoomId()."' ".
                        "AND owner = '".$this->getOwnerId()."' ".
                        "AND ci.guest_id = '".$a_id."'";

                $res = $this->ilias->db->query($query);
                
                return $res->numRows() ? true : false;
        }

Here is the caller graph for this function:

ilChatRoom::isKicked ( a_usr_id  ) 

Definition at line 253 of file class.ilChatRoom.php.

References $query, and $res.

Referenced by checkWriteAccess().

        {
                $query = "SELECT * FROM chat_user ".
                        "WHERE kicked = 1 ".
                        "AND usr_id = '".$a_usr_id."' ".
                        "AND chat_id = '".$this->getObjId()."'";

                $res = $this->ilias->db->query($query);

                return $res->numRows() ? true : false;
        }

Here is the caller graph for this function:

ilChatRoom::isOwner (  ) 

Definition at line 172 of file class.ilChatRoom.php.

References getOwnerId(), and getUserId().

Referenced by checkAccess().

        {
                return $this->getOwnerId() == $this->getUserId();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilChatRoom::lookupRoomId (  ) 

Definition at line 418 of file class.ilChatRoom.php.

References $query, $res, $row, and getTitle().

        {
                $query = "SELECT * FROM chat_rooms ".
                        "WHERE title = '".ilUtil::prepareDBString($this->getTitle())."' ".
                        "AND chat_id = '".$this->getObjId()."' ".
                        "AND owner = '".$this->getOwnerId()."'";

                $res = $this->ilias->db->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        return $row->room_id;
                }
                return false;
        }

Here is the call graph for this function:

ilChatRoom::rename (  ) 

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

References $query, $res, and getTitle().

        {
                $query = "UPDATE chat_rooms ".
                        "SET title = '".ilUtil::prepareDBString($this->getTitle())."' ".
                        "WHERE room_id = '".$this->getRoomId()."'";

                $res = $this->ilias->db->query($query);

                return true;
        }

Here is the call graph for this function:

ilChatRoom::setKicked ( a_usr_id  ) 

Definition at line 229 of file class.ilChatRoom.php.

References $query.

        {
                $query = "UPDATE chat_user SET kicked = '1' ".
                        "WHERE usr_id = '".$a_usr_id."' ".
                        "AND chat_id = '".$this->getObjId()."' ".
                        "AND room_id = '0'";

                $this->ilias->db->query($query);

                return true;
        }

ilChatRoom::setOwnerId ( a_id  ) 

Definition at line 89 of file class.ilChatRoom.php.

Referenced by __read().

        {
                $this->owner_id = $a_id;
        }

Here is the caller graph for this function:

ilChatRoom::setRoomId ( a_id  ) 

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

References __read().

Referenced by checkAccess().

        {
                $this->room_id = $a_id;
                
                // READ DATA OF ROOM
                $this->__read();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilChatRoom::setTitle ( a_title  ) 

Definition at line 109 of file class.ilChatRoom.php.

Referenced by __read().

        {
                $this->title = $a_title;
        }

Here is the caller graph for this function:

ilChatRoom::setUnkicked ( a_usr_id  ) 

Definition at line 241 of file class.ilChatRoom.php.

References $query.

        {
                $query = "UPDATE chat_user SET kicked = '0' ".
                        "WHERE usr_id = '".$a_usr_id."' ".
                        "AND chat_id = '".$this->getObjId()."' ".
                        "AND room_id = '0'";

                $this->ilias->db->query($query);

                return true;
        }

ilChatRoom::setUserId ( a_id  ) 

Definition at line 121 of file class.ilChatRoom.php.

        {
                $this->user_id = $a_id;
        }

ilChatRoom::updateLastVisit (  ) 

Definition at line 213 of file class.ilChatRoom.php.

References $query, and $res.

        {
                // CHECK IF OLD DATA EXISTS
                $query = "DELETE FROM chat_user ".
                        "WHERE usr_id = '".$this->getUserId()."'";
                $res = $this->ilias->db->query($query);

                $query = "INSERT INTO chat_user ".
                        "SET usr_id = '".$this->getUserId()."', ".
                        "room_id = '".$this->getRoomId()."', ".
                        "chat_id = '".$this->getObjId()."', ".
                        "last_conn_timestamp = '".time()."'";
                $res = $this->ilias->db->query($query);
                return true;
        }

ilChatRoom::validate (  ) 

Definition at line 329 of file class.ilChatRoom.php.

References getOwnerId(), and getTitle().

        {
                $this->error_msg = "";

                if(!$this->getTitle())
                {
                        $this->error_msg .= $this->lng->txt("chat_title_missing");
                }
                if(!$this->getOwnerId())
                {
                        $this->ilias->raiseError("MISSING OWNER ID",$this->ilias->error_obj->FATAL);
                }
                return $this->error_msg ? false : true;
        }

Here is the call graph for this function:


Field Documentation

ilChatRoom::$error_msg

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

ilChatRoom::$guests

Definition at line 43 of file class.ilChatRoom.php.

ilChatRoom::$ilias

Definition at line 35 of file class.ilChatRoom.php.

Referenced by ilChatRoom().

ilChatRoom::$lng

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

Referenced by ilChatRoom().

ilChatRoom::$owner_id

Definition at line 41 of file class.ilChatRoom.php.

ilChatRoom::$ref_id

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

ilChatRoom::$room_id

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

ilChatRoom::$title

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

ilChatRoom::$user_id

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


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