◆ __construct()
ilMailFolderGUI::__construct |
( |
| ) |
|
Definition at line 33 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $ilCtrl, $ilUser, $lng, and $tpl.
41 $this->umail =
new ilMail($ilUser->getId());
42 $this->mbox =
new ilMailBox($ilUser->getId());
46 $_GET[
'mobj_id'] = $_POST[
'mobj_id'];
49 if(!(
int)
$_GET[
'mobj_id'])
51 $_GET[
'mobj_id'] = $this->mbox->getInboxFolder();
54 $ilCtrl->saveParameter($this,
'mobj_id');
55 $ilCtrl->setParameter($this,
'mobj_id',
$_GET[
'mobj_id']);
This class handles base functions for mail handling.
◆ addSubfolderCommands()
ilMailFolderGUI::addSubfolderCommands |
( |
|
$check_uf = false | ) |
|
Definition at line 193 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $ilUser, $si, array, ilSession\get(), ilUtil\sendFailure(), ilTree\setTableNames(), and ilMailGUI\VIEWMODE_SESSION_KEY.
199 $ilToolbar->addSeparator();
202 $ilToolbar->addButton($this->lng->txt(
'mail_add_subfolder'), $this->ctrl->getLinkTarget($this,
'addSubFolder'));
204 if($check_uf ==
true)
206 $ilToolbar->addButton($this->lng->txt(
'rename'), $this->ctrl->getLinkTarget($this,
'renameSubFolder'));
207 $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 1006 of file class.ilMailFolderGUI.php.
References $_GET.
1008 $sentFolderId = $this->mbox->getSentFolder();
1009 $draftsFolderId = $this->mbox->getDraftsFolder();
1011 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
1012 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
1013 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
1016 $table->isSentFolder($isSentFolder)
1017 ->isDraftFolder($isDraftFolder)
1018 ->isTrashFolder($isTrashFolder)
1020 $table->resetOffset();
1021 $table->writeFilterToSession();
1023 $this->showFolder();
◆ askForEmptyTrash()
ilMailFolderGUI::askForEmptyTrash |
( |
| ) |
|
confirmation message for empty trash action
Definition at line 158 of file class.ilMailFolderGUI.php.
References $_GET.
160 if($this->umail->countMailsOfFolder((
int)
$_GET[
'mobj_id']))
162 $this->askForConfirmation =
true;
◆ cancelDeleteMails()
ilMailFolderGUI::cancelDeleteMails |
( |
| ) |
|
Definition at line 658 of file class.ilMailFolderGUI.php.
References $_GET, $_SESSION, $file, $ilUser, $tpl, ilFrameTargetInfo\_getFrame(), ilObjUser\_lookupPref(), array, 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.
660 $this->ctrl->redirect($this);
◆ cancelEmptyTrash()
ilMailFolderGUI::cancelEmptyTrash |
( |
| ) |
|
◆ changeFolder()
ilMailFolderGUI::changeFolder |
( |
| ) |
|
Definition at line 526 of file class.ilMailFolderGUI.php.
References $_GET, array, and ilUtil\sendInfo().
528 switch ($this->current_selected_cmd)
531 if(!(
int)
$_GET[
"mail_id"] || !(
int)$this->current_selected_cmd)
534 return $this->showMail();
537 if ($this->umail->moveMailsToFolder(
array(
$_GET[
"mail_id"]), $this->current_selected_cmd))
540 $this->ctrl->redirectByClass(
"ilMailGUI");
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Create styles array
The data for the language used.
◆ confirmDeleteMails()
ilMailFolderGUI::confirmDeleteMails |
( |
| ) |
|
Definition at line 635 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, and ilUtil\sendInfo().
637 if($this->mbox->getTrashFolder() ==
$_GET[
'mobj_id'])
639 $_POST[
'mail_id'] = $mail_ids = explode(
',',
$_GET[
'mail_id']);
640 if(!is_array($mail_ids))
644 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 369 of file class.ilMailFolderGUI.php.
373 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
377 $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this,
"showFolder"));
378 $oConfirmationGUI->setHeaderText($this->lng->txt(
"mail_sure_delete_folder"));
379 $oConfirmationGUI->setCancel($this->lng->txt(
"cancel"),
"showFolder");
380 $oConfirmationGUI->setConfirm($this->lng->txt(
"confirm"),
"performDeleteSubfolder");
381 $this->tpl->setVariable(
'CONFIRMATION',$oConfirmationGUI->getHTML());
383 return $this->showFolder(
true);
386 return $this->showFolder(
false);
Confirmation screen class.
◆ deliverFile()
ilMailFolderGUI::deliverFile |
( |
| ) |
|
Definition at line 963 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_SESSION, $file, $filename, $GLOBALS, ilUtil\deliverFile(), and ilUtil\sendInfo().
975 :
$_GET[
"filename"]));
980 require_once
"./Services/Mail/classes/class.ilFileDataMail.php";
This class handles all operations on files (attachments) in directory ilias_data/mail.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
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.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
◆ editFolder()
ilMailFolderGUI::editFolder |
( |
| ) |
|
Definition at line 554 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, and ilUtil\sendInfo().
556 switch ($this->current_selected_cmd)
558 case 'markMailsRead':
559 if(is_array(
$_POST[
"mail_id"]))
561 $this->umail->markRead(
$_POST[
"mail_id"]);
568 case 'markMailsUnread':
569 if(is_array(
$_POST[
"mail_id"]))
571 $this->umail->markUnread(
$_POST[
"mail_id"]);
581 if($this->mbox->getTrashFolder() ==
$_GET[
"mobj_id"])
583 if(!is_array(
$_POST[
"mail_id"]))
586 $this->errorDelete =
true;
592 if(!is_array(
$_POST[
"mail_id"]))
596 else if($this->umail->moveMailsToFolder(
$_POST[
"mail_id"], $this->mbox->getTrashFolder()))
609 $this->ctrl->setParameterByClass(
"ilmailoptionsgui",
"cmd",
"add");
610 $this->ctrl->redirectByClass(
"ilmailoptionsgui");
614 if(!is_array(
$_POST[
"mail_id"]))
618 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 59 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $cmd, $ret, and array.
63 $_GET[
"cmd"] =
'editFolder';
66 $this->current_select_cmd =
$_POST[
'select_cmd'];
67 $this->current_selected_cmd =
$_POST[
'selected_cmd'];
69 else if (
$_POST[
"select_cmd2"])
72 $_GET[
"cmd"] =
'editFolder';
73 $this->current_select_cmd =
$_POST[
'select_cmd2'];
74 $this->current_selected_cmd =
$_POST[
'selected_cmd2'];
80 if (
$_GET[
'selected_cmd'] ==
"deleteMails" &&
$_GET[
"mail_id"])
82 $_GET[
"cmd"] =
"editFolder";
83 $this->current_selected_cmd =
"deleteMails";
90 $cmd = $this->ctrl->getCmd();
91 if(
$cmd ==
'changeFolder' &&
92 is_numeric(
$_POST[
'selected_cmd']) &&
95 $this->current_selected_cmd = (int)
$_POST[
'selected_cmd'];
98 $forward_class = $this->ctrl->getNextClass($this);
99 switch($forward_class)
102 require_once
'Services/Contact/classes/class.ilContactGUI.php';
106 case 'ilmailoptionsgui':
107 include_once
'Services/Mail/classes/class.ilMailOptionsGUI.php';
112 case 'ilpublicuserprofilegui':
113 include_once(
"Services/User/classes/class.ilPublicUserProfileGUI.php");
114 $this->tpl->setTitle($this->lng->txt(
"mail"));
115 $this->ctrl->saveParameter($this,
"mail_id");
117 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this,
"showMail"));
118 $ret = $this->ctrl->forwardCommand($profile_gui);
121 $this->tpl->setContent(
$ret);
127 if (!(
$cmd = $this->ctrl->getCmd()))
GUI class for public user profile presentation.
Create styles array
The data for the language used.
◆ performAddSubFolder()
ilMailFolderGUI::performAddSubFolder |
( |
| ) |
|
Definition at line 406 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_SESSION, $ilCtrl, $tpl, ilSession\get(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilUtil\stripSlashes(), and ilMailGUI\VIEWMODE_SESSION_KEY.
410 if (empty(
$_POST[
'subfolder_title']))
413 return $this->addSubFolder();
420 $this->ctrl->setParameterByClass(
"ilMailGUI",
'mobj_id', $mobj_id);
421 $this->ctrl->redirectByClass(
"ilMailGUI");
426 $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 389 of file class.ilMailFolderGUI.php.
References $_GET, ilUtil\sendFailure(), and ilUtil\sendInfo().
391 $new_parent = $this->mbox->getParentFolderId((
int)
$_GET[
'mobj_id']);
392 if($this->mbox->deleteFolder((
int)$_GET[
'mobj_id']))
395 $this->ctrl->setParameterByClass(
'ilMailGUI',
'mobj_id', (
int)$new_parent);
396 $this->ctrl->redirectByClass(
'ilMailGUI');
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 496 of file class.ilMailFolderGUI.php.
References $_GET, $_POST, $_SESSION, ilSession\get(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilUtil\stripSlashes(), and ilMailGUI\VIEWMODE_SESSION_KEY.
500 $tmp_data = $this->mbox->getFolderData(
$_GET[
"mobj_id"]);
501 if ($tmp_data[
"title"] !=
$_POST[
"subfolder_title"])
503 if (
$_POST[
"subfolder_title"] ==
"")
506 return $this->renameSubFolder();
514 $this->ctrl->redirectByClass(
"ilMailGUI");
519 return $this->renameSubFolder();
523 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 1029 of file class.ilMailFolderGUI.php.
References $_GET.
1031 $sentFolderId = $this->mbox->getSentFolder();
1032 $draftsFolderId = $this->mbox->getDraftsFolder();
1034 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
1035 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
1036 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
1039 $table->isSentFolder($isSentFolder)
1040 ->isDraftFolder($isDraftFolder)
1041 ->isTrashFolder($isTrashFolder)
1043 $table->resetOffset();
1044 $table->resetFilter();
1046 $this->showFolder();
◆ showUser()
ilMailFolderGUI::showUser |
( |
| ) |
|
Definition at line 170 of file class.ilMailFolderGUI.php.
References $_GET, $ilCtrl, ilObjUser\_lookupLogin(), and ilUtil\getImagePath().
174 $this->ctrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
176 $this->tpl->setTitle($this->lng->txt(
"mail"));
179 $this->tpl->setVariable(
"TBL_TITLE", $this->lng->txt(
"profile_of").
" ".
182 $this->tpl->setVariable(
"TBL_TITLE_IMG_ALT", $this->lng->txt(
"public_profile"));
184 include_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
186 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this,
"showMail"));
187 $this->tpl->setContent($ilCtrl->getHTML($profile_gui));
static _lookupLogin($a_user_id)
lookup login
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)
◆ $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: