X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=libs%2Flib_general.php;h=fa4643de30088e24b74c1d3721fe76b79a18265b;hb=7136865ca398b41614a80d57ae397bc1fff63c10;hp=9d518b4345d3e69d025a3f6d9743fd9c8d9308b0;hpb=4953c3129697f1b20a89e0008f63cf2bc4ba9ba6;p=ctracker.git diff --git a/libs/lib_general.php b/libs/lib_general.php index 9d518b4..fa4643d 100644 --- a/libs/lib_general.php +++ b/libs/lib_general.php @@ -25,13 +25,13 @@ if (!function_exists('implode_r')) { // Implode recursive a multi-dimension array, taken from www.php.net function implode_r ($glue, $array, $array_name = NULL) { - $return = array(); - while(list($key,$value) = @each($array)) { - if(is_array($value)) { + $return = []; + while (list($key,$value) = @each($array)) { + if (is_array($value)) { // Is an array again, so call recursive $return[] = implode_r($glue, $value, (string) $key); } else { - if($array_name != NULL) { + if ($array_name != NULL) { $return[] = $array_name . '[' . (string) $key . ']=' . $value . "\n"; } else { $return[] = $key . '=' . $value."\n"; @@ -40,13 +40,13 @@ if (!function_exists('implode_r')) { } // END - while // Return resulting array - return(implode($glue, $return)); + return implode($glue, $return); } // END - function } // END - if if (!function_exists('implode_secure')) { // Implode a simple array with a 'call-back' to our escaper function - function implode_secure ($array) { + function implode_secure (array $array) { // Return string $return = ''; @@ -85,7 +85,7 @@ function crackerTrackerLoadConfiguration () { } // END - if // Load it - require($fqfn); + require $fqfn; // Load email header $GLOBALS['ctracker_header'] = crackerTrackerLoadEmailTemplate('header'); @@ -383,7 +383,7 @@ function crackerTrackerLanguage () { } // Loads a given email template and passes through $content -function crackerTrackerLoadEmailTemplate ($template, array $content = array(), $language = NULL) { +function crackerTrackerLoadEmailTemplate ($template, array $content = [], $language = NULL) { // Init language crackerTrackerLanguage(); @@ -581,7 +581,7 @@ function unsetCtrackerData () { 'ctracker_language', 'ctracker_localized', 'ctracker_link', - 'ctracker_blocked_requests', + 'ctracker_blocked_methods', ) as $key) { // Unset it unset($GLOBALS[$key]);