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();
 
   57                throw new Exception(
'unkown room');
 
   58            } elseif (!$room->isSubscribed($chat_user->getUserId())) {
 
   59                throw new Exception(
'not subscribed');
 
   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!';
 
  108            throw new Exception($msg);
 
  116        $scope            = $room->getRoomId();
 
  126                    'Eine neue Datei mit dem Link ' .
 
  127                    $ilCtrl->getLinkTarget($this->gui, 
'uploadFile-deliverFile') .
 
  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';
 
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
Class ilChatroomGUIHandler.
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
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 getDataDir()
get data directory (outside webspace)
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.
catch(Exception $e) $message
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file