replaced some tabs -> spaces + added curly braces #3254
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
128c9b20e0
commit
77cca70562
11
boot.php
11
boot.php
|
@ -1076,6 +1076,7 @@ function is_site_admin()
|
||||||
$adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
|
$adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
|
||||||
|
|
||||||
//if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email']))
|
//if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email']))
|
||||||
|
/// @TODO This if() + 2 returns can be shrinked into one return
|
||||||
if (local_user() && x($a->user, 'email') && x($a->config, 'admin_email') && in_array($a->user['email'], $adminlist)) {
|
if (local_user() && x($a->user, 'email') && x($a->config, 'admin_email') && in_array($a->user['email'], $adminlist)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1173,7 +1174,7 @@ function random_digits($digits)
|
||||||
{
|
{
|
||||||
$rn = '';
|
$rn = '';
|
||||||
for ($i = 0; $i < $digits; $i++) {
|
for ($i = 0; $i < $digits; $i++) {
|
||||||
/// @TODO rand() is different to mt_rand() and maybe lesser "random"
|
/// @TODO Avoid rand/mt_rand, when it comes to cryptography, they are generating predictable (seedable) numbers.
|
||||||
$rn .= rand(0, 9);
|
$rn .= rand(0, 9);
|
||||||
}
|
}
|
||||||
return $rn;
|
return $rn;
|
||||||
|
@ -1187,7 +1188,7 @@ function get_server()
|
||||||
$server = "https://dir.friendica.social";
|
$server = "https://dir.friendica.social";
|
||||||
}
|
}
|
||||||
|
|
||||||
return($server);
|
return $server;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_temppath()
|
function get_temppath()
|
||||||
|
@ -1236,7 +1237,7 @@ function get_cachefile($file, $writemode = true)
|
||||||
$cache = get_itemcachepath();
|
$cache = get_itemcachepath();
|
||||||
|
|
||||||
if ((!$cache) || (!is_dir($cache))) {
|
if ((!$cache) || (!is_dir($cache))) {
|
||||||
return("");
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
$subfolder = $cache . "/" . substr($file, 0, 2);
|
$subfolder = $cache . "/" . substr($file, 0, 2);
|
||||||
|
@ -1250,7 +1251,6 @@ function get_cachefile($file, $writemode = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @TODO no need to put braces here
|
|
||||||
return $cachepath;
|
return $cachepath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1357,7 +1357,6 @@ function get_spoolpath()
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!function_exists('exif_imagetype')) {
|
if (!function_exists('exif_imagetype')) {
|
||||||
function exif_imagetype($file)
|
function exif_imagetype($file)
|
||||||
{
|
{
|
||||||
|
@ -1395,7 +1394,7 @@ function validate_include(&$file)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simply return flag
|
// Simply return flag
|
||||||
return ($valid);
|
return $valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
function current_load()
|
function current_load()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user