Skip to content
Snippets Groups Projects
Commit 31195a09 authored by lobo's avatar lobo
Browse files

CRM-12750

----------------------------------------
* CRM-12750: upgrade smarty to 2.6.27
  http://issues.civicrm.org/jira/browse/CRM-12750
parent 50e36e92
No related branches found
No related tags found
No related merge requests found
......@@ -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'])) {
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment