From 6a9e89b48e88ecfd0eddc4eb1f1db44eee0bce92 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 31 Jul 2015 21:40:20 -0400 Subject: [PATCH] CRM-13104 - Remove obsolete hook_civicrm_validate --- CRM/Core/Form.php | 11 +---------- CRM/Utils/Hook.php | 19 ------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 51a16abdb0..b2398b502d 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -445,16 +445,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { $this->validateChainSelectFields(); - $hookErrors = CRM_Utils_Hook::validate( - get_class($this), - $this->_submitValues, - $this->_submitFiles, - $this - ); - - if (!is_array($hookErrors)) { - $hookErrors = array(); - } + $hookErrors = array(); CRM_Utils_Hook::validateForm( get_class($this), diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index e4d1c1a551..2c12372b18 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -383,25 +383,6 @@ abstract class CRM_Utils_Hook { ); } - /** - * This hook is invoked during all CiviCRM form validation. An array of errors - * detected is returned. Else we assume validation succeeded. - * - * @param string $formName - * The name of the form. - * @param array &$fields the POST parameters as filtered by QF - * @param array &$files the FILES parameters as sent in by POST - * @param array &$form the form object - * - * @return mixed - * formRule hooks return a boolean or - * an array of error messages which display a QF Error - */ - public static function validate($formName, &$fields, &$files, &$form) { - return self::singleton() - ->invoke(4, $formName, $fields, $files, $form, self::$_nullObject, self::$_nullObject, 'civicrm_validate'); - } - /** * This hook is invoked during all CiviCRM form validation. An array of errors * detected is returned. Else we assume validation succeeded. -- 2.25.1