From ad50810c7ab71cc8557e55e4bf75c0117d9b6ca7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Apr 2015 02:48:19 +0200 Subject: [PATCH] Fix deprecated code --- htdocs/core/lib/bank.lib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index df9a25ae7c8..0ed32bec16c 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -84,7 +84,7 @@ function bank_prepare_head(Account $object) } /** * Prepare array with list of tabs - * + * * @param Object $object Object related to tabs * @return array Array of tabs to shoc */ @@ -99,13 +99,13 @@ function bank_admin_prepare_head($object) $head[$h][2] = 'general'; $h++; - + // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank_admin'); - + $head[$h][0] = DOL_URL_ROOT.'/admin/bank_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); $head[$h][2] = 'attributes'; @@ -120,12 +120,12 @@ function bank_admin_prepare_head($object) * Check SWIFT informations for a bank account * * @param Account $account A bank account - * @return boolean True if informations are valid, false otherwise + * @return boolean True if informations are valid, false otherwise */ function checkSwiftForAccount($account) { $swift = $account->bic; - if (eregi("^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$", $swift)) { + if (preg_march("/^([a-zA-Z]){4}([a-zA-Z]){2}([0-9a-zA-Z]){2}([0-9a-zA-Z]{3})?$/", $swift)) { return true; } else { return false;