Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
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
justinfreeman (Agileware)
Core
Commits
032f804b
Commit
032f804b
authored
11 years ago
by
colemanw
Browse files
Options
Downloads
Plain Diff
Merge pull request #946 from dlobo/CRM-12750
CRM-12755
parents
17c16300
31195a09
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Admin/Form/Setting/Component.php
+1
-1
1 addition, 1 deletion
CRM/Admin/Form/Setting/Component.php
CRM/Admin/Form/Setting/Miscellaneous.php
+29
-0
29 additions, 0 deletions
CRM/Admin/Form/Setting/Miscellaneous.php
with
30 additions
and
1 deletion
CRM/Admin/Form/Setting/Component.php
+
1
−
1
View file @
032f804b
...
...
@@ -76,7 +76,7 @@ class CRM_Admin_Form_Setting_Component extends CRM_Admin_Form_Setting {
* @access public
* @static
*/
static
function
formRule
(
$fields
)
{
static
function
formRule
(
$fields
,
$files
,
$options
)
{
$errors
=
array
();
if
(
is_array
(
$fields
[
'enableComponents'
]))
{
...
...
This diff is collapsed.
Click to expand it.
CRM/Admin/Form/Setting/Miscellaneous.php
+
29
−
0
View file @
032f804b
...
...
@@ -99,9 +99,38 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting {
$this
->
addRule
(
'checksumTimeout'
,
ts
(
'Value should be a positive number'
),
'positiveInteger'
);
$this
->
addFormRule
(
array
(
'CRM_Admin_Form_Setting_Miscellaneous'
,
'formRule'
),
$this
);
parent
::
buildQuickForm
();
}
/**
* global form rule
*
* @param array $fields the input form values
* @param array $files the uploaded files if any
* @param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
* @static
*/
static
function
formRule
(
$fields
,
$files
,
$options
)
{
$errors
=
array
();
if
(
!
empty
(
$fields
[
'wkhtmltopdfPath'
]))
{
// check and ensure that thi leads to the wkhtmltopdf binary
// and it is a valid executable binary
if
(
!
file_exists
(
$fields
[
'wkhtmltopdfPath'
])
||
!
is_executable
(
$fields
[
'wkhtmltopdfPath'
])
)
{
$errors
[
'wkhtmltopdfPath'
]
=
ts
(
'The wkhtmltodfPath does not exist or is not valid'
);
}
}
return
$errors
;
}
function
setDefaultValues
()
{
parent
::
setDefaultValues
();
...
...
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