15 throw new Exception(
'METHOD_NOT_IN_USE', 1456435027);
41 $file = $_FILES[
'file_to_upload'][
'tmp_name'];
42 $filename = $_FILES[
'file_to_upload'][
'name'];
43 $type = $_FILES[
'file_to_upload'][
'type'];
49 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
50 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
54 $user_id = $chat_user->getUserId();
58 } elseif (!$room->isSubscribed($chat_user->getUserId())) {
87 case !file_exists(
$path):
90 $msg =
'Error: Upload path could not be created!';
96 $msg =
'Error: Upload path is not a directory!';
99 case !is_readable(
$path):
101 $msg =
'Error: Upload path is not readable!';
116 $scope = $room->getRoomId();
126 'Eine neue Datei mit dem Link ' .
127 $ilCtrl->getLinkTarget($this->gui,
'uploadFile-deliverFile') .
136 $query = http_build_query($params);
138 $connector = $this->gui->getConnector();
140 $responseObject = json_decode(
$response);
153 $data =
new stdClass();
155 $data->user = $this->gui->object->getPersonalInformation($chat_user);
156 $data->message = $messageString;
158 $data->type =
'message';
static makeDirParents($a_dir)
Create a new directory and all parent directories.
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
executeDefault($requestedMethod)
Default execute method.
catch(Exception $e) $message
Class ilChatroomGUIHandler.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
buildMessage($messageString, $params, ilChatroomUser $chat_user)
Create styles array
The data for the language used.
checkUploadPath($path)
Checks if given upload path exists, is readable or can be created.
displayLinkToUploadedFile($room, $chat_user)
static getDataDir()
get data directory (outside webspace)
getUploadPath()
Returns upload path.
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
Class ilChatroomUploadFileGUI Provides methods to upload a file.
uploadFile()
Saves file, fetched from $_FILES to specified upload path.