Change hook_oci_form_validate signature to ,
This commit is contained in:
parent
85406a7813
commit
ea13c90492
|
@ -59,7 +59,7 @@ if (!$oci->app_is_installable($application)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// @TODO validations
|
// @TODO validations
|
||||||
$errors = $oci->oci_form_validate($oci_vars);
|
$errors = $oci->oci_form_validate($application, $oci_vars);
|
||||||
if (!empty($errors)) {
|
if (!empty($errors)) {
|
||||||
print('<div class="validation-wrapper">');
|
print('<div class="validation-wrapper">');
|
||||||
print('<h3>' . _('Validation Errors') . '</h3>');
|
print('<h3>' . _('Validation Errors') . '</h3>');
|
||||||
|
|
|
@ -406,7 +406,7 @@ class m_oci {
|
||||||
* @returns array
|
* @returns array
|
||||||
* Array of errors eg. array(0 => array('module' => 'm_oci', 'message' => '...'), ...)
|
* 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;
|
global $hooks, $dom, $db;
|
||||||
$errors = array();
|
$errors = array();
|
||||||
if ($vars['domain'] == '*new*') {
|
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) {
|
foreach ($vals as $v) {
|
||||||
if ($v && is_array($v) && !is_empty($v)) {
|
if ($v && is_array($v) && !is_empty($v)) {
|
||||||
$errors = $errors + $v;
|
$errors = $errors + $v;
|
||||||
|
@ -527,7 +527,7 @@ class m_oci {
|
||||||
/**
|
/**
|
||||||
* Implements hook_oci_form_validate.
|
* Implements hook_oci_form_validate.
|
||||||
*/
|
*/
|
||||||
function hook_oci_form_validate($vars) {
|
function hook_oci_form_validate($app, $vars) {
|
||||||
$errors = array();
|
$errors = array();
|
||||||
// @TODO Drupal
|
// @TODO Drupal
|
||||||
// @TODO Wordpress
|
// @TODO Wordpress
|
||||||
|
|
Loading…
Reference in New Issue