Fix deprecated code
This commit is contained in:
parent
c931576e0e
commit
ad50810c7a
@ -84,7 +84,7 @@ function bank_prepare_head(Account $object)
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Prepare array with list of tabs
|
* Prepare array with list of tabs
|
||||||
*
|
*
|
||||||
* @param Object $object Object related to tabs
|
* @param Object $object Object related to tabs
|
||||||
* @return array Array of tabs to shoc
|
* @return array Array of tabs to shoc
|
||||||
*/
|
*/
|
||||||
@ -99,13 +99,13 @@ function bank_admin_prepare_head($object)
|
|||||||
$head[$h][2] = 'general';
|
$head[$h][2] = 'general';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// 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:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank_admin');
|
complete_head_from_modules($conf, $langs, $object, $head, $h, 'bank_admin');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/bank_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/bank_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFields");
|
$head[$h][1] = $langs->trans("ExtraFields");
|
||||||
$head[$h][2] = 'attributes';
|
$head[$h][2] = 'attributes';
|
||||||
@ -120,12 +120,12 @@ function bank_admin_prepare_head($object)
|
|||||||
* Check SWIFT informations for a bank account
|
* Check SWIFT informations for a bank account
|
||||||
*
|
*
|
||||||
* @param Account $account 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)
|
function checkSwiftForAccount($account)
|
||||||
{
|
{
|
||||||
$swift = $account->bic;
|
$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;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user