diff --git a/admin_admins.php b/admin_admins.php
index 63fd941f..8a8f5f7d 100644
--- a/admin_admins.php
+++ b/admin_admins.php
@@ -92,8 +92,8 @@ if ($page == 'admins' && $userinfo['change_serversettings'] == '1') {
$traffic_percent = 100;
}
- $row = \Froxlor\PhpHelper::str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::strReplaceArray('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$row['custom_notes'] = ($row['custom_notes'] != '') ? nl2br($row['custom_notes']) : '';
@@ -174,7 +174,7 @@ if ($page == 'admins' && $userinfo['change_serversettings'] == '1') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('admin_admin_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_admin_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -327,7 +327,7 @@ if ($page == 'admins' && $userinfo['change_serversettings'] == '1') {
$ipaddress .= \Froxlor\UI\HTML::makeoption($row['ip'], $row['id'], $result['ip']);
}
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$admin_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/admin/formfield.admin_edit.php';
$admin_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($admin_edit_data);
diff --git a/admin_autoupdate.php b/admin_autoupdate.php
index d7615822..50a1e210 100644
--- a/admin_autoupdate.php
+++ b/admin_autoupdate.php
@@ -67,7 +67,7 @@ if ($page == 'overview') {
'page' => 'error',
'errno' => 3
));
- } elseif (\Froxlor\Froxlor::version_compare2($version, $_version) == - 1) {
+ } elseif (\Froxlor\Froxlor::versionCompare2($version, $_version) == - 1) {
// there is a newer version - yay
$isnewerversion = 1;
} else {
diff --git a/admin_cronjobs.php b/admin_cronjobs.php
index 8b43906d..4165c9b4 100644
--- a/admin_cronjobs.php
+++ b/admin_cronjobs.php
@@ -58,7 +58,7 @@ if ($page == 'cronjobs' || $page == 'overview') {
$cmod = $row['module'];
}
if ($paging->checkDisplay($i)) {
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$row['lastrun'] = date('d.m.Y H:i', $row['lastrun']);
$row['isactive'] = ((int) $row['isactive'] == 1) ? $lng['panel']['yes'] : $lng['panel']['no'];
diff --git a/admin_customers.php b/admin_customers.php
index 8fe4300f..2c287881 100644
--- a/admin_customers.php
+++ b/admin_customers.php
@@ -126,8 +126,8 @@ if ($page == 'customers' && $userinfo['customers'] != '0') {
$islocked = 1;
}
- $row = \Froxlor\PhpHelper::str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps subdomains');
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::strReplaceArray('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps subdomains');
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
// fix progress-bars if value is >100%
if ($disk_percent > 100) {
@@ -230,7 +230,7 @@ if ($page == 'customers' && $userinfo['customers'] != '0') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('customer_reallyunlock', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('customer_reallyunlock', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -260,7 +260,7 @@ if ($page == 'customers' && $userinfo['customers'] != '0') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno_withcheckbox('admin_customer_reallydelete', 'admin_customer_alsoremovefiles', $filename, array(
+ \Froxlor\UI\HTML::askYesNoWithCheckbox('admin_customer_reallydelete', 'admin_customer_alsoremovefiles', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -438,7 +438,7 @@ if ($page == 'customers' && $userinfo['customers'] != '0') {
$result['mysqls'] = '';
}
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$gender_options = \Froxlor\UI\HTML::makeoption($lng['gender']['undef'], 0, ($result['gender'] == '0' ? true : false), true, true);
$gender_options .= \Froxlor\UI\HTML::makeoption($lng['gender']['male'], 1, ($result['gender'] == '1' ? true : false), true, true);
diff --git a/admin_domains.php b/admin_domains.php
index 2bb23eba..c5e695c5 100644
--- a/admin_domains.php
+++ b/admin_domains.php
@@ -106,7 +106,7 @@ if ($page == 'domains' || $page == 'overview') {
if (isset($row['domain']) && $row['domain'] != '' && $paging->checkDisplay($i)) {
$row['customername'] = \Froxlor\User::getCorrectFullUserDetails($row);
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
// display a nice list of IP's
$row['ipandport'] = str_replace("\n", "
", $row['ipandport']);
eval("\$domains.=\"" . \Froxlor\UI\Template::getTemplate("domains/domains_domain") . "\";");
@@ -159,7 +159,7 @@ if ($page == 'domains' || $page == 'overview') {
if (\Froxlor\Domain\Domain::domainHasMainSubDomains($id)) {
$showcheck = true;
}
- \Froxlor\UI\HTML::ask_yesno_withcheckbox('admin_domain_reallydelete', 'remove_subbutmain_domains', $filename, array(
+ \Froxlor\UI\HTML::askYesNoWithCheckbox('admin_domain_reallydelete', 'remove_subbutmain_domains', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -624,7 +624,7 @@ if ($page == 'domains' || $page == 'overview') {
}
}
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$domain_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/domains/formfield.domains_edit.php';
$domain_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($domain_edit_data);
diff --git a/admin_index.php b/admin_index.php
index f65d5d75..2e9c7f92 100644
--- a/admin_index.php
+++ b/admin_index.php
@@ -115,7 +115,7 @@ if ($page == 'overview') {
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $dec_places);
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $dec_places);
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $dec_places);
- $userinfo = \Froxlor\PhpHelper::str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
+ $userinfo = \Froxlor\PhpHelper::strReplaceArray('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
$userinfo['custom_notes'] = ($userinfo['custom_notes'] != '') ? nl2br($userinfo['custom_notes']) : '';
diff --git a/admin_ipsandports.php b/admin_ipsandports.php
index 6e94e728..908c29f3 100644
--- a/admin_ipsandports.php
+++ b/admin_ipsandports.php
@@ -58,7 +58,7 @@ if ($page == 'ipsandports' || $page == 'overview') {
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
if (filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
$row['ip'] = '[' . $row['ip'] . ']';
}
@@ -94,7 +94,7 @@ if ($page == 'ipsandports' || $page == 'overview') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('admin_ip_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_ip_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -146,7 +146,7 @@ if ($page == 'ipsandports' || $page == 'overview') {
));
} else {
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$ipsandports_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
$ipsandports_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($ipsandports_edit_data);
diff --git a/admin_logger.php b/admin_logger.php
index f12372aa..00cefbf3 100644
--- a/admin_logger.php
+++ b/admin_logger.php
@@ -63,7 +63,7 @@ if ($page == 'log' && $userinfo['change_serversettings'] == '1') {
$_action = 0;
foreach ($logrows as $row) {
// if ($paging->checkDisplay($i)) {
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$row['date'] = date("d.m.y H:i:s", $row['date']);
if ($_action != $action) {
@@ -122,7 +122,7 @@ if ($page == 'log' && $userinfo['change_serversettings'] == '1') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('logger_reallytruncate', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('logger_reallytruncate', $filename, array(
'page' => $page,
'action' => $action
), TABLE_PANEL_LOG);
diff --git a/admin_phpsettings.php b/admin_phpsettings.php
index df8acbcf..aba242d9 100644
--- a/admin_phpsettings.php
+++ b/admin_phpsettings.php
@@ -134,7 +134,7 @@ if ($page == 'overview') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('phpsetting_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('phpsetting_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -279,7 +279,7 @@ if ($page == 'overview') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('fpmsetting_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('fpmsetting_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
diff --git a/admin_plans.php b/admin_plans.php
index e2100ebe..78454fbb 100644
--- a/admin_plans.php
+++ b/admin_plans.php
@@ -58,7 +58,7 @@ if ($page == '' || $page == 'overview') {
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$row['ts_format'] = date("d.m.Y H:i", $row['ts']);
eval("\$plans.=\"" . \Froxlor\UI\Template::getTemplate("plans/plans_plan") . "\";");
$count ++;
@@ -90,7 +90,7 @@ if ($page == '' || $page == 'overview') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('plan_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('plan_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -271,7 +271,7 @@ if ($page == '' || $page == 'overview') {
if ($result['name'] != '') {
$result['value'] = json_decode($result['value'], true);
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
foreach ($result['value'] as $index => $value) {
$result[$index] = $value;
diff --git a/admin_settings.php b/admin_settings.php
index 86683c16..0bfdcb86 100644
--- a/admin_settings.php
+++ b/admin_settings.php
@@ -157,7 +157,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
'filename' => 'admin_index.php'
));
} else {
- \Froxlor\UI\HTML::ask_yesno('admin_configs_reallyrebuild', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_configs_reallyrebuild', $filename, array(
'page' => $page
));
}
@@ -179,7 +179,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/updatecounters") . "\";");
} else {
- \Froxlor\UI\HTML::ask_yesno('admin_counters_reallyupdate', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_counters_reallyupdate', $filename, array(
'page' => $page
));
}
@@ -194,7 +194,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('admin_cleartextmailpws_reallywipe', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_cleartextmailpws_reallywipe', $filename, array(
'page' => $page
));
}
@@ -211,7 +211,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('admin_quotas_reallywipe', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_quotas_reallywipe', $filename, array(
'page' => $page
));
}
@@ -252,7 +252,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('admin_quotas_reallyenforce', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_quotas_reallyenforce', $filename, array(
'page' => $page
));
}
@@ -261,7 +261,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$integrity->fixAll();
} elseif (isset($_GET['action']) && $_GET['action'] == "fix") {
- \Froxlor\UI\HTML::ask_yesno('admin_integritycheck_reallyfix', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_integritycheck_reallyfix', $filename, array(
'page' => $page
));
}
diff --git a/admin_templates.php b/admin_templates.php
index e8be5ca5..ae91a86f 100644
--- a/admin_templates.php
+++ b/admin_templates.php
@@ -154,7 +154,7 @@ if ($action == '') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('admin_template_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_template_reallydelete', $filename, array(
'subjectid' => $subjectid,
'mailbodyid' => $mailbodyid,
'page' => $page,
@@ -190,7 +190,7 @@ if ($action == '') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('admin_template_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('admin_template_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -426,7 +426,7 @@ if ($action == '') {
));
} else {
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$template = $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])];
$subject = $result['value'];
$result_stmt = Database::prepare("
@@ -442,7 +442,7 @@ if ($action == '') {
// don't escape the already escaped language-string so save up before htmlentities()
$language = $result['language'];
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$mailbody = $result['value'];
$template_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.template_edit.php';
@@ -487,7 +487,7 @@ if ($action == '') {
's' => $s
));
} else {
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$filetemplate_edit_data = include_once dirname(__FILE__) . '/lib/formfields/admin/templates/formfield.filetemplate_edit.php';
$filetemplate_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($filetemplate_edit_data);
diff --git a/admin_traffic.php b/admin_traffic.php
index 93fe128e..a7f22f4f 100644
--- a/admin_traffic.php
+++ b/admin_traffic.php
@@ -115,7 +115,7 @@ if ($page == 'overview' || $page == 'customers') {
));
while ($traffic_month = $traffic_list_stmt->fetch(PDO::FETCH_ASSOC)) {
- $virtual_host[$months[(int) $traffic_month['month']]] = \Froxlor\PhpHelper::size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
+ $virtual_host[$months[(int) $traffic_month['month']]] = \Froxlor\PhpHelper::sizeReadable($traffic_month['traffic'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
$totals[$months[(int) $traffic_month['month']]] += $traffic_month['traffic'];
}
eval("\$domain_list .= sprintf(\"%s\", \"" . \Froxlor\UI\Template::getTemplate("traffic/index_table_row") . "\");");
@@ -125,7 +125,7 @@ if ($page == 'overview' || $page == 'customers') {
'name' => $lng['traffic']['months']['total']
);
foreach ($totals as $month => $bytes) {
- $virtual_host[$month] = ($bytes == 0 ? '-' : \Froxlor\PhpHelper::size_readable($bytes, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s'));
+ $virtual_host[$month] = ($bytes == 0 ? '-' : \Froxlor\PhpHelper::sizeReadable($bytes, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s'));
}
$customerview = 0;
eval("\$total_list = sprintf(\"%s\", \"" . \Froxlor\UI\Template::getTemplate("traffic/index_table_row") . "\");");
diff --git a/api_keys.php b/api_keys.php
index 691c705c..f0bb45cb 100644
--- a/api_keys.php
+++ b/api_keys.php
@@ -206,7 +206,7 @@ if (count($all_keys) == 0) {
}
// escape stuff
- $row = \Froxlor\PhpHelper::htmlentities_array($key);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($key);
// shorten keys
$row['_apikey'] = substr($row['apikey'], 0, 20) . '...';
diff --git a/customer_domains.php b/customer_domains.php
index f35ea53c..8fc07f20 100644
--- a/customer_domains.php
+++ b/customer_domains.php
@@ -151,7 +151,7 @@ if ($page == 'overview') {
if ($paging->checkDisplay($i)) {
if (isset($domain_array[$sortkey])) {
- $row = \Froxlor\PhpHelper::htmlentities_array($domain_array[$sortkey]);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($domain_array[$sortkey]);
if (Settings::Get('system.awstats_enabled') == '1') {
$statsapp = 'awstats';
} else {
@@ -176,7 +176,7 @@ if ($page == 'overview') {
if (Settings::Get('system.use_ssl') == '1' && \Froxlor\Domain\Domain::domainHasSslIpPort($row['id']) && $row['caneditdomain'] == '1' && $row['letsencrypt'] == 0) {
$show_ssledit = true;
}
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
eval("\$domains.=\"" . \Froxlor\UI\Template::getTemplate("domains/domains_domain") . "\";");
}
}
@@ -212,7 +212,7 @@ if ($page == 'overview') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('domains_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('domains_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -459,7 +459,7 @@ if ($page == 'overview') {
}
$domainip = $result_ipandport['ip'];
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$subdomain_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/domains/formfield.domains_edit.php';
$subdomain_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($subdomain_edit_data);
@@ -512,7 +512,7 @@ if ($page == 'overview') {
$do_insert = true;
}
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$ssleditor_data = include_once dirname(__FILE__) . '/lib/formfields/customer/domains/formfield.domain_ssleditor.php';
$ssleditor_form = \Froxlor\UI\HtmlForm::genHTMLForm($ssleditor_data);
diff --git a/customer_email.php b/customer_email.php
index 8a906eb2..c118433e 100644
--- a/customer_email.php
+++ b/customer_email.php
@@ -118,9 +118,9 @@ if ($page == 'overview') {
$row['destination'] = substr($row['destination'], 0, 32) . '... (' . $destinations_count . ')';
}
- $row['mboxsize'] = \Froxlor\PhpHelper::size_readable($row['mboxsize'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
+ $row['mboxsize'] = \Froxlor\PhpHelper::sizeReadable($row['mboxsize'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
eval("\$accounts.=\"" . \Froxlor\UI\Template::getTemplate("email/emails_email") . "\";");
$count ++;
}
@@ -168,7 +168,7 @@ if ($page == 'overview') {
} else {
$show_checkbox = false;
}
- \Froxlor\UI\HTML::ask_yesno_withcheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $filename, array(
+ \Froxlor\UI\HTML::askYesNoWithCheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -252,7 +252,7 @@ if ($page == 'overview') {
}
$destinations_count = count($result['destination']);
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$email_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/email/formfield.emails_edit.php';
@@ -325,7 +325,7 @@ if ($page == 'overview') {
}
$result['email_full'] = $idna_convert->decode($result['email_full']);
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$quota = Settings::Get('system.mail_quota');
$account_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/email/formfield.emails_addaccount.php';
@@ -367,7 +367,7 @@ if ($page == 'overview') {
));
} else {
$result['email_full'] = $idna_convert->decode($result['email_full']);
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$account_changepw_data = include_once dirname(__FILE__) . '/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php';
$account_changepw_form = \Froxlor\UI\HtmlForm::genHTMLForm($account_changepw_data);
@@ -403,7 +403,7 @@ if ($page == 'overview') {
));
} else {
$result['email_full'] = $idna_convert->decode($result['email_full']);
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$quota_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/email/formfield.emails_accountchangequota.php';
$quota_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($quota_edit_data);
@@ -438,7 +438,7 @@ if ($page == 'overview') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno_withcheckbox('email_reallydelete_account', 'admin_customer_alsoremovemail', $filename, array(
+ \Froxlor\UI\HTML::askYesNoWithCheckbox('email_reallydelete_account', 'admin_customer_alsoremovemail', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -473,7 +473,7 @@ if ($page == 'overview') {
));
} else {
$result['email_full'] = $idna_convert->decode($result['email_full']);
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$forwarder_add_data = include_once dirname(__FILE__) . '/lib/formfields/customer/email/formfield.emails_addforwarder.php';
$forwarder_add_form = \Froxlor\UI\HtmlForm::genHTMLForm($forwarder_add_data);
@@ -524,7 +524,7 @@ if ($page == 'overview') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('email_reallydelete_forwarder', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('email_reallydelete_forwarder', $filename, array(
'id' => $id,
'forwarderid' => $forwarderid,
'page' => $page,
diff --git a/customer_extras.php b/customer_extras.php
index 347ba4d1..28755743 100644
--- a/customer_extras.php
+++ b/customer_extras.php
@@ -73,7 +73,7 @@ if ($page == 'overview') {
$row['path'] = str_replace($userinfo['documentroot'], "/", $row['path']);
}
$row['path'] = \Froxlor\FileDir::makeCorrectDir($row['path']);
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
eval("\$htpasswds.=\"" . \Froxlor\UI\Template::getTemplate("extras/htpasswds_htpasswd") . "\";");
$count ++;
}
@@ -108,7 +108,7 @@ if ($page == 'overview') {
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
}
- \Froxlor\UI\HTML::ask_yesno('extras_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('extras_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -163,7 +163,7 @@ if ($page == 'overview') {
$result['path'] = str_replace($userinfo['documentroot'], "/", $result['path']);
}
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$htpasswd_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
$htpasswd_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($htpasswd_edit_data);
@@ -219,7 +219,7 @@ if ($page == 'overview') {
$row['options_indexes'] = str_replace('0', $lng['panel']['no'], $row['options_indexes']);
$row['options_cgi'] = str_replace('1', $lng['panel']['yes'], $row['options_cgi']);
$row['options_cgi'] = str_replace('0', $lng['panel']['no'], $row['options_cgi']);
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
eval("\$htaccess.=\"" . \Froxlor\UI\Template::getTemplate("extras/htaccess_htaccess") . "\";");
$count ++;
}
@@ -250,7 +250,7 @@ if ($page == 'overview') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno('extras_reallydelete_pathoptions', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('extras_reallydelete_pathoptions', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
@@ -314,7 +314,7 @@ if ($page == 'overview') {
* $options_indexes = \Froxlor\UI\HTML::makeyesno('options_indexes', '1', '0', $result['options_indexes']);
* $options_cgi = \Froxlor\UI\HTML::makeyesno('options_cgi', '1', '0', $result['options_cgi']);
*/
- $result = \Froxlor\PhpHelper::htmlentities_array($result);
+ $result = \Froxlor\PhpHelper::htmlentitiesArray($result);
$htaccess_edit_data = include_once dirname(__FILE__) . '/lib/formfields/customer/extras/formfield.htaccess_edit.php';
$htaccess_edit_form = \Froxlor\UI\HtmlForm::genHTMLForm($htaccess_edit_data);
diff --git a/customer_ftp.php b/customer_ftp.php
index 10bbf227..c3a0bfd2 100644
--- a/customer_ftp.php
+++ b/customer_ftp.php
@@ -73,7 +73,7 @@ if ($page == 'overview') {
$row['documentroot'] = \Froxlor\FileDir::makeCorrectDir($row['documentroot']);
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
eval("\$accounts.=\"" . \Froxlor\UI\Template::getTemplate('ftp/accounts_account') . "\";");
$count ++;
}
@@ -104,7 +104,7 @@ if ($page == 'overview') {
's' => $s
));
} else {
- \Froxlor\UI\HTML::ask_yesno_withcheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array(
+ \Froxlor\UI\HTML::askYesNoWithCheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
diff --git a/customer_index.php b/customer_index.php
index 55ed6e0e..3a7d7f73 100644
--- a/customer_index.php
+++ b/customer_index.php
@@ -100,7 +100,7 @@ if ($page == 'overview') {
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
- $userinfo = \Froxlor\PhpHelper::str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
+ $userinfo = \Froxlor\PhpHelper::strReplaceArray('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
$userinfo['custom_notes'] = ($userinfo['custom_notes'] != '') ? nl2br($userinfo['custom_notes']) : '';
diff --git a/customer_logger.php b/customer_logger.php
index a3ec785e..888a8dba 100644
--- a/customer_logger.php
+++ b/customer_logger.php
@@ -76,7 +76,7 @@ if ($page == 'log') {
$_action = 0;
foreach ($logrows as $row) {
// if ($paging->checkDisplay($i)) {
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$row['date'] = date("d.m.y H:i:s", $row['date']);
if ($_action != $action) {
diff --git a/customer_mysql.php b/customer_mysql.php
index bd9d48bf..cdfeedf8 100644
--- a/customer_mysql.php
+++ b/customer_mysql.php
@@ -78,7 +78,7 @@ if ($page == 'overview') {
Database::needRoot(true);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
- $row = \Froxlor\PhpHelper::htmlentities_array($row);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($row);
$mbdata_stmt = Database::prepare("SELECT SUM(data_length + index_length) as MB FROM information_schema.TABLES
WHERE table_schema = :table_schema
GROUP BY table_schema");
@@ -86,7 +86,7 @@ if ($page == 'overview') {
"table_schema" => $row['databasename']
));
$mbdata = $mbdata_stmt->fetch(PDO::FETCH_ASSOC);
- $row['size'] = \Froxlor\PhpHelper::size_readable($mbdata['MB'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
+ $row['size'] = \Froxlor\PhpHelper::sizeReadable($mbdata['MB'], 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
eval("\$mysqls.=\"" . \Froxlor\UI\Template::getTemplate('mysql/mysqls_database') . "\";");
$count ++;
}
@@ -133,7 +133,7 @@ if ($page == 'overview') {
if (isset($result['description']) && $result['description'] != '') {
$dbnamedesc .= ' (' . $result['description'] . ')';
}
- \Froxlor\UI\HTML::ask_yesno('mysql_reallydelete', $filename, array(
+ \Froxlor\UI\HTML::askYesNo('mysql_reallydelete', $filename, array(
'id' => $id,
'page' => $page,
'action' => $action
diff --git a/customer_traffic.php b/customer_traffic.php
index ae2c20c6..8989f108 100644
--- a/customer_traffic.php
+++ b/customer_traffic.php
@@ -106,9 +106,9 @@ if (! is_null($month) && ! is_null($year)) {
$show = $lng['traffic']['months'][intval($row['month'])] . ' ' . $row['year'];
}
- $traffic_complete['http'] = \Froxlor\PhpHelper::size_readable($traffic_complete['http'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
- $traffic_complete['ftp'] = \Froxlor\PhpHelper::size_readable($traffic_complete['ftp'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
- $traffic_complete['mail'] = \Froxlor\PhpHelper::size_readable($traffic_complete['mail'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
+ $traffic_complete['http'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['http'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
+ $traffic_complete['ftp'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['ftp'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
+ $traffic_complete['mail'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['mail'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
eval("echo \"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_details') . "\";");
} else {
@@ -158,9 +158,9 @@ if (! is_null($month) && ! is_null($year)) {
eval("\$traffic.=\"" . \Froxlor\UI\Template::getTemplate('traffic/traffic_traffic') . "\";");
}
- $traffic_complete['http'] = \Froxlor\PhpHelper::size_readable($traffic_complete['http'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
- $traffic_complete['ftp'] = \Froxlor\PhpHelper::size_readable($traffic_complete['ftp'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
- $traffic_complete['mail'] = \Froxlor\PhpHelper::size_readable($traffic_complete['mail'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
+ $traffic_complete['http'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['http'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
+ $traffic_complete['ftp'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['ftp'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
+ $traffic_complete['mail'] = \Froxlor\PhpHelper::sizeReadable($traffic_complete['mail'] * 1024, 'GiB', 'bi', '%01.' . (int) Settings::Get('panel.decimal_places') . 'f %s');
eval("echo \"" . \Froxlor\UI\Template::getTemplate('traffic/traffic') . "\";");
}
diff --git a/index.php b/index.php
index 0b0e09eb..bbe01c74 100644
--- a/index.php
+++ b/index.php
@@ -281,7 +281,7 @@ if ($action == '2fa_entercode') {
$replace_arr = array(
'CODE' => $code
);
- $mail_body = html_entity_decode(\Froxlor\PhpHelper::replace_variables($lng['mails']['2fa']['mailbody'], $replace_arr));
+ $mail_body = html_entity_decode(\Froxlor\PhpHelper::replaceVariables($lng['mails']['2fa']['mailbody'], $replace_arr));
try {
$mail->Subject = $lng['mails']['2fa']['subject'];
@@ -496,7 +496,7 @@ if ($action == 'forgotpwd') {
"lang" => $def_language
));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
- $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['password_reset']['subject']), $replace_arr));
+ $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result['value'] != '') ? $result['value'] : $lng['mails']['password_reset']['subject']), $replace_arr));
$result_stmt = Database::prepare('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '`
WHERE `adminid`= :adminid
@@ -508,7 +508,7 @@ if ($action == 'forgotpwd') {
"lang" => $def_language
));
$result = $result_stmt->fetch(PDO::FETCH_ASSOC);
- $mail_body = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result['value'] != '') ? $result['value'] : $lng['mails']['password_reset']['mailbody']), $replace_arr));
+ $mail_body = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result['value'] != '') ? $result['value'] : $lng['mails']['password_reset']['mailbody']), $replace_arr));
$_mailerror = false;
$mailerr_msg = "";
diff --git a/install/updates/preconfig.php b/install/updates/preconfig.php
index dff759f8..c2fd9dcf 100644
--- a/install/updates/preconfig.php
+++ b/install/updates/preconfig.php
@@ -51,5 +51,5 @@ function versionInUpdate($current_version, $version_to_check)
return true;
}
- return (\Froxlor\Froxlor::version_compare2($current_version, $version_to_check) == - 1 ? true : false);
+ return (\Froxlor\Froxlor::versionCompare2($current_version, $version_to_check) == - 1 ? true : false);
}
diff --git a/lib/Froxlor/Api/ApiCommand.php b/lib/Froxlor/Api/ApiCommand.php
index c8c5b3da..def0b562 100644
--- a/lib/Froxlor/Api/ApiCommand.php
+++ b/lib/Froxlor/Api/ApiCommand.php
@@ -423,7 +423,7 @@ abstract class ApiCommand extends ApiParameter
"var" => $varname
), true, true);
// @fixme html_entity_decode
- $content = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result['value'] != '') ? $result['value'] : $default), $replace_arr));
+ $content = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result['value'] != '') ? $result['value'] : $default), $replace_arr));
return $content;
}
diff --git a/lib/Froxlor/Api/Commands/Froxlor.php b/lib/Froxlor/Api/Commands/Froxlor.php
index c132f677..3adfd433 100644
--- a/lib/Froxlor/Api/Commands/Froxlor.php
+++ b/lib/Froxlor/Api/Commands/Froxlor.php
@@ -58,7 +58,7 @@ class Froxlor extends \Froxlor\Api\ApiCommand
// check for customized version to not output
// "There is a newer version of froxlor" besides the error-message
$isnewerversion = - 1;
- } elseif (\Froxlor\Froxlor::version_compare2($this->version, $_version) == - 1) {
+ } elseif (\Froxlor\Froxlor::versionCompare2($this->version, $_version) == - 1) {
// there is a newer version - yay
$isnewerversion = 1;
} else {
diff --git a/lib/Froxlor/Cron/Http/Apache.php b/lib/Froxlor/Cron/Http/Apache.php
index 0cff428c..99052659 100644
--- a/lib/Froxlor/Cron/Http/Apache.php
+++ b/lib/Froxlor/Cron/Http/Apache.php
@@ -762,14 +762,14 @@ class Apache extends HttpConfigBase
if (Settings::Get('system.logfiles_piped') == '1' && Settings::Get('system.logfiles_script') != '') {
// replace for error_log
- $command = \Froxlor\PhpHelper::replace_variables(Settings::Get('system.logfiles_script'), array(
+ $command = \Froxlor\PhpHelper::replaceVariables(Settings::Get('system.logfiles_script'), array(
'LOGFILE' => $error_log,
'DOMAIN' => $domain['domain'],
'CUSTOMER' => $domain['loginname']
));
$logfiles_text .= ' ErrorLog "| ' . $command . "\"\n";
// replace for access_log
- $command = \Froxlor\PhpHelper::replace_variables(Settings::Get('system.logfiles_script'), array(
+ $command = \Froxlor\PhpHelper::replaceVariables(Settings::Get('system.logfiles_script'), array(
'LOGFILE' => $access_log,
'DOMAIN' => $domain['domain'],
'CUSTOMER' => $domain['loginname']
diff --git a/lib/Froxlor/Cron/Http/HttpConfigBase.php b/lib/Froxlor/Cron/Http/HttpConfigBase.php
index 7c9633cf..9e6daf20 100644
--- a/lib/Froxlor/Cron/Http/HttpConfigBase.php
+++ b/lib/Froxlor/Cron/Http/HttpConfigBase.php
@@ -54,7 +54,7 @@ class HttpConfigBase
'SCHEME' => ($is_ssl_vhost) ? 'https' : 'http',
'DOCROOT' => $domain['documentroot']
);
- return \Froxlor\PhpHelper::replace_variables($template, $templateVars);
+ return \Froxlor\PhpHelper::replaceVariables($template, $templateVars);
}
protected function getMyPath($ip_port = null)
diff --git a/lib/Froxlor/Cron/Http/Php/Fcgid.php b/lib/Froxlor/Cron/Http/Php/Fcgid.php
index f93c8442..410261e3 100644
--- a/lib/Froxlor/Cron/Http/Php/Fcgid.php
+++ b/lib/Froxlor/Cron/Http/Php/Fcgid.php
@@ -167,7 +167,7 @@ class Fcgid
$phpini_file .= "; php.ini created/changed on " . date("Y.m.d H:i:s") . " for domain '" . $this->domain['domain'] . "' with id #" . $this->domain['id'] . " from php template '" . $phpconfig['description'] . "' with id #" . $phpconfig['id'] . "\n";
$phpini_file .= "; Do not change anything in this file, it will be overwritten by the Froxlor Cronjob!\n";
$phpini_file .= ";\n\n";
- $phpini_file .= \Froxlor\PhpHelper::replace_variables($phpconfig['phpsettings'], $php_ini_variables);
+ $phpini_file .= \Froxlor\PhpHelper::replaceVariables($phpconfig['phpsettings'], $php_ini_variables);
$phpini_file = str_replace('"none"', 'none', $phpini_file);
// $phpini_file = preg_replace('/\"+/', '"', $phpini_file);
$phpini_file_handler = fopen($this->getIniFile(), 'w');
diff --git a/lib/Froxlor/Cron/Http/Php/Fpm.php b/lib/Froxlor/Cron/Http/Php/Fpm.php
index 49b4bd34..ffb1338a 100644
--- a/lib/Froxlor/Cron/Http/Php/Fpm.php
+++ b/lib/Froxlor/Cron/Http/Php/Fpm.php
@@ -237,7 +237,7 @@ class Fpm
'CUSTOMER_HOMEDIR' => \Froxlor\FileDir::makeCorrectDir($this->domain['customerroot'])
);
- $phpini = \Froxlor\PhpHelper::replace_variables($phpconfig['phpsettings'], $php_ini_variables);
+ $phpini = \Froxlor\PhpHelper::replaceVariables($phpconfig['phpsettings'], $php_ini_variables);
$phpini_array = explode("\n", $phpini);
$fpm_config .= "\n\n";
diff --git a/lib/Froxlor/Cron/Traffic/ReportsCron.php b/lib/Froxlor/Cron/Traffic/ReportsCron.php
index 22a7c49c..779142e1 100644
--- a/lib/Froxlor/Cron/Traffic/ReportsCron.php
+++ b/lib/Froxlor/Cron/Traffic/ReportsCron.php
@@ -106,11 +106,11 @@ class ReportsCron extends \Froxlor\Cron\FroxlorCron
'varname' => 'trafficmaxpercent_subject'
);
$result2 = Database::pexecute_first($result2_stmt, $result2_data);
- $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['subject']), $replace_arr));
+ $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['subject']), $replace_arr));
$result2_data['varname'] = 'trafficmaxpercent_mailbody';
$result2 = Database::pexecute_first($result2_stmt, $result2_data);
- $mail_body = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['mailbody']), $replace_arr));
+ $mail_body = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['mailbody']), $replace_arr));
$_mailerror = false;
$mailerr_msg = "";
@@ -208,11 +208,11 @@ class ReportsCron extends \Froxlor\Cron\FroxlorCron
'varname' => 'trafficmaxpercent_subject'
);
$result2 = Database::pexecute_first($result2_stmt, $result2_data);
- $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['subject']), $replace_arr));
+ $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['subject']), $replace_arr));
$result2_data['varname'] = 'trafficmaxpercent_mailbody';
$result2 = Database::pexecute_first($result2_stmt, $result2_data);
- $mail_body = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['mailbody']), $replace_arr));
+ $mail_body = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['trafficmaxpercent']['mailbody']), $replace_arr));
$_mailerror = false;
$mailerr_msg = "";
@@ -407,11 +407,11 @@ class ReportsCron extends \Froxlor\Cron\FroxlorCron
'varname' => 'diskmaxpercent_subject'
);
$result2 = Database::pexecute_first($result2_stmt, $result2_data);
- $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['diskmaxpercent']['subject']), $replace_arr));
+ $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['diskmaxpercent']['subject']), $replace_arr));
$result2_data['varname'] = 'diskmaxpercent_mailbody';
$result2 = Database::pexecute_first($result2_stmt, $result2_data);
- $mail_body = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['diskmaxpercent']['mailbody']), $replace_arr));
+ $mail_body = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['diskmaxpercent']['mailbody']), $replace_arr));
$_mailerror = false;
$mailerr_msg = "";
@@ -500,11 +500,11 @@ class ReportsCron extends \Froxlor\Cron\FroxlorCron
'varname' => 'diskmaxpercent_subject'
);
$result2 = Database::pexecute_first($result2_stmt, $result2_data);
- $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['diskmaxpercent']['subject']), $replace_arr));
+ $mail_subject = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['diskmaxpercent']['subject']), $replace_arr));
$result2_data['varname'] = 'diskmaxpercent_mailbody';
$result2 = Database::pexecute_first($result2_stmt, $result2_data);
- $mail_body = html_entity_decode(\Froxlor\PhpHelper::replace_variables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['diskmaxpercent']['mailbody']), $replace_arr));
+ $mail_body = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result2['value'] != '') ? $result2['value'] : $lng['mails']['diskmaxpercent']['mailbody']), $replace_arr));
$_mailerror = false;
$mailerr_msg = "";
diff --git a/lib/Froxlor/Database/IntegrityCheck.php b/lib/Froxlor/Database/IntegrityCheck.php
index 1f3c2086..5d29b72d 100644
--- a/lib/Froxlor/Database/IntegrityCheck.php
+++ b/lib/Froxlor/Database/IntegrityCheck.php
@@ -229,7 +229,7 @@ class IntegrityCheck
* @param bool $fix
* Fix everything found directly
*/
- public function SubdomainSslRedirect($fix = false)
+ public function subdomainSslRedirect($fix = false)
{
$ips = array();
$parentdomains = array();
@@ -301,7 +301,7 @@ class IntegrityCheck
}
if ($fix) {
- return $this->SubdomainSslRedirect();
+ return $this->subdomainSslRedirect();
} else {
return true;
}
diff --git a/lib/Froxlor/FileDir.php b/lib/Froxlor/FileDir.php
index ffad0c9f..1f44da3f 100644
--- a/lib/Froxlor/FileDir.php
+++ b/lib/Froxlor/FileDir.php
@@ -217,8 +217,8 @@ class FileDir
'ADMIN_EMAIL' => $template['admin_email']
);
- // @fixme replace_variables
- $htmlcontent = PhpHelper::replace_variables($template['value'], $replace_arr);
+ // @fixme replaceVariables
+ $htmlcontent = PhpHelper::replaceVariables($template['value'], $replace_arr);
$indexhtmlpath = self::makeCorrectFile($destination . '/index.' . Settings::Get('system.index_file_extension'));
$index_html_handler = fopen($indexhtmlpath, 'w');
fwrite($index_html_handler, $htmlcontent);
diff --git a/lib/Froxlor/Froxlor.php b/lib/Froxlor/Froxlor.php
index 47f12639..56f5e5b4 100644
--- a/lib/Froxlor/Froxlor.php
+++ b/lib/Froxlor/Froxlor.php
@@ -210,7 +210,7 @@ final class Froxlor
*
* @return integer 0 if equal, 1 if a>b and -1 if b>a
*/
- public static function version_compare2($a, $b)
+ public static function versionCompare2($a, $b)
{
// split version into pieces and remove trailing .0
diff --git a/lib/Froxlor/Idna/IdnaWrapper.php b/lib/Froxlor/Idna/IdnaWrapper.php
index d452367d..2665341f 100644
--- a/lib/Froxlor/Idna/IdnaWrapper.php
+++ b/lib/Froxlor/Idna/IdnaWrapper.php
@@ -55,16 +55,10 @@ class IdnaWrapper
*/
public function encode($to_encode)
{
- $to_encode = $this->is_utf8($to_encode) ? $to_encode : utf8_encode($to_encode);
+ $to_encode = $this->isUtf8($to_encode) ? $to_encode : utf8_encode($to_encode);
return $this->idna_converter->encode($to_encode);
}
- public function encode_uri($to_encode)
- {
- $to_encode = $this->is_utf8($to_encode) ? $to_encode : utf8_encode($to_encode);
- return $this->idna_converter->encodeUri($to_encode);
- }
-
/**
* Decode a domain name, a email address or a list of one of both.
*
@@ -87,7 +81,7 @@ class IdnaWrapper
*
* @return boolean
*/
- private function is_utf8($string = null)
+ private function isUtf8($string = null)
{
if (function_exists("mb_detect_encoding")) {
if (mb_detect_encoding($string, 'UTF-8, ISO-8859-1') === 'UTF-8') {
diff --git a/lib/Froxlor/PhpHelper.php b/lib/Froxlor/PhpHelper.php
index 5f33377b..1a5426c3 100644
--- a/lib/Froxlor/PhpHelper.php
+++ b/lib/Froxlor/PhpHelper.php
@@ -20,7 +20,7 @@ class PhpHelper
* @return array The array with htmlentitie'd strings
* @author Florian Lippert
*/
- public static function htmlentities_array($subject, $fields = '', $quote_style = ENT_QUOTES, $charset = 'UTF-8')
+ public static function htmlentitiesArray($subject, $fields = '', $quote_style = ENT_QUOTES, $charset = 'UTF-8')
{
if (is_array($subject)) {
if (! is_array($fields)) {
@@ -30,7 +30,7 @@ class PhpHelper
foreach ($subject as $field => $value) {
if ((! is_array($fields) || empty($fields)) || (is_array($fields) && ! empty($fields) && in_array($field, $fields))) {
// Just call ourselve to manage multi-dimensional arrays
- $subject[$field] = self::htmlentities_array($subject[$field], $fields, $quote_style, $charset);
+ $subject[$field] = self::htmlentitiesArray($subject[$field], $fields, $quote_style, $charset);
}
}
} else {
@@ -55,7 +55,7 @@ class PhpHelper
* @return array The str_replace'd array
* @author Florian Lippert
*/
- public static function str_replace_array($search, $replace, $subject, $fields = '')
+ public static function strReplaceArray($search, $replace, $subject, $fields = '')
{
if (is_array($subject)) {
$fields = self::array_trim(explode(' ', $fields));
@@ -162,7 +162,7 @@ class PhpHelper
if ($has_data) {
sort($data_files);
foreach ($data_files as $data_filename) {
- $data = array_merge_recursive($data, include ($data_filename));
+ $data = array_merge_recursive($data, include $data_filename);
}
}
@@ -257,7 +257,7 @@ class PhpHelper
* @param
* string
*/
- public static function size_readable($size, $max = null, $system = 'si', $retstring = '%01.2f %s')
+ public static function sizeReadable($size, $max = null, $system = 'si', $retstring = '%01.2f %s')
{
// Pick units
$systems = array(
@@ -312,7 +312,7 @@ class PhpHelper
*
* @return string The submitted string with the variables replaced.
*/
- public static function replace_variables($text, $vars)
+ public static function replaceVariables($text, $vars)
{
$pattern = "/\{([a-zA-Z0-9\-_]+)\}/";
$matches = array();
diff --git a/lib/Froxlor/System/Crypt.php b/lib/Froxlor/System/Crypt.php
index b423ca70..873d7cec 100644
--- a/lib/Froxlor/System/Crypt.php
+++ b/lib/Froxlor/System/Crypt.php
@@ -224,7 +224,7 @@ class Crypt
if ($pwd_hash == $pwd_check) {
// check for update of hash (only if our database is ready to handle the bigger string)
- $is_ready = (\Froxlor\Froxlor::version_compare2("0.9.33", \Froxlor\Froxlor::getVersion()) <= 0 ? true : false);
+ $is_ready = (\Froxlor\Froxlor::versionCompare2("0.9.33", \Froxlor\Froxlor::getVersion()) <= 0 ? true : false);
if ($update_hash && $is_ready) {
$upd_stmt = \Froxlor\Database\Database::prepare("
UPDATE " . $table . " SET `password` = :newpasswd WHERE `" . $uid . "` = :uid
diff --git a/lib/Froxlor/UI/Form.php b/lib/Froxlor/UI/Form.php
index 9d1131f7..e8816491 100644
--- a/lib/Froxlor/UI/Form.php
+++ b/lib/Froxlor/UI/Form.php
@@ -155,7 +155,7 @@ class Form
} else {
$filename = '';
}
- \Froxlor\UI\HTML::ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array(
+ \Froxlor\UI\HTML::askYesNo($question, $filename, array_merge($url_params, $submitted_fields, array(
$question => $question
)), $targetname);
}
@@ -259,7 +259,7 @@ class Form
} else {
$filename = '';
}
- \Froxlor\UI\HTML::ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array(
+ \Froxlor\UI\HTML::askYesNo($question, $filename, array_merge($url_params, $submitted_fields, array(
$question => $question
)), $targetname);
}
diff --git a/lib/Froxlor/UI/HTML.php b/lib/Froxlor/UI/HTML.php
index b5c991aa..b3ada3f2 100644
--- a/lib/Froxlor/UI/HTML.php
+++ b/lib/Froxlor/UI/HTML.php
@@ -252,7 +252,7 @@ class HTML
*
* @return string outputs parsed question_yesno template
*/
- public static function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_nr = 1)
+ public static function askYesNo($text, $yesfile, $params = array(), $targetname = '', $back_nr = 1)
{
global $userinfo, $s, $header, $footer, $lng, $theme;
@@ -275,7 +275,7 @@ class HTML
exit();
}
- public static function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '', $show_checkbox = true)
+ public static function askYesNoWithCheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '', $show_checkbox = true)
{
global $userinfo, $s, $header, $footer, $lng, $theme;
diff --git a/phpcs.xml b/phpcs.xml
index a0e35d74..cee61c72 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -9,10 +9,26 @@
-
-
+
+
+
+ tests/
+
+
+
+ lib/Froxlor/Settings.php
+ lib/Froxlor/FileDir.php
+ lib/Froxlor/Validate/Validate.php
+ lib/Froxlor/Database/Database.php
+ lib/Froxlor/UI/Response.php
+
+
+
+ tests/bootstrap.php
+
diff --git a/ssl_certificates.php b/ssl_certificates.php
index 554d7613..865ec835 100644
--- a/ssl_certificates.php
+++ b/ssl_certificates.php
@@ -149,7 +149,7 @@ if (count($all_certs) == 0) {
}
}
- $row = \Froxlor\PhpHelper::htmlentities_array($cert);
+ $row = \Froxlor\PhpHelper::htmlentitiesArray($cert);
eval("\$certificates.=\"" . \Froxlor\UI\Template::getTemplate("ssl_certificates/certs_cert", true) . "\";");
} else {
$message = sprintf($lng['domains']['ssl_certificate_error'], $cert['domain']);