Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Markus Hermann
wp-polls
Commits
923b801e
Unverified
Commit
923b801e
authored
Dec 20, 2018
by
Lester Chan
Browse files
Fix expiry polls
parent
15e9b1ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
polls-add.php
View file @
923b801e
...
...
@@ -34,9 +34,9 @@ if ( ! empty($_POST['do'] ) ) {
$pollq_active
=
1
;
}
// Poll End Date
$pollq_expiry_no
=
isset
(
$_POST
[
'pollq_expiry_no'
]
)
?
(
int
)
sanitize_key
(
$_POST
[
'pollq_expiry_no'
])
:
0
;
$pollq_expiry_no
=
isset
(
$_POST
[
'pollq_expiry_no'
]
)
?
(
int
)
sanitize_key
(
$_POST
[
'pollq_expiry_no'
]
)
:
0
;
if
(
$pollq_expiry_no
===
1
)
{
$pollq_expiry
=
''
;
$pollq_expiry
=
0
;
}
else
{
$pollq_expiry_day
=
isset
(
$_POST
[
'pollq_expiry_day'
]
)
?
(
int
)
sanitize_key
(
$_POST
[
'pollq_expiry_day'
]
)
:
0
;
$pollq_expiry_month
=
isset
(
$_POST
[
'pollq_expiry_month'
]
)
?
(
int
)
sanitize_key
(
$_POST
[
'pollq_expiry_month'
]
)
:
0
;
...
...
@@ -61,12 +61,12 @@ if ( ! empty($_POST['do'] ) ) {
$add_poll_question
=
$wpdb
->
insert
(
$wpdb
->
pollsq
,
array
(
'pollq_question'
=>
$pollq_question
,
'pollq_question'
=>
$pollq_question
,
'pollq_timestamp'
=>
$pollq_timestamp
,
'pollq_totalvotes'
=>
0
,
'pollq_active'
=>
$pollq_active
,
'pollq_expiry'
=>
$pollq_expiry
,
'pollq_multiple'
=>
$pollq_multiple
,
'pollq_active'
=>
$pollq_active
,
'pollq_expiry'
=>
$pollq_expiry
,
'pollq_multiple'
=>
$pollq_multiple
,
'pollq_totalvoters'
=>
0
),
array
(
...
...
@@ -74,7 +74,7 @@ if ( ! empty($_POST['do'] ) ) {
'%s'
,
'%d'
,
'%d'
,
'%
s
'
,
'%
d
'
,
'%d'
,
'%d'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment