Skip to content
GitLab
Explore
Sign in
ilias-core
ilias-archive
Compare revisions
395d0bfe81a57bdebf63ffbd3cfc7a0a8c9dcd2e to 20b112ec3e63617dce36345106a1cb32246876c3
Commits on Source (3)
TermsOfService: Fix phpstan issues
· 6508ea5f
Michael Jansen
authored
Apr 22, 2022
6508ea5f
Contact: Fix phpstan issues
· 651fc663
Michael Jansen
authored
Apr 22, 2022
651fc663
Merge branch 'trunk' of github.com:ILIAS-eLearning/ILIAS into trunk
· 20b112ec
Michael Jansen
authored
Apr 22, 2022
20b112ec
Hide whitespace changes
Inline
Side-by-side
Services/Contact/BuddySystem/classes/class.ilMailAutoCompleteBuddyRecipientsProvider.php
View file @
20b112ec
...
...
@@ -51,10 +51,6 @@ class ilMailAutoCompleteBuddyRecipientsProvider extends ilMailAutoCompleteUserPr
'AND pubemail.keyword = '
.
$this
->
db
->
quote
(
'public_email'
,
'text'
),
]);
if
(
$joins
)
{
return
'usr_data '
.
implode
(
' '
,
$joins
);
}
return
'usr_data '
;
return
'usr_data '
.
implode
(
' '
,
$joins
);
}
}
Services/Contact/classes/class.ilAbstractMailMemberRoles.php
View file @
20b112ec
...
...
@@ -24,7 +24,7 @@ abstract class ilAbstractMailMemberRoles
{
/**
* @param int $ref_id
* @return array{role_id: int, mailbox: string, form_option_title: string, default_checked: bool}[]
* @return array{role_id: int, mailbox: string, form_option_title: string, default_checked
?
: bool}[]
*/
abstract
public
function
getMailRoles
(
int
$ref_id
)
:
array
;
...
...
Services/Contact/classes/class.ilContactGUI.php
View file @
20b112ec
...
...
@@ -153,13 +153,13 @@ class ilContactGUI
if
(
in_array
(
strtolower
(
$this
->
ctrl
->
getCmdClass
()),
$galleryCmdClasses
,
true
))
{
$view_selection
=
new
ilSelectInputGUI
(
''
,
'contacts_view'
);
$view_selection
->
setOptions
([
self
::
CONTACTS_VIEW_TABLE
=>
$this
->
lng
->
txt
(
'buddy_view_table'
),
self
::
CONTACTS_VIEW_GALLERY
=>
$this
->
lng
->
txt
(
'buddy_view_gallery'
)
(
string
)
self
::
CONTACTS_VIEW_TABLE
=>
$this
->
lng
->
txt
(
'buddy_view_table'
),
(
string
)
self
::
CONTACTS_VIEW_GALLERY
=>
$this
->
lng
->
txt
(
'buddy_view_gallery'
)
]);
$view_selection
->
setValue
(
strtolower
(
$this
->
ctrl
->
getCmdClass
())
===
strtolower
(
ilUsersGalleryGUI
::
class
)
?
self
::
CONTACTS_VIEW_GALLERY
:
self
::
CONTACTS_VIEW_TABLE
?
(
string
)
self
::
CONTACTS_VIEW_GALLERY
:
(
string
)
self
::
CONTACTS_VIEW_TABLE
);
$this
->
toolbar
->
addInputItem
(
$view_selection
);
...
...
@@ -259,11 +259,10 @@ class ilContactGUI
switch
(
$this
->
http
->
wrapper
()
->
post
()
->
retrieve
(
'contacts_view'
,
$this
->
refinery
->
kindlyTo
()
->
int
()))
{
case
self
::
CONTACTS_VIEW_GALLERY
:
$this
->
ctrl
->
redirectByClass
(
ilUsersGalleryGUI
::
class
);
break
;
// no break
case
self
::
CONTACTS_VIEW_TABLE
:
$this
->
ctrl
->
redirect
(
$this
);
break
;
}
}
...
...
Services/Contact/classes/class.ilMailMemberSearchDataProvider.php
View file @
20b112ec
...
...
@@ -112,7 +112,7 @@ class ilMailMemberSearchDataProvider
}
/**
* @param string[]
* @param string[]
$roleTitles
* @return string[]
*/
private
function
sortRoles
(
array
$roleTitles
)
:
array
...
...
Services/Contact/classes/class.ilMailMemberSearchGUI.php
View file @
20b112ec
...
...
@@ -217,12 +217,12 @@ class ilMailMemberSearchGUI
}
protected
function
sendMailToSelectedUsers
()
:
bool
protected
function
sendMailToSelectedUsers
()
:
void
{
if
(
!
isset
(
$this
->
httpRequest
->
getParsedBody
()[
'user_ids'
])
||
!
is_array
(
$this
->
httpRequest
->
getParsedBody
()[
'user_ids'
])
||
0
===
count
(
$this
->
httpRequest
->
getParsedBody
()[
'user_ids'
]))
{
$this
->
tpl
->
setOnScreenMessage
(
'failure'
,
$this
->
lng
->
txt
(
"no_checkbox"
));
$this
->
showSelectableUsers
();
return
false
;
return
;
}
$rcps
=
[];
...
...
@@ -233,7 +233,7 @@ class ilMailMemberSearchGUI
if
(
!
count
(
array_filter
(
$rcps
)))
{
$this
->
tpl
->
setOnScreenMessage
(
'failure'
,
$this
->
lng
->
txt
(
"no_checkbox"
));
$this
->
showSelectableUsers
();
return
false
;
return
;
}
ilMailFormCall
::
setRecipients
(
$rcps
);
...
...
@@ -248,8 +248,6 @@ class ilMailMemberSearchGUI
],
$this
->
generateContextArray
()
));
return
true
;
}
protected
function
showSearchForm
()
:
void
...
...
@@ -261,13 +259,13 @@ class ilMailMemberSearchGUI
}
protected
function
getObjParticipants
()
:
ilParticipants
protected
function
getObjParticipants
()
:
?
ilParticipants
{
return
$this
->
objParticipants
;
}
/**
* @param
$obj
Participants
il
Participants
* @param
il
Participants
$obj
Participants
*/
public
function
setObjParticipants
(
ilParticipants
$objParticipants
)
:
void
{
...
...
@@ -294,7 +292,7 @@ class ilMailMemberSearchGUI
}
/**
* @return array{role_id: int, mailbox: string, form_option_title: string, default_checked: bool}[]
* @return array{role_id: int, mailbox: string, form_option_title: string, default_checked
?
: bool}[]
*/
private
function
getMailRoles
()
:
array
{
...
...
@@ -314,10 +312,10 @@ class ilMailMemberSearchGUI
foreach
(
$mail_roles
as
$role
)
{
$chk_role
=
new
ilCheckboxInputGUI
(
$role
[
'form_option_title'
],
'roles[]'
);
if
(
array_key_exists
(
'default_checked'
,
$role
)
&&
$role
[
'default_checked'
])
{
if
(
isset
(
$role
[
'default_checked'
]
)
&&
$role
[
'default_checked'
]
===
true
)
{
$chk_role
->
setChecked
(
true
);
}
$chk_role
->
setValue
(
$role
[
'role_id'
]);
$chk_role
->
setValue
(
(
string
)
$role
[
'role_id'
]);
$chk_role
->
setInfo
(
$role
[
'mailbox'
]);
$radio_roles
->
addSubItem
(
$chk_role
);
}
...
...
Services/Contact/classes/class.ilMailingLists.php
View file @
20b112ec
...
...
@@ -118,7 +118,7 @@ class ilMailingLists
}
public
function
getCurrentMailingList
()
:
ilMailingList
public
function
getCurrentMailingList
()
:
?
ilMailingList
{
return
$this
->
ml
;
}
...
...
Services/Contact/classes/class.ilMailingListsGUI.php
View file @
20b112ec
...
...
@@ -88,8 +88,14 @@ class ilMailingListsGUI
public
function
confirmDelete
()
:
bool
{
$ml_ids
=
isset
(
$this
->
httpRequest
->
getQueryParams
()[
'ml_id'
])
?
[(
int
)
$this
->
httpRequest
->
getQueryParams
()[
'ml_id'
]]
:
[(
int
)
$this
->
httpRequest
->
getParsedBody
()[
'ml_id'
]];
if
(
!
$ml_ids
)
{
$ml_ids
=
[];
if
(
isset
(
$this
->
httpRequest
->
getQueryParams
()[
'ml_id'
]))
{
$ml_ids
=
array_filter
([(
int
)
$this
->
httpRequest
->
getQueryParams
()[
'ml_id'
]]);
}
else
{
$ml_ids
=
array_filter
([(
int
)
(
$this
->
httpRequest
->
getParsedBody
()[
'ml_id'
]
??
0
)]);
}
if
(
$ml_ids
===
[])
{
$this
->
tpl
->
setOnScreenMessage
(
'info'
,
$this
->
lng
->
txt
(
'mail_select_one_entry'
));
$this
->
showMailingLists
();
return
true
;
...
...
@@ -313,8 +319,6 @@ class ilMailingListsGUI
$this
->
ctrl
->
setParameter
(
$this
,
'ml_id'
,
$this
->
mlists
->
getCurrentMailingList
()
->
getId
());
$this
->
ctrl
->
redirect
(
$this
,
'showMembersList'
);
exit
;
}
}
...
...
@@ -533,9 +537,7 @@ class ilMailingListsGUI
false
);
foreach
(
$relations
as
$relation
)
{
/**
* @var $relation ilBuddySystemRelation
*/
/** @var ilBuddySystemRelation $relation */
$options
[
$relation
->
getBuddyUsrId
()]
=
$names
[
$relation
->
getBuddyUsrId
()];
}
...
...
Services/TermsOfService/classes/Document/class.ilTermsOfServiceDocumentFormGUI.php
View file @
20b112ec
...
...
@@ -153,9 +153,9 @@ class ilTermsOfServiceDocumentFormGUI extends ilPropertyFormGUI
try
{
$this
->
fileUpload
->
process
();
/** @var UploadResult $uploadResult */
/** @var UploadResult
|null
$uploadResult */
$uploadResult
=
array_values
(
$this
->
fileUpload
->
getResults
())[
0
];
if
(
!
$uploadResult
)
{
if
(
!
(
$uploadResult
instanceof
UploadResult
)
)
{
$this
->
getItemByPostVar
(
'document'
)
->
setAlert
(
$this
->
lng
->
txt
(
'form_msg_file_no_upload'
));
throw
new
ilException
(
$this
->
lng
->
txt
(
'form_input_not_valid'
));
}
...
...
Services/TermsOfService/classes/Document/class.ilTermsOfServiceDocumentGUI.php
View file @
20b112ec
...
...
@@ -160,7 +160,7 @@ class ilTermsOfServiceDocumentGUI implements ilTermsOfServiceControllerEnabled
protected
function
getResetMessageBoxHtml
()
:
string
{
if
(
$this
->
tos
->
getLastResetDate
()
&&
((
int
)
$this
->
tos
->
getLastResetDate
()
->
get
(
IL_CAL_UNIX
))
!==
0
)
{
if
(((
int
)
$this
->
tos
->
getLastResetDate
()
->
get
(
IL_CAL_UNIX
))
!==
0
)
{
$status
=
ilDatePresentation
::
useRelativeDates
();
ilDatePresentation
::
setUseRelativeDates
(
false
);
$resetText
=
sprintf
(
...
...