Fix deprecated code

This commit is contained in:
Laurent Destailleur
2015-04-07 02:48:19 +02:00
parent c931576e0e
commit ad50810c7a

View File

@@ -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;