Skip to content

Commit

Permalink
update codingstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
hannob committed Sep 29, 2024
1 parent 4dff892 commit 155ed7b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/dns/include/dnsinclude.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ function save_dns_record($id, $record)
if ($host != "." && !filter_var($host, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
system_failure("Ungültiger Hostname!");
}
foreach($data as $d) {
foreach ($data as $d) {
if (!(preg_match('/[a-z0-9]+=([a-z0-9,:.]+|"[a-z0-9,:.]+")/', $d))) {
system_failure("Ungültiger HTTPS record!");
}
Expand Down
4 changes: 2 additions & 2 deletions modules/systemuser/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
foreach ($usedquota as $q) {
$mailbar = '';
$mailstring = '';
$mailpercent = round(($q['mailquota'] / max($q["systemquota"],1)) * 100);
$mailpercent = round(($q['mailquota'] / max($q["systemquota"], 1)) * 100);
$mailwidth = 2 * min($mailpercent, 100);

if ($q["mailquota"] > 0) {
$mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
$mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\">&#160;</div>";
}

$percent = round((($q["systemquota_used"] + $q["mailquota"]) / max($q["systemquota"],1)) * 100);
$percent = round((($q["systemquota_used"] + $q["mailquota"]) / max($q["systemquota"], 1)) * 100);
$color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green"));
$width = 2 * min($percent, 100) - $mailwidth;

Expand Down
4 changes: 2 additions & 2 deletions modules/systemuser/overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
foreach ($usedquota as $q) {
$mailbar = '';
$mailstring = '';
$mailpercent = round(($q['mailquota'] / max($q["systemquota"],1)) * 100);
$mailpercent = round(($q['mailquota'] / max($q["systemquota"], 1)) * 100);
$mailwidth = 2 * min($mailpercent, 100);

if ($q["mailquota"] > 0) {
$mailstring = "<br />(davon {$q["mailquota"]} MB für Postfächer reserviert)";
$mailbar = "<div style=\"font-size: 1px; background-color: blue; height: 10px; width: {$mailwidth}px; margin: 0; padding: 0; float: left;\">&#160;</div>";
}

$percent = round((($q["systemquota_used"] + $q["mailquota"]) / max($q["systemquota"],1)) * 100);
$percent = round((($q["systemquota_used"] + $q["mailquota"]) / max($q["systemquota"], 1)) * 100);
if ($percent > 90) {
$need_more_storage = true;
}
Expand Down

0 comments on commit 155ed7b

Please sign in to comment.