51 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", ROOT_FOLDER_ID);
52 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
62 $file = $_FILES[
'file_to_upload'][
'tmp_name'];
63 $filename = $_FILES[
'file_to_upload'][
'name'];
64 $type = $_FILES[
'file_to_upload'][
'type'];
71 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
72 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
76 $user_id = $chat_user->getUserId();
82 else if( !$room->isSubscribed( $chat_user->getUserId() ) )
87 $room->saveFileUploadToDb($user_id,
$filename, $type);
97 $scope = $room->getRoomId();
99 $params[
'public'] = 1;
107 'Eine neue Datei mit dem Link ' .
108 $ilCtrl->getLinkTarget($this->gui,
'uploadFile-deliverFile') .
111 )) , $params, $chat_user
114 $params = array_merge( $params, array(
'message' => $message) );
115 $query = http_build_query( $params );
117 $connector = $this->gui->getConnector();
118 $response = $connector->post( $scope,
$query );
119 $responseObject = json_decode( $response );
139 $data =
new stdClass();
141 $data->user = $this->gui->object->getPersonalInformation( $chat_user );
142 $data->message = $messageString;
143 $data->timestamp = date(
'c' );
144 $data->type =
'message';
145 $data->public = (int)$params[
'public'];
146 $data->recipients = $params[
'recipients'];
162 case !file_exists(
$path ):
166 $msg =
'Error: Upload path could not be created!';
170 case !is_dir(
$path ):
172 $msg =
'Error: Upload path is not a directory!';
175 case !is_readable(
$path ):
177 $msg =
'Error: Upload path is not readable!';