◆ __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 1057 of file class.ilMailFolderGUI.php.
References $_GET.
1059 $sentFolderId = $this->mbox->getSentFolder();
1060 $draftsFolderId = $this->mbox->getDraftsFolder();
1062 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
1063 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
1064 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
1067 $table->isSentFolder($isSentFolder)
1068 ->isDraftFolder($isDraftFolder)
1069 ->isTrashFolder($isTrashFolder)
1071 $table->resetOffset();
1072 $table->writeFilterToSession();
1074 $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 691 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.
693 $this->ctrl->redirect($this);
◆ cancelEmptyTrash()
ilMailFolderGUI::cancelEmptyTrash |
( |
| ) |
|
◆ changeFolder()
ilMailFolderGUI::changeFolder |
( |
| ) |
|
Definition at line 559 of file class.ilMailFolderGUI.php.
References $_GET, and ilUtil\sendInfo().
561 switch ($this->current_selected_cmd)
564 if(!(
int)
$_GET[
"mail_id"] || !(
int)$this->current_selected_cmd)
567 return $this->showMail();
570 if ($this->umail->moveMailsToFolder(array(
$_GET[
"mail_id"]), $this->current_selected_cmd))
573 $this->ctrl->redirectByClass(
"ilMailGUI");
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
◆ confirmDeleteMails()
ilMailFolderGUI::confirmDeleteMails |
( |
| ) |
|
Definition at line 668 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, and ilUtil\sendInfo().
670 if($this->mbox->getTrashFolder() ==
$_GET[
'mobj_id'])
672 $_POST[
'mail_id'] = $mail_ids = explode(
',',
$_GET[
'mail_id']);
673 if(!is_array($mail_ids))
677 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 402 of file class.ilMailFolderGUI.php.
406 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
410 $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this,
"showFolder"));
411 $oConfirmationGUI->setHeaderText($this->lng->txt(
"mail_sure_delete_folder"));
412 $oConfirmationGUI->setCancel($this->lng->txt(
"cancel"),
"showFolder");
413 $oConfirmationGUI->setConfirm($this->lng->txt(
"confirm"),
"performDeleteSubfolder");
414 $this->tpl->setVariable(
'CONFIRMATION',$oConfirmationGUI->getHTML());
416 return $this->showFolder(
true);
419 return $this->showFolder(
false);
Confirmation screen class.
◆ deliverFile()
ilMailFolderGUI::deliverFile |
( |
| ) |
|
Definition at line 1014 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_SESSION, $file, $filename, ilUtil\deliverFile(), and ilUtil\sendInfo().
1026 :
$_GET[
"filename"]));
1031 require_once
"./Services/Mail/classes/class.ilFileDataMail.php";
1037 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 587 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, and ilUtil\sendInfo().
589 switch ($this->current_selected_cmd)
591 case 'markMailsRead':
592 if(is_array(
$_POST[
"mail_id"]))
594 $this->umail->markRead(
$_POST[
"mail_id"]);
601 case 'markMailsUnread':
602 if(is_array(
$_POST[
"mail_id"]))
604 $this->umail->markUnread(
$_POST[
"mail_id"]);
614 if($this->mbox->getTrashFolder() ==
$_GET[
"mobj_id"])
616 if(!is_array(
$_POST[
"mail_id"]))
619 $this->errorDelete =
true;
625 if(!is_array(
$_POST[
"mail_id"]))
629 else if($this->umail->moveMailsToFolder(
$_POST[
"mail_id"], $this->mbox->getTrashFolder()))
642 $this->ctrl->setParameterByClass(
"ilmailoptionsgui",
"cmd",
"add");
643 $this->ctrl->redirectByClass(
"ilmailoptionsgui");
647 if(!is_array(
$_POST[
"mail_id"]))
651 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 440 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_SESSION, $ilCtrl, $tpl, ilSession\get(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilUtil\stripSlashes(), and ilMailGUI\VIEWMODE_SESSION_KEY.
444 if (empty(
$_POST[
'subfolder_title']))
447 return $this->addSubFolder();
454 $this->ctrl->setParameterByClass(
"ilMailGUI",
'mobj_id', $mobj_id);
455 $this->ctrl->redirectByClass(
"ilMailGUI");
460 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 422 of file class.ilMailFolderGUI.php.
References $_GET, ilUtil\sendFailure(), and ilUtil\sendInfo().
424 $new_parent = $this->mbox->getParentFolderId(
$_GET[
"mobj_id"]);
426 if ($this->mbox->deleteFolder(
$_GET[
"mobj_id"]))
430 $this->ctrl->setParameterByClass(
"ilMailGUI",
"mobj_id", $new_parent);
431 $this->ctrl->redirectByClass(
"ilMailGUI");
436 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 529 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_SESSION, ilSession\get(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilUtil\stripSlashes(), and ilMailGUI\VIEWMODE_SESSION_KEY.
533 $tmp_data = $this->mbox->getFolderData(
$_GET[
"mobj_id"]);
534 if ($tmp_data[
"title"] !=
$_POST[
"subfolder_title"])
536 if (
$_POST[
"subfolder_title"] ==
"")
539 return $this->renameSubFolder();
547 $this->ctrl->redirectByClass(
"ilMailGUI");
552 return $this->renameSubFolder();
556 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 1080 of file class.ilMailFolderGUI.php.
References $_GET.
1082 $sentFolderId = $this->mbox->getSentFolder();
1083 $draftsFolderId = $this->mbox->getDraftsFolder();
1085 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
1086 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
1087 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
1090 $table->isSentFolder($isSentFolder)
1091 ->isDraftFolder($isDraftFolder)
1092 ->isTrashFolder($isTrashFolder)
1094 $table->resetOffset();
1095 $table->resetFilter();
1097 $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: