16                throw new Exception(
'METHOD_NOT_IN_USE', 1456435027);
 
   38                        $ilCtrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", ROOT_FOLDER_ID);
 
   39                        $ilCtrl->redirectByClass(
"ilrepositorygui", 
"");
 
   49                $file     = $_FILES[
'file_to_upload'][
'tmp_name'];
 
   50                $filename = $_FILES[
'file_to_upload'][
'name'];
 
   51                $type     = $_FILES[
'file_to_upload'][
'type'];
 
   58                        require_once 
'Modules/Chatroom/classes/class.ilChatroom.php';
 
   59                        require_once 
'Modules/Chatroom/classes/class.ilChatroomUser.php';
 
   63                        $user_id   = $chat_user->getUserId();
 
   67                                throw new Exception(
'unkown room');
 
   69                        else if(!$room->isSubscribed($chat_user->getUserId()))
 
   71                                throw new Exception(
'not subscribed');
 
   74                        $room->saveFileUploadToDb($user_id, 
$filename, $type);
 
  101                        case !file_exists(
$path):
 
  105                                        $msg = 
'Error: Upload path could not be created!';
 
  111                                $msg = 
'Error: Upload path is not a directory!';
 
  114                        case !is_readable(
$path):
 
  116                                $msg = 
'Error: Upload path is not readable!';
 
  124                        throw new Exception($msg);
 
  132                $scope            = $room->getRoomId();
 
  142                                        'Eine neue Datei mit dem Link ' .
 
  143                                        $ilCtrl->getLinkTarget($this->gui, 
'uploadFile-deliverFile') .
 
  152                $connector      = $this->gui->getConnector();
 
  153                $response       = $connector->post($scope, 
$query);
 
  154                $responseObject = json_decode($response);
 
  167                $data = 
new stdClass();
 
  169                $data->user       = $this->gui->object->getPersonalInformation($chat_user);
 
  170                $data->message    = $messageString;
 
  172                $data->type       = 
'message';
 
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
Class ilChatroomGUIHandler.
Class ilChatroomUploadFileGUI Provides methods to upload a file.
executeDefault($requestedMethod)
Default execute method.
displayLinkToUploadedFile($room, $chat_user)
getUploadPath()
Returns upload path.
checkUploadPath($path)
Checks if given upload path exists, is readable or can be created.
uploadFile()
Saves file, fetched from $_FILES to specified upload path.
buildMessage($messageString, $params, ilChatroomUser $chat_user)
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
static getDataDir()
get data directory (outside webspace)
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static makeDirParents($a_dir)
Create a new directory and all parent directories.
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file