Compare commits

..

2 Commits

Author SHA1 Message Date
Clemens Schwaighofer
8577345799 class check email fix getEmailRegexCheck
This should only return the part email checks from position 1 to n, but
it returned all of them. Fixed with slice call
2021-07-20 06:18:14 +09:00
Clemens Schwaighofer
4779e4ccbe Bug fixes for PSR-12 update 2021-07-14 16:36:13 +09:00
6 changed files with 16 additions and 10 deletions

View File

@@ -22,7 +22,7 @@ $DB_CONFIG = [
'db_type' => 'pgsql',
'db_encoding' => '',
'db_ssl' => 'disable' // allow, disable, require, prefer
]
],
];
// __END__

View File

@@ -17,7 +17,7 @@ declare(strict_types=1);
$paths = [
'/bin',
'/usr/bin',
'/usr/local/bin'
'/usr/local/bin',
];
// find convert
foreach ($paths as $path) {

View File

@@ -18,7 +18,7 @@ declare(strict_types=1);
'csv_path' => '',
'perl_bin' => '',
'other_url' => '',
]
],
];*/
// __END__

View File

@@ -370,7 +370,7 @@ class Login extends \CoreLibs\DB\IO
. "eareu.level AS user_level, eareu.type AS user_type, "
. "eareg.level AS group_level, eareg.type AS group_type, "
. "eu.enabled, el.short_name AS lang_short, el.iso_name AS lang_iso, "
. "firstheader_color AS first_header_color, "
. "first.header_color AS first_header_color, "
. "second.header_color AS second_header_color, second.template "
. "FROM edit_user eu "
. "LEFT JOIN edit_scheme second ON "
@@ -380,7 +380,7 @@ class Login extends \CoreLibs\DB\IO
. "edit_access_right eareg, "
. "edit_scheme first "
. "WHERE first.edit_scheme_id = eg.edit_scheme_id "
. "AND eu.edit_group_id = egedit_group_id "
. "AND eu.edit_group_id = eg.edit_group_id "
. "AND eu.edit_language_id = el.edit_language_id AND "
. "eu.edit_access_right_id = eareu.edit_access_right_id AND "
. "eg.edit_access_right_id = eareg.edit_access_right_id AND "

View File

@@ -120,7 +120,13 @@ class Email
*/
public static function getEmailRegexCheck(): array
{
return self::$email_regex_check;
// return all but the first
return array_slice(
self::$email_regex_check,
1,
count(self::$email_regex_check) - 1,
true
);
}
/**

View File

@@ -291,14 +291,14 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
// then check general global folder
if (
is_dir(TABLE_ARRAYS) &&
is_file(TABLE_ARRAYS . 'array_' . $this->my_page_name . ' . php')
is_file(TABLE_ARRAYS . 'array_' . $this->my_page_name . '.php')
) {
include(TABLE_ARRAYS . 'array_' . $this->my_page_name . ' . php');
include(TABLE_ARRAYS . 'array_' . $this->my_page_name . '.php');
} elseif (
is_dir(BASE . INCLUDES . TABLE_ARRAYS) &&
is_file(BASE . INCLUDES . TABLE_ARRAYS . 'array_' . $this->my_page_name . ' . php')
is_file(BASE . INCLUDES . TABLE_ARRAYS . 'array_' . $this->my_page_name . '.php')
) {
include(BASE . INCLUDES . TABLE_ARRAYS . 'array_' . $this->my_page_name . ' . php');
include(BASE . INCLUDES . TABLE_ARRAYS . 'array_' . $this->my_page_name . '.php');
}
// in the include file there must be a variable with the page name matching
if (isset(${$this->my_page_name}) && is_array(${$this->my_page_name})) {