Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Dirk Dankhoff
ISPConfig 3
Commits
3fd6591a
Commit
3fd6591a
authored
Sep 07, 2011
by
tbrehm
Browse files
Fixed: FS#1717 - Regular Expression (@reboot) in User Cron
parent
023e4b4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/validate_cron.inc.php
View file @
3fd6591a
...
...
@@ -55,6 +55,14 @@ class validate_cron {
if
(
preg_match
(
"'^([a-z0-9][a-z0-9-]
{
0,62}\.)+([a-z]{2,30
}
)$'i"
,
$parsed
[
"host"
])
==
false
)
return
$this
->
get_error
(
$validator
[
'errmsg'
]);
}
}
function
run_month_format
(
$field_name
,
$field_value
,
$validator
)
{
global
$app
;
//* allow value @reboot in month field
if
(
$field_value
!=
'@reboot'
)
{
return
$this
->
run_time_format
(
$field_name
,
$field_value
,
$validator
);
}
}
/*
Validator function to check if a given cron time is in correct form.
...
...
interface/web/sites/form/cron.tform.php
View file @
3fd6591a
...
...
@@ -129,7 +129,7 @@ $form["tabs"]['cron'] = array (
'formtype'
=>
'TEXT'
,
'validators'
=>
array
(
0
=>
array
(
'type'
=>
'CUSTOM'
,
'class'
=>
'validate_cron'
,
'function'
=>
'run_
time
_format'
,
'function'
=>
'run_
month
_format'
,
'errmsg'
=>
'run_month_error_format'
),
),
'default'
=>
''
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment