Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
3f48bcc6
Commit
3f48bcc6
authored
5 months ago
by
David Siegfried
Committed by
Jan-Hendrik Willms
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
prevent warning in StudipMail and fix return types, fixes #4607
Closes #4607 Merge request
studip/studip!3416
parent
cf22cb99
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/classes/StudipMail.php
+19
-12
19 additions, 12 deletions
lib/classes/StudipMail.php
with
19 additions
and
12 deletions
lib/classes/StudipMail.php
+
19
−
12
View file @
3f48bcc6
...
...
@@ -81,6 +81,7 @@ class StudipMail
*/
public
static
function
getAbuseEmail
()
{
$mail_localhost
=
$GLOBALS
[
'MAIL_LOCALHOST'
]
?:
$_SERVER
[
'SERVER_NAME'
];
return
$GLOBALS
[
'MAIL_ABUSE'
]
?:
"abuse@
{
$mail_localhost
}
"
;
}
...
...
@@ -166,7 +167,7 @@ class StudipMail
}
/**
* @return
unknown_type
* @return
string
*/
public
function
getSenderName
()
{
...
...
@@ -184,7 +185,7 @@ class StudipMail
}
/**
* @return
unknown_type
* @return
string
*/
public
function
getReplyToEmail
()
{
...
...
@@ -202,7 +203,7 @@ class StudipMail
}
/**
* @return
unknown_type
* @return
string
*/
public
function
getReplyToName
()
{
...
...
@@ -220,7 +221,7 @@ class StudipMail
}
/**
* @return
unknown_type
* @return
string
*/
public
function
getSubject
()
{
...
...
@@ -263,7 +264,7 @@ class StudipMail
/**
* @param $mail
* @return
unknown_type
* @return
bool
*/
public
function
isRecipient
(
$mail
)
{
...
...
@@ -343,7 +344,7 @@ class StudipMail
/**
* @param $name
* @return
unknown_type
* @return
bool
*/
public
function
isAttachment
(
$name
)
{
...
...
@@ -361,7 +362,7 @@ class StudipMail
}
/**
* @return
unknown_type
* @return
string
*/
public
function
getBodyText
()
{
...
...
@@ -379,7 +380,7 @@ class StudipMail
}
/**
* @return
unknown_type
* @return
string
*/
public
function
getBodyHtml
()
{
...
...
@@ -403,7 +404,7 @@ class StudipMail
* send the mail using the given transporter object, or the
* set default transporter
*
* @param email_message_class $transporter
* @param email_message_class
|null
$transporter
* @return bool
*/
public
function
send
(
email_message_class
$transporter
=
null
)
...
...
@@ -420,10 +421,16 @@ class StudipMail
if
(
$this
->
getReplyToEmail
()){
$transporter
->
SetEncodedEmailHeader
(
'Reply-To'
,
$this
->
getReplyToEmail
(),
self
::
quoteString
(
$this
->
getReplyToName
()));
}
$recipients_by_type
=
[];
foreach
(
$this
->
getRecipients
()
as
$recipient
)
{
if
(
!
isset
(
$recipients_by_type
[
$recipient
[
'type'
]]))
{
$recipients_by_type
[
$recipient
[
'type'
]]
=
[];
}
$recipients_by_type
[
$recipient
[
'type'
]][
$recipient
[
'mail'
]]
=
self
::
quoteString
(
$recipient
[
'name'
]);
}
foreach
(
$recipients_by_type
as
$type
=>
$recipients
){
foreach
(
$recipients_by_type
as
$type
=>
$recipients
){
$transporter
->
SetMultipleEncodedEmailHeader
(
$type
,
$recipients
);
}
$transporter
->
SetEncodedHeader
(
'Subject'
,
$this
->
getSubject
());
...
...
@@ -456,8 +463,8 @@ class StudipMail
}
foreach
(
$this
->
getAttachments
()
as
$attachment
){
$part
=
[
'FileName'
=>
$attachment
[
'file_name'
],
'Data'
=>
$attachment
[
'data'
],
'FileName'
=>
$attachment
[
'file_name'
]
??
null
,
'Data'
=>
$attachment
[
'data'
]
??
null
,
'Name'
=>
$attachment
[
'name'
],
'Content-Type'
=>
$attachment
[
'type'
],
'Disposition'
=>
$attachment
[
'disposition'
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment