Change hook_oci_form_validate signature to ,

This commit is contained in:
Kienan Stewart 2018-02-16 23:16:16 -05:00
parent 85406a7813
commit ea13c90492
2 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@ if (!$oci->app_is_installable($application)) {
}
// @TODO validations
$errors = $oci->oci_form_validate($oci_vars);
$errors = $oci->oci_form_validate($application, $oci_vars);
if (!empty($errors)) {
print('<div class="validation-wrapper">');
print('<h3>' . _('Validation Errors') . '</h3>');

View File

@ -406,7 +406,7 @@ class m_oci {
* @returns array
* Array of errors eg. array(0 => array('module' => 'm_oci', 'message' => '...'), ...)
*/
function oci_form_validate($vars) {
function oci_form_validate($app, $vars) {
global $hooks, $dom, $db;
$errors = array();
if ($vars['domain'] == '*new*') {
@ -515,7 +515,7 @@ class m_oci {
);
}
}
$vals = $hooks->invoke('hook_oci_form_validate', array($vars));
$vals = $hooks->invoke('hook_oci_form_validate', array($app, $vars));
foreach ($vals as $v) {
if ($v && is_array($v) && !is_empty($v)) {
$errors = $errors + $v;
@ -527,7 +527,7 @@ class m_oci {
/**
* Implements hook_oci_form_validate.
*/
function hook_oci_form_validate($vars) {
function hook_oci_form_validate($app, $vars) {
$errors = array();
// @TODO Drupal
// @TODO Wordpress