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
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Stud.IP
Commits
be82642e
Commit
be82642e
authored
2 years ago
by
Elmar Ludwig
Committed by
Jan-Hendrik Willms
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use asButton() instead of custom JS code, fixes #2830
Closes #2830 Merge request
studip/studip!1916
parent
515521d6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/controllers/messages.php
+22
-24
22 additions, 24 deletions
app/controllers/messages.php
with
22 additions
and
24 deletions
app/controllers/messages.php
+
22
−
24
View file @
be82642e
...
@@ -718,7 +718,6 @@ class MessagesController extends AuthenticatedController {
...
@@ -718,7 +718,6 @@ class MessagesController extends AuthenticatedController {
/* delete all sent or received messages */
/* delete all sent or received messages */
public
function
purge_action
(
$sndrec
)
public
function
purge_action
(
$sndrec
)
{
{
if
(
Request
::
isPost
())
{
CSRFProtection
::
verifyUnsafeRequest
();
CSRFProtection
::
verifyUnsafeRequest
();
$query
=
"SELECT message_id
$query
=
"SELECT message_id
...
@@ -741,7 +740,6 @@ class MessagesController extends AuthenticatedController {
...
@@ -741,7 +740,6 @@ class MessagesController extends AuthenticatedController {
$this
->
redirect
(
'messages/sent'
);
$this
->
redirect
(
'messages/sent'
);
}
}
}
}
}
protected
function
getMessages
(
$received
=
true
,
$limit
=
50
,
$offset
=
0
,
$tag
=
null
,
$search
=
null
)
protected
function
getMessages
(
$received
=
true
,
$limit
=
50
,
$offset
=
0
,
$tag
=
null
,
$search
=
null
)
{
{
...
@@ -1009,8 +1007,8 @@ class MessagesController extends AuthenticatedController {
...
@@ -1009,8 +1007,8 @@ class MessagesController extends AuthenticatedController {
_
(
'Nachrichten im Posteingang löschen'
),
_
(
'Nachrichten im Posteingang löschen'
),
$this
->
url_for
(
'messages/purge/rec'
),
$this
->
url_for
(
'messages/purge/rec'
),
Icon
::
create
(
'trash'
),
Icon
::
create
(
'trash'
),
[
'
onclick'
=>
'return STUDIP.Dialog.confirmAsPost("'
.
$message
.
'", this.href);'
]
[
'
data-confirm'
=>
$message
]
);
)
->
asButton
(
);
}
}
}
elseif
(
$action
===
'sent'
)
{
}
elseif
(
$action
===
'sent'
)
{
if
(
MessageUser
::
countBySQL
(
"snd_rec = 'snd' AND user_id = :id AND deleted != 1 LIMIT 1"
,
[
'id'
=>
$GLOBALS
[
'user'
]
->
id
]))
{
if
(
MessageUser
::
countBySQL
(
"snd_rec = 'snd' AND user_id = :id AND deleted != 1 LIMIT 1"
,
[
'id'
=>
$GLOBALS
[
'user'
]
->
id
]))
{
...
...
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