Public Member Functions | |
ilFileDataChat (&$chat_obj) | |
Constructor call base constructors checks if directory is writable and sets the optional obj_id. | |
addFile ($filename, $data) | |
zip () | |
getChatPath () | |
_ilFileDataChat () | |
__checkPath () | |
__createDirectory ($a_path) | |
__deleteOld () | |
Data Fields | |
$chat_obj | |
$chat_path |
Definition at line 35 of file class.ilFileDataChat.php.
ilFileDataChat::__checkPath | ( | ) |
Definition at line 103 of file class.ilFileDataChat.php.
References getChatPath().
Referenced by ilFileDataChat().
{ if(!file_exists($this->getChatPath())) { return false; } return true; }
ilFileDataChat::__createDirectory | ( | $ | a_path | ) |
Definition at line 112 of file class.ilFileDataChat.php.
References ilUtil::makeDir().
Referenced by ilFileDataChat().
{ return ilUtil::makeDir($a_path); }
ilFileDataChat::__deleteOld | ( | ) |
Definition at line 117 of file class.ilFileDataChat.php.
References $file, ilUtil::delDir(), and getChatPath().
Referenced by ilFileDataChat().
{ if(is_dir($this->getChatPath())) { $dp = opendir($this->getChatPath()); while(($file = readdir($dp)) !== false) { if($file != '.' and $file != '..') { if(filectime($this->getChatPath()."/".$file) < (time() - 60*60*24)) { ilUtil::delDir($this->getChatPath()."/".$file); } } } closedir($dp); } }
ilFileDataChat::_ilFileDataChat | ( | ) |
Definition at line 98 of file class.ilFileDataChat.php.
References ilUtil::delDir().
{ ilUtil::delDir($this->chat_path); }
ilFileDataChat::addFile | ( | $ | filename, | |
$ | data | |||
) |
ilFileDataChat::getChatPath | ( | ) |
Definition at line 92 of file class.ilFileDataChat.php.
Referenced by __checkPath(), and __deleteOld().
{
return $this->chat_path;
}
ilFileDataChat::ilFileDataChat | ( | &$ | chat_obj | ) |
Constructor call base constructors checks if directory is writable and sets the optional obj_id.
integereger | obj_id public |
Definition at line 53 of file class.ilFileDataChat.php.
References $_SESSION, $chat_obj, __checkPath(), __createDirectory(), __deleteOld(), ilUtil::delDir(), ilFileData::getPath(), and ilFileData::ilFileData().
{ parent::ilFileData(); $this->chat_obj =& $chat_obj; $this->chat_path = parent::getPath()."/chat"; if(!$this->__checkPath()) { $this->__createDirectory($this->chat_path); } $this->__deleteOld(); if(@is_dir($this->chat_path."/chatrooms_".$_SESSION["AccountId"])) { ilUtil::delDir($this->chat_path."/chatrooms_".$_SESSION["AccountId"]); } $this->__createDirectory($this->chat_path."/chatrooms_".$_SESSION["AccountId"]); }
ilFileDataChat::zip | ( | ) |
Definition at line 84 of file class.ilFileDataChat.php.
References $_SESSION.
{ ilUtil::zip($this->chat_path."/chatrooms_".$_SESSION["AccountId"], $this->chat_path."/ilias_chat.zip"); return $this->chat_path."/ilias_chat.zip"; }
ilFileDataChat::$chat_obj |
Definition at line 37 of file class.ilFileDataChat.php.
Referenced by ilFileDataChat().
ilFileDataChat::$chat_path |
Definition at line 44 of file class.ilFileDataChat.php.