◆ __construct()
ilMailFolderGUI::__construct |
( |
| ) |
|
Definition at line 37 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $ilCtrl, $ilUser, $lng, and $tpl.
45 $this->umail =
new ilMail($ilUser->getId());
46 $this->mbox =
new ilMailBox($ilUser->getId());
50 $_GET[
'mobj_id'] = $_POST[
'mobj_id'];
53 if(!(
int)
$_GET[
'mobj_id'])
55 $_GET[
'mobj_id'] = $this->mbox->getInboxFolder();
58 $ilCtrl->saveParameter($this,
'mobj_id');
59 $ilCtrl->setParameter($this,
'mobj_id',
$_GET[
'mobj_id']);
Class Mail this class handles base functions for mail handling.
◆ add()
Definition at line 142 of file class.ilMailFolderGUI.php.
References $_GET, $ilUser, $lng, and ilUtil\sendInfo().
146 if(
$_GET[
"mail_id"] !=
"")
148 if (is_array($mail_data = $this->umail->getMail(
$_GET[
"mail_id"])))
150 require_once
"Services/Contact/classes/class.ilAddressbook.php";
153 $tmp_user =
new ilObjUser($mail_data[
"sender_id"]);
154 if ($abook->checkEntryByLogin($tmp_user->getLogin()) > 0)
160 $abook->addEntry($tmp_user->getLogin(),
161 $tmp_user->getFirstname(),
162 $tmp_user->getLastname(),
163 $tmp_user->getEmail());
Mail Box class Base class for creating and handling mail boxes.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
◆ addSubfolderCommands()
ilMailFolderGUI::addSubfolderCommands |
( |
|
$check_uf = false | ) |
|
Definition at line 227 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_REQUEST, $ilUser, $si, ilSession\get(), ilUtil\sendFailure(), ilTree\setTableNames(), and ilMailGUI\VIEWMODE_SESSION_KEY.
233 $ilToolbar->addSeparator();
236 $ilToolbar->addButton($this->lng->txt(
'mail_add_subfolder'), $this->ctrl->getLinkTarget($this,
'addSubFolder'));
238 if($check_uf ==
true)
240 $ilToolbar->addButton($this->lng->txt(
'rename'), $this->ctrl->getLinkTarget($this,
'renameSubFolder'));
241 $ilToolbar->addButton($this->lng->txt(
'delete'), $this->ctrl->getLinkTarget($this,
'deleteSubFolder'));
static get($a_var)
Get a value.
const VIEWMODE_SESSION_KEY
◆ applyFilter()
ilMailFolderGUI::applyFilter |
( |
| ) |
|
Definition at line 1059 of file class.ilMailFolderGUI.php.
References $_GET.
1061 $sentFolderId = $this->mbox->getSentFolder();
1062 $draftsFolderId = $this->mbox->getDraftsFolder();
1064 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
1065 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
1066 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
1069 $table->isSentFolder($isSentFolder)
1070 ->isDraftFolder($isDraftFolder)
1071 ->isTrashFolder($isTrashFolder)
1073 $table->resetOffset();
1074 $table->writeFilterToSession();
1076 $this->showFolder();
◆ askForEmptyTrash()
ilMailFolderGUI::askForEmptyTrash |
( |
| ) |
|
confirmation message for empty trash action
Definition at line 192 of file class.ilMailFolderGUI.php.
References $_GET.
194 if($this->umail->countMailsOfFolder((
int)
$_GET[
'mobj_id']))
196 $this->askForConfirmation =
true;
◆ cancelDeleteMails()
ilMailFolderGUI::cancelDeleteMails |
( |
| ) |
|
Definition at line 692 of file class.ilMailFolderGUI.php.
References $_GET, $_SESSION, $file, $ilUser, $tpl, ilFrameTargetInfo\_getFrame(), ilObjUser\_lookupPref(), ilAccessKey\DELETE, ilDatePresentation\formatDate(), ilAccessKey\FORWARD_MAIL, ilSession\get(), ilUtil\getImagePath(), ilObjectFactory\getInstanceByObjId(), ilUtil\htmlencodePlainString(), IL_CAL_DATETIME, ilUtil\img(), ilAccessKey\REPLY, ilCustomInputGUI\setHtml(), and ilMailGUI\VIEWMODE_SESSION_KEY.
694 $this->ctrl->redirect($this);
◆ cancelEmptyTrash()
ilMailFolderGUI::cancelEmptyTrash |
( |
| ) |
|
◆ changeFolder()
ilMailFolderGUI::changeFolder |
( |
| ) |
|
Definition at line 560 of file class.ilMailFolderGUI.php.
References $_GET, and ilUtil\sendInfo().
562 switch ($this->current_selected_cmd)
565 if(!(
int)
$_GET[
"mail_id"] || !(
int)$this->current_selected_cmd)
568 return $this->showMail();
571 if ($this->umail->moveMailsToFolder(array(
$_GET[
"mail_id"]), $this->current_selected_cmd))
574 $this->ctrl->redirectByClass(
"ilMailGUI");
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
◆ confirmDeleteMails()
ilMailFolderGUI::confirmDeleteMails |
( |
| ) |
|
Definition at line 669 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, and ilUtil\sendInfo().
671 if($this->mbox->getTrashFolder() ==
$_GET[
'mobj_id'])
673 $_POST[
'mail_id'] = $mail_ids = explode(
',',
$_GET[
'mail_id']);
674 if(!is_array($mail_ids))
678 else if($this->umail->deleteMails($mail_ids))
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
◆ deleteSubfolder()
ilMailFolderGUI::deleteSubfolder |
( |
|
$a_show_confirm = true | ) |
|
Definition at line 403 of file class.ilMailFolderGUI.php.
407 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
411 $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this,
"showFolder"));
412 $oConfirmationGUI->setHeaderText($this->lng->txt(
"mail_sure_delete_folder"));
413 $oConfirmationGUI->setCancel($this->lng->txt(
"cancel"),
"showFolder");
414 $oConfirmationGUI->setConfirm($this->lng->txt(
"confirm"),
"performDeleteSubfolder");
415 $this->tpl->setVariable(
'CONFIRMATION',$oConfirmationGUI->getHTML());
417 return $this->showFolder(
true);
420 return $this->showFolder(
false);
Confirmation screen class.
◆ deliverFile()
ilMailFolderGUI::deliverFile |
( |
| ) |
|
Definition at line 1016 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_SESSION, $file, $filename, ilUtil\deliverFile(), and ilUtil\sendInfo().
1028 :
$_GET[
"filename"]));
1033 require_once
"./Services/Mail/classes/class.ilFileDataMail.php";
1039 if(!is_array(
$file = $mfile->getAttachmentPathByMD5Filename(
$filename,
$_GET[
'mail_id'])))
This class handles all operations on files (attachments) in directory ilias_data/mail.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
◆ editFolder()
ilMailFolderGUI::editFolder |
( |
| ) |
|
Definition at line 588 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, and ilUtil\sendInfo().
590 switch ($this->current_selected_cmd)
592 case 'markMailsRead':
593 if(is_array(
$_POST[
"mail_id"]))
595 $this->umail->markRead(
$_POST[
"mail_id"]);
602 case 'markMailsUnread':
603 if(is_array(
$_POST[
"mail_id"]))
605 $this->umail->markUnread(
$_POST[
"mail_id"]);
615 if($this->mbox->getTrashFolder() ==
$_GET[
"mobj_id"])
617 if(!is_array(
$_POST[
"mail_id"]))
620 $this->errorDelete =
true;
626 if(!is_array(
$_POST[
"mail_id"]))
630 else if($this->umail->moveMailsToFolder(
$_POST[
"mail_id"], $this->mbox->getTrashFolder()))
643 $this->ctrl->setParameterByClass(
"ilmailoptionsgui",
"cmd",
"add");
644 $this->ctrl->redirectByClass(
"ilmailoptionsgui");
648 if(!is_array(
$_POST[
"mail_id"]))
652 else if($this->umail->moveMailsToFolder(
$_POST[
"mail_id"],$this->current_selected_cmd))
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
◆ executeCommand()
ilMailFolderGUI::executeCommand |
( |
| ) |
|
Definition at line 63 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $cmd, and $ret.
67 $_GET[
"cmd"] =
'editFolder';
70 $this->current_select_cmd =
$_POST[
'select_cmd'];
71 $this->current_selected_cmd =
$_POST[
'selected_cmd'];
73 else if (
$_POST[
"select_cmd2"])
76 $_GET[
"cmd"] =
'editFolder';
77 $this->current_select_cmd =
$_POST[
'select_cmd2'];
78 $this->current_selected_cmd =
$_POST[
'selected_cmd2'];
84 if (
$_GET[
'selected_cmd'] ==
"deleteMails" &&
$_GET[
"mail_id"])
86 $_GET[
"cmd"] =
"editFolder";
87 $this->current_selected_cmd =
"deleteMails";
94 $cmd = $this->ctrl->getCmd();
95 if(
$cmd ==
'changeFolder' &&
96 is_numeric(
$_POST[
'selected_cmd']) &&
99 $this->current_selected_cmd = (int)
$_POST[
'selected_cmd'];
102 $forward_class = $this->ctrl->getNextClass($this);
103 switch($forward_class)
105 case 'ilmailaddressbookgui':
106 include_once
'Services/Contact/classes/class.ilMailAddressbookGUI.php';
111 case 'ilmailoptionsgui':
112 include_once
'Services/Mail/classes/class.ilMailOptionsGUI.php';
117 case 'ilpublicuserprofilegui':
118 include_once(
"Services/User/classes/class.ilPublicUserProfileGUI.php");
119 $this->tpl->setTitle($this->lng->txt(
"mail"));
120 $this->ctrl->saveParameter($this,
"mail_id");
122 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this,
"showMail"));
123 $ret = $this->ctrl->forwardCommand($profile_gui);
126 $this->tpl->setContent(
$ret);
132 if (!(
$cmd = $this->ctrl->getCmd()))
GUI class for public user profile presentation.
◆ performAddSubFolder()
ilMailFolderGUI::performAddSubFolder |
( |
| ) |
|
Definition at line 441 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_SESSION, $ilCtrl, $tpl, ilSession\get(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilUtil\stripSlashes(), and ilMailGUI\VIEWMODE_SESSION_KEY.
445 if (empty(
$_POST[
'subfolder_title']))
448 return $this->addSubFolder();
455 $this->ctrl->setParameterByClass(
"ilMailGUI",
'mobj_id', $mobj_id);
456 $this->ctrl->redirectByClass(
"ilMailGUI");
461 return $this->addSubFolder();
static get($a_var)
Get a value.
const VIEWMODE_SESSION_KEY
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ performDeleteSubFolder()
ilMailFolderGUI::performDeleteSubFolder |
( |
| ) |
|
Definition at line 423 of file class.ilMailFolderGUI.php.
References $_GET, ilUtil\sendFailure(), and ilUtil\sendInfo().
425 $new_parent = $this->mbox->getParentFolderId(
$_GET[
"mobj_id"]);
427 if ($this->mbox->deleteFolder(
$_GET[
"mobj_id"]))
431 $this->ctrl->setParameterByClass(
"ilMailGUI",
"mobj_id", $new_parent);
432 $this->ctrl->redirectByClass(
"ilMailGUI");
437 return $this->showFolder();
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ performEmptyTrash()
ilMailFolderGUI::performEmptyTrash |
( |
| ) |
|
◆ performRenameSubFolder()
ilMailFolderGUI::performRenameSubFolder |
( |
| ) |
|
Definition at line 530 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_SESSION, ilSession\get(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilUtil\stripSlashes(), and ilMailGUI\VIEWMODE_SESSION_KEY.
534 $tmp_data = $this->mbox->getFolderData(
$_GET[
"mobj_id"]);
535 if ($tmp_data[
"title"] !=
$_POST[
"subfolder_title"])
537 if (
$_POST[
"subfolder_title"] ==
"")
540 return $this->renameSubFolder();
548 $this->ctrl->redirectByClass(
"ilMailGUI");
553 return $this->renameSubFolder();
557 return $this->showFolder();
static get($a_var)
Get a value.
const VIEWMODE_SESSION_KEY
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
◆ resetFilter()
ilMailFolderGUI::resetFilter |
( |
| ) |
|
Definition at line 1082 of file class.ilMailFolderGUI.php.
References $_GET.
1084 $sentFolderId = $this->mbox->getSentFolder();
1085 $draftsFolderId = $this->mbox->getDraftsFolder();
1087 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
1088 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
1089 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
1092 $table->isSentFolder($isSentFolder)
1093 ->isDraftFolder($isDraftFolder)
1094 ->isTrashFolder($isTrashFolder)
1096 $table->resetOffset();
1097 $table->resetFilter();
1099 $this->showFolder();
◆ showUser()
ilMailFolderGUI::showUser |
( |
| ) |
|
Definition at line 204 of file class.ilMailFolderGUI.php.
References $_GET, $ilCtrl, ilObjUser\_lookupLogin(), and ilUtil\getImagePath().
208 $this->ctrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
210 $this->tpl->setTitle($this->lng->txt(
"mail"));
213 $this->tpl->setVariable(
"TBL_TITLE", $this->lng->txt(
"profile_of").
" ".
216 $this->tpl->setVariable(
"TBL_TITLE_IMG_ALT", $this->lng->txt(
"public_profile"));
218 include_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
220 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this,
"showMail"));
221 $this->tpl->setContent($ilCtrl->getHTML($profile_gui));
GUI class for public user profile presentation.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
_lookupLogin($a_user_id)
lookup login
◆ $ctrl
ilMailFolderGUI::$ctrl = null |
|
private |
◆ $current_select_cmd
ilMailFolderGUI::$current_select_cmd |
|
private |
◆ $current_selected_cmd
ilMailFolderGUI::$current_selected_cmd |
|
private |
◆ $errorDelete
ilMailFolderGUI::$errorDelete = false |
|
private |
◆ $lng
ilMailFolderGUI::$lng = null |
|
private |
◆ $mbox
ilMailFolderGUI::$mbox = null |
◆ $tpl
ilMailFolderGUI::$tpl = null |
|
private |
◆ $umail
ilMailFolderGUI::$umail = null |
The documentation for this class was generated from the following file: