Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
framadate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
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
Nounous
framadate
Commits
22253b4e
Commit
22253b4e
authored
9 years ago
by
Antonin
Browse files
Options
Downloads
Patches
Plain Diff
Cleaning useless code.
parent
6cc46b5b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
adminstuds.php
+0
-24
0 additions, 24 deletions
adminstuds.php
studs.php
+0
-23
0 additions, 23 deletions
studs.php
with
0 additions
and
47 deletions
adminstuds.php
+
0
−
24
View file @
22253b4e
...
...
@@ -234,30 +234,6 @@ if (isset($_POST['confirm_remove_all_votes'])) {
}
}
// -------------------------------
// Add a comment
// -------------------------------
if
(
isset
(
$_POST
[
'add_comment'
]))
{
$name
=
$inputService
->
filterName
(
$_POST
[
'name'
]);
$comment
=
$inputService
->
filterComment
(
$_POST
[
'comment'
]);
if
(
$name
==
null
)
{
$message
=
new
Message
(
'danger'
,
__
(
'Error'
,
'The name is invalid.'
));
}
if
(
$message
==
null
)
{
// Add comment
$result
=
$pollService
->
addComment
(
$poll_id
,
$name
,
$comment
);
if
(
$result
)
{
$message
=
new
Message
(
'success'
,
__
(
'Comments'
,
'Comment added'
));
}
else
{
$message
=
new
Message
(
'danger'
,
__
(
'Error'
,
'Comment failed'
));
}
}
}
// -------------------------------
// Delete a comment
// -------------------------------
...
...
This diff is collapsed.
Click to expand it.
studs.php
+
0
−
23
View file @
22253b4e
...
...
@@ -128,29 +128,6 @@ if (!empty($_POST['save'])) { // Save edition of an old vote
}
}
}
// -------------------------------
// Add a comment
// -------------------------------
if
(
isset
(
$_POST
[
'add_comment'
]))
{
$name
=
$inputService
->
filterName
(
$_POST
[
'name'
]);
$comment
=
$inputService
->
filterComment
(
$_POST
[
'comment'
]);
if
(
$name
==
null
)
{
$message
=
new
Message
(
'danger'
,
__
(
'Error'
,
'The name is invalid.'
));
}
if
(
$message
==
null
)
{
// Add comment
$result
=
$pollService
->
addComment
(
$poll_id
,
$name
,
$comment
);
if
(
$result
)
{
$message
=
new
Message
(
'success'
,
__
(
'Comments'
,
'Comment added'
));
$notificationService
->
sendUpdateNotification
(
$poll
,
NotificationService
::
ADD_COMMENT
,
$name
);
}
else
{
$message
=
new
Message
(
'danger'
,
__
(
'Error'
,
'Comment failed'
));
}
}
}
// Retrieve data
...
...
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