';
}
$question .= '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -147,7 +147,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'When entering MX servers to Froxlor there was no mail-, imap-, pop3- and smtp-"A record" created. You can now chose whether this should be done or not.';
$question = 'Do you want these A-records to be created even with MX servers given?: ';
$question .= \Froxlor\UI\HTML::makeyesno('update_defdns_mailentry', '1', '0', '0');
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.10-svn1')) {
@@ -192,7 +192,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question = $question2;
}
}
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -201,7 +201,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'you can now decide whether Froxlor should be reached via hostname/froxlor or directly via the hostname.';
$question = 'Do you want Froxlor to be reached directly via the hostname?: ';
$question .= \Froxlor\UI\HTML::makeyesno('update_directlyviahostname', '1', '0', '0');
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.11-svn1')) {
@@ -209,7 +209,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'It is possible to enhance security with setting a regular expression to force your customers to enter more complex passwords.';
$question = 'Enter a regular expression to force a higher password complexity (leave empty for none): ';
$question .= '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.11-svn3')) {
@@ -217,7 +217,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'As Froxlor can now handle perl, you have to specify where the perl executable is (only if you\'re running lighttpd, else just leave empty).';
$question = 'Path to perl (default \'/usr/bin/perl\'): ';
$question .= '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.12-svn1')) {
@@ -231,7 +231,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question .= '
';
$question .= 'Local group: ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -243,7 +243,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question .= 'If \'yes\', please specify a path within the suexec path where Froxlor will create symlinks to customer perl-enabled paths:
';
$question .= 'Path for symlinks (must be within suexec path): ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.12-svn4')) {
@@ -252,7 +252,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'Due to different paths of awstats_buildstaticpages.pl and awstats.pl you can set a different path for awstats.pl now.';
$question = 'Path to \'awstats.pl\'?: ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -262,7 +262,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'Froxlor can now limit the number of autoresponder-entries for each user. Here you can set the value which will be available for each customer (Of course you can change the value for each customer separately after the update).';
$question = 'How many autoresponders should your customers be able to add?: ';
$question .= ' ' . \Froxlor\UI\HTML::makecheckbox('update_autoresponder_default', $lng['customer']['unlimited'], '-1', false, 0, true, true) . ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -275,10 +275,10 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$configs_array = \Froxlor\Http\PhpConfig::getPhpConfigs();
$configs = '';
foreach ($configs_array as $idx => $desc) {
- $configs .= makeoption($desc, $idx, '1');
+ $configs .= \Froxlor\UI\HTML::makeoption($desc, $idx, '1');
}
$question .= $configs . '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -288,7 +288,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'To have icons in AWStats statistic-pages please enter the path to AWStats icons folder.';
$question = 'Path to AWSTats icons folder: ';
$question .= '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -298,7 +298,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'Froxlor now has the possibility to set \'SSLCertificateChainFile\' for the apache webserver.';
$question = 'Enter filename (leave empty for none): ';
$question .= '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -307,14 +307,14 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'You can now allow customers to use any of their domains as username for the login.';
$question = 'Do you want to enable domain-login for all customers?: ';
$question .= \Froxlor\UI\HTML::makeyesno('update_allow_domain_login', '1', '0', '0');
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.14-svn10')) {
$has_preconfig = true;
$description = 'This update removes the unsupported real-time option. Additionally the deprecated tables for navigation and cronscripts are removed, any modules using these tables need to be updated to the new structure!';
$question = '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.16-svn1')) {
@@ -332,8 +332,8 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question .= '
';
$question = 'Please enter full path to you nginx/fastcgi_params file (including filename): ';
$question .= '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -439,7 +439,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question = 'Do you want to automatically append the domain-name to the documentroot of newly created domains?: ';
$question .= \Froxlor\UI\HTML::makeyesno('update_system_documentroot_use_default_value', '1', '0', '0');
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.28')) {
@@ -457,7 +457,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
}
$question = '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.29-dev1')) {
@@ -467,7 +467,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'Standard-subdomains can now be hidden from the php-configuration overview. ';
$question = 'Do you want to hide the standard-subdomains (this can be changed in the settings any time)?: ';
$question .= \Froxlor\UI\HTML::makeyesno('hide_stdsubdomains', '1', '0', '0');
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -477,7 +477,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question = 'If you want to disallow theme-changing, select "no" from the dropdowns: ';
$question .= "Admins: " . \Froxlor\UI\HTML::makeyesno('allow_themechange_a', '1', '0', '1') . ' ';
$question .= "Customers: " . \Froxlor\UI\HTML::makeyesno('allow_themechange_c', '1', '0', '1');
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.29-dev3')) {
@@ -485,7 +485,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'There is now a possibility to specify AXFR servers for your bind zone-configuration ';
$question = 'Enter a comma-separated list of AXFR servers or leave empty (default): ';
$question .= '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.29-dev4')) {
@@ -493,14 +493,14 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'As customers can now specify ssl-certificate data for their domains, you need to specify where the generated files are stored ';
$question = 'Specify the directory for customer ssl-certificates: ';
$question .= '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.29.1-dev3')) {
$has_preconfig = true;
$description = 'The build in logrotation-feature has been removed. Please follow the configuration-instructions for your system to enable logrotating again.';
$question = '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
// let the apache+fpm users know that they MUST change their config
@@ -519,7 +519,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
</Location>
</IfModule>';
$question = '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -528,7 +528,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$has_preconfig = true;
$description = 'The FPM socket directory is now a setting in froxlor. Its default is /var/lib/apache2/fastcgi/. If you are using /var/run/apache2 in the "fastcgi.conf" (Debian/Ubuntu) or "70_fastcgi.conf" (Gentoo) please correct this path accordingly ';
$question = '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -536,7 +536,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$has_preconfig = true;
$description = 'The template-variable {PASSWORD} has been replaced with {LINK}. Please update your password reset templates! ';
$question = '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.31-dev5')) {
@@ -546,7 +546,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question .= \Froxlor\UI\HTML::makeyesno('update_error_report_admin', '1', '0', '1') . ' ';
$question .= 'Do you want to enable error-reporting for customers? (default: no): ';
$question .= \Froxlor\UI\HTML::makeyesno('update_error_report_customer', '1', '0', '0');
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.31-rc2')) {
@@ -554,7 +554,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'You can enable/disable the display/usage of the news-feed for admins
';
$question = 'Do you want to enable the news-feed for admins? (default: yes): ';
$question .= \Froxlor\UI\HTML::makeyesno('update_admin_news_feed', '1', '0', '1') . ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.32-dev2')) {
@@ -565,20 +565,20 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question .= 'Mail Transfer Agent ';
$question .= 'Type of your MTA: ';
$question .= ' ';
$question .= 'Logfile for your MTA: ';
$question .= ' ';
$question .= 'Mail Delivery Agent ';
$question .= 'Type of your MDA: ';
$question .= '
';
$question .= 'Logfile for your MDA: ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.32-dev5')) {
@@ -586,7 +586,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'Froxlor now generates a cron-configuration file for the cron-daemon. Please set a filename which will be included automatically by your crond (e.g. files in /etc/cron.d/)
';
$question = 'Path to the cron-service configuration-file. This file will be updated regularly and automatically by froxlor. Note: please be sure to use the same filename as for the main froxlor cronjob (default: /etc/cron.d/froxlor)! ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.32-dev6')) {
@@ -594,7 +594,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'In order for the new cron.d file to work properly, we need to know about the cron-service reload command.
';
$question = 'Please specify the reload-command of your cron-daemon (default: /etc/init.d/cron reload) ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.32-rc2')) {
@@ -602,7 +602,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'To customize the command which executes the cronjob (php - basically) change the path below according to your system.
';
$question = 'Please specify the command to execute cronscripts (default: "/usr/bin/nice -n 5 /usr/bin/php5 -q") ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.33-dev1')) {
@@ -612,7 +612,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question .= \Froxlor\UI\HTML::makeyesno('customer_show_news_feed', '1', '0', '0') . ' ';
$question .= 'You have to set the URL for your RSS-feed here, if you have chosen to enable the custom newsfeed on the customer-dashboard: ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.33-dev2')) {
@@ -622,7 +622,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'You can enable/disable the generation of the bind-zone / config for the system hostname.
';
$question = 'Do you want to generate a bind-zone for the system-hostname? (default: no): ';
$question .= \Froxlor\UI\HTML::makeyesno('dns_createhostnameentry', '1', '0', '0') . ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -631,7 +631,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'You can chose whether you want to receive an e-mail on cronjob errors. Keep in mind that this can lead to an e-mail being sent every 5 minutes.
';
$question = 'Do you want to receive cron-errors via mail? (default: no): ';
$question .= \Froxlor\UI\HTML::makeyesno('system_send_cron_errors', '1', '0', '0') . ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.34-dev3')) {
@@ -645,7 +645,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question .= 'installed/loaded';
}
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_db_version, '201603070')) {
@@ -653,7 +653,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'You can chose whether you want to enable or disable our Let\'s Encrypt implementation. Please remember that you need to go through the webserver-configuration when enabled because this feature needs a special configuration.
';
$question = 'Do you want to enable Let\'s Encrypt? (default: yes): ';
$question .= \Froxlor\UI\HTML::makeyesno('enable_letsencrypt', '1', '0', '1') . ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_db_version, '201604270')) {
@@ -661,7 +661,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'You can chose whether you want to enable or disable our backup function.
';
$question = 'Do you want to enable Backup? (default: no): ';
$question .= \Froxlor\UI\HTML::makeyesno('enable_backup', '1', '0', '0') . ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_db_version, '201605090')) {
@@ -669,7 +669,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'You can chose whether you want to enable or disable our DNS editor
';
$question = 'Do you want to enable the DNS editor? (default: no): ';
$question .= \Froxlor\UI\HTML::makeyesno('enable_dns', '1', '0', '0') . ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_db_version, '201605170')) {
@@ -677,10 +677,10 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'Froxlor now supports the dns-daemon Power-DNS, you can chose between bind and powerdns now.';
$question = 'Select dns-daemon you want to use: ';
$question .= '';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_db_version, '201609120')) {
@@ -689,7 +689,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'You can now customize the path to your acme.conf file (global alias for Let\'s Encrypt). If you already set up Let\'s Encrypt and the acme.conf file, please set this to the complete path to the file!
';
$question = 'Path to the acme.conf alias-file. ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
@@ -710,7 +710,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$question .= ' ';
$question .= 'SMTP password? ';
$question .= ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_db_version, '201705050')) {
@@ -718,7 +718,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'DEBIAN/UBUNTU ONLY: Enable usage of libnss-extrausers as alternative to libnss-mysql (NOTE: if enabled, go through the configuration steps right after the update!!!)
';
$question = 'Enable usage of libnss-extrausers? ';
$question .= \Froxlor\UI\HTML::makeyesno('system_nssextrausers', '1', '0', '0') . ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_db_version, '201712310')) {
@@ -727,7 +727,7 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version, $c
$description = 'Chose whether you want to disable the Let\'s Encrypt selfcheck as it causes false positives for some configurations.
';
$question = 'Disable Let\'s Encrypt self-check? ';
$question .= \Froxlor\UI\HTML::makeyesno('system_disable_le_selfcheck', '1', '0', '0') . ' ';
- eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
+ eval("\$return.=\"" . \Froxlor\UI\Template::getTemplate("update/preconfigitem") . "\";");
}
}
}
diff --git a/lib/Froxlor/Cron/Http/Apache.php b/lib/Froxlor/Cron/Http/Apache.php
index e04a51f0..37182ea3 100644
--- a/lib/Froxlor/Cron/Http/Apache.php
+++ b/lib/Froxlor/Cron/Http/Apache.php
@@ -561,7 +561,7 @@ class Apache extends HttpConfigBase
if ($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') {
// This vHost has PHP enabled and we are using the regular mod_php
- $cmail = getCustomerDetail($domain['customerid'], 'email');
+ $cmail = \Froxlor\Customer\Customer::getCustomerDetail($domain['customerid'], 'email');
$php_options_text .= ' php_admin_value sendmail_path "/usr/sbin/sendmail -t -f ' . $cmail . '"' . PHP_EOL;
if ($domain['openbasedir'] == '1') {
@@ -1220,7 +1220,7 @@ class Apache extends HttpConfigBase
// check for suexec-workaround, #319
if ((int) Settings::Get('perl.suexecworkaround') == 1) {
// symlink this directory to suexec-safe-path
- $loginname = getCustomerDetail($row_diroptions['customerid'], 'loginname');
+ $loginname = \Froxlor\Customer\Customer::getCustomerDetail($row_diroptions['customerid'], 'loginname');
$suexecpath = \Froxlor\FileDir::makeCorrectDir(Settings::Get('perl.suexecpath') . '/' . $loginname . '/' . md5($row_diroptions['path']) . '/');
if (! file_exists($suexecpath)) {
@@ -1240,7 +1240,7 @@ class Apache extends HttpConfigBase
// if no perl-execution is enabled but the workaround is,
// we have to remove the symlink and folder in suexecpath
if ((int) Settings::Get('perl.suexecworkaround') == 1) {
- $loginname = getCustomerDetail($row_diroptions['customerid'], 'loginname');
+ $loginname = \Froxlor\Customer\Customer::getCustomerDetail($row_diroptions['customerid'], 'loginname');
$suexecpath = \Froxlor\FileDir::makeCorrectDir(Settings::Get('perl.suexecpath') . '/' . $loginname . '/' . md5($row_diroptions['path']) . '/');
$perlsymlink = \Froxlor\FileDir::makeCorrectFile($row_diroptions['path'] . '/cgi-bin');
diff --git a/lib/Froxlor/Cron/Http/Php/Fcgid.php b/lib/Froxlor/Cron/Http/Php/Fcgid.php
index 0a92bed8..e917d073 100644
--- a/lib/Froxlor/Cron/Http/Php/Fcgid.php
+++ b/lib/Froxlor/Cron/Http/Php/Fcgid.php
@@ -96,7 +96,7 @@ class Fcgid
// remove +i attibute, so starter can be overwritten
if (file_exists($this->getStarterFile())) {
- removeImmutable($this->getStarterFile());
+ \Froxlor\FileDir::removeImmutable($this->getStarterFile());
}
$starter_file_handler = fopen($this->getStarterFile(), 'w');
@@ -104,7 +104,7 @@ class Fcgid
fclose($starter_file_handler);
\Froxlor\FileDir::safe_exec('chmod 750 ' . escapeshellarg($this->getStarterFile()));
\Froxlor\FileDir::safe_exec('chown ' . $this->_domain['guid'] . ':' . $this->_domain['guid'] . ' ' . escapeshellarg($this->getStarterFile()));
- setImmutable($this->getStarterFile());
+ \Froxlor\FileDir::setImmutable($this->getStarterFile());
}
/**
diff --git a/lib/Froxlor/FileDir.php b/lib/Froxlor/FileDir.php
index d3260c6d..9590b2bf 100644
--- a/lib/Froxlor/FileDir.php
+++ b/lib/Froxlor/FileDir.php
@@ -419,7 +419,7 @@ class FileDir
}
$dir = self::makeCorrectDir($dir);
}
- $_field .= makeoption($dir, $dir, $value);
+ $_field .= \Froxlor\UI\HTML::makeoption($dir, $dir, $value);
}
$field = array(
'type' => 'select',
diff --git a/lib/Froxlor/Settings.php b/lib/Froxlor/Settings.php
index 2d8d0701..a020f2a2 100644
--- a/lib/Froxlor/Settings.php
+++ b/lib/Froxlor/Settings.php
@@ -32,23 +32,10 @@ use Froxlor\Database\Database;
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Classes
*
- * @method static mixed Get ($setting = null) return a setting-value by its group and varname separated by a dot (group.varname)
- * @method static boolean Set ($setting = null, $value = null, $instant_save = true) update a setting / set a new value
- * @method static boolean IsInList ($setting = null, $entry = null) tests if a setting-value that i s a comma separated list contains an entry
- * @method static boolean AddNew ($setting = null, $value = null) add a new setting to the database (mainly used in updater)
- * @method static boolean Flush () Store all un-saved changes to the database and re-read in all settings
- * @method static void Stash () forget all un-saved changes to settings
*/
class Settings
{
- /**
- * current settings object
- *
- * @var object
- */
- private static $_obj = null;
-
/**
* settings data
*
@@ -74,27 +61,30 @@ class Settings
/**
* private constructor, reads in all settings
*/
- private function __construct()
+ private static function init()
{
- $this->_readSettings();
- self::$_updatedata = array();
- // prepare statement
- self::$_updstmt = Database::prepare("
+ if (empty(self::$_data)) {
+ self::_readSettings();
+ self::$_updatedata = array();
+
+ // prepare statement
+ self::$_updstmt = Database::prepare("
UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = :value
WHERE `settinggroup` = :group AND `varname` = :varname
- ");
+ ");
+ }
}
/**
* Read in all settings from the database
* and set the internal $_data array
*/
- private function _readSettings()
+ private static function _readSettings()
{
$result_stmt = Database::query("
- SELECT `settingid`, `settinggroup`, `varname`, `value`
- FROM `" . TABLE_PANEL_SETTINGS . "`
- ");
+ SELECT `settingid`, `settinggroup`, `varname`, `value`
+ FROM `" . TABLE_PANEL_SETTINGS . "`
+ ");
self::$_data = array();
while ($row = $result_stmt->fetch(\PDO::FETCH_ASSOC)) {
self::$_data[$row['settinggroup']][$row['varname']] = $row['value'];
@@ -127,8 +117,9 @@ class Settings
*
* @return mixed
*/
- public function pGet($setting = null)
+ public function Get($setting = null)
{
+ self::init();
$sstr = explode(".", $setting);
// no separator - do'h
if (! isset($sstr[1])) {
@@ -151,9 +142,10 @@ class Settings
*
* @return boolean true, if the list contains $entry
*/
- public function pIsInList($setting = null, $entry = null)
+ public function IsInList($setting = null, $entry = null)
{
- $s = Settings::Get($setting);
+ self::init();
+ $s = self::Get($setting);
if ($s == null) {
return false;
}
@@ -171,10 +163,11 @@ class Settings
*
* @return bool
*/
- public function pSet($setting = null, $value = null, $instant_save = true)
+ public function Set($setting = null, $value = null, $instant_save = true)
{
+ self::init();
// check whether the setting exists
- if (Settings::Get($setting) !== null) {
+ if (self::Get($setting) !== null) {
// set new value in array
$sstr = explode(".", $setting);
if (! isset($sstr[1])) {
@@ -183,7 +176,7 @@ class Settings
self::$_data[$sstr[0]][$sstr[1]] = $value;
// should we store to db instantly?
if ($instant_save) {
- $this->_storeSetting($sstr[0], $sstr[1], $value);
+ self::_storeSetting($sstr[0], $sstr[1], $value);
} else {
// set temporary data for usage
if (! isset(self::$_data[$sstr[0]]) || ! is_array(self::$_data[$sstr[0]])) {
@@ -210,11 +203,11 @@ class Settings
*
* @return boolean
*/
- public function pAddNew($setting = null, $value = null)
+ public function AddNew($setting = null, $value = null)
{
-
+ self::init();
// first check if it doesn't exist
- if (Settings::Get($setting) === null) {
+ if (self::Get($setting) === null) {
// validate parameter
$sstr = explode(".", $setting);
if (! isset($sstr[1])) {
@@ -244,19 +237,20 @@ class Settings
* Store all un-saved changes to the database and
* re-read in all settings
*/
- public function pFlush()
+ public static function Flush()
{
+ self::init();
if (is_array(self::$_updatedata) && count(self::$_updatedata) > 0) {
// save all un-saved changes to the settings
foreach (self::$_updatedata as $group => $vargroup) {
foreach ($vargroup as $varname => $value) {
- $this->_storeSetting($group, $varname, $value);
+ self::_storeSetting($group, $varname, $value);
}
}
// now empty the array
self::$_updatedata = array();
// re-read in all settings
- return $this->_readSettings();
+ return self::_readSettings();
}
return false;
}
@@ -264,50 +258,13 @@ class Settings
/**
* forget all un-saved changes to settings
*/
- public function pStash()
+ public static function Stash()
{
+ self::init();
// empty update array
self::$_updatedata = array();
}
- /**
- * create new object and return instance
- *
- * @return object
- */
- private static function getInstance()
- {
- // do we got an object already?
- if (self::$_obj == null) {
- self::$_obj = new self();
- }
- // return it
- return self::$_obj;
- }
-
- /**
- * let's us interact with the settings-Object by using static
- * call like "Settings::function()"
- *
- * @param string $name
- * @param mixed $args
- *
- * @return mixed
- */
- public static function __callStatic($name, $args)
- {
- // as our functions are not static and therefore cannot
- // be called statically, we prefix a 'p' to all of
- // our public functions so we can use Settings::functionname()
- // which looks cooler and is easier to use
- $callback = array(
- self::getInstance(),
- "p" . $name
- );
- $result = call_user_func_array($callback, $args);
- return $result;
- }
-
public static function loadSettingsInto(&$settings_data)
{
if (is_array($settings_data) && isset($settings_data['groups']) && is_array($settings_data['groups'])) {
diff --git a/lib/Froxlor/UI/Form.php b/lib/Froxlor/UI/Form.php
index 98c5a2f1..027169c7 100644
--- a/lib/Froxlor/UI/Form.php
+++ b/lib/Froxlor/UI/Form.php
@@ -173,7 +173,7 @@ class Form
// Save fields
foreach ($groupdetails['fields'] as $fieldname => $fielddetails) {
if (isset($changed_fields[$fieldname])) {
- if (($saved_field = self::saveFormField($fieldname, $fielddetails, manipulateFormFieldData($fieldname, $fielddetails, $changed_fields[$fieldname]))) !== false) {
+ if (($saved_field = self::saveFormField($fieldname, $fielddetails, self::manipulateFormFieldData($fieldname, $fielddetails, $changed_fields[$fieldname]))) !== false) {
$saved_fields = array_merge($saved_fields, $saved_field);
} else {
\Froxlor\UI\Response::standard_error('errorwhensaving', $fieldname);
@@ -525,4 +525,4 @@ class Form
return $array1;
}
}
-}
\ No newline at end of file
+}
diff --git a/logfiles_viewer.php b/logfiles_viewer.php
index 9ee8d4ef..d4d4e2c2 100644
--- a/logfiles_viewer.php
+++ b/logfiles_viewer.php
@@ -59,8 +59,8 @@ if (function_exists('exec')) {
}
}
// The normal access/error - logging is enabled
- $error_log = \Froxlor\FileDir::makeCorrectFile(Settings::Get('system.logfiles_directory') . getCustomerDetail($domain['customerid'], 'loginname') . $speciallogfile . '-error.log');
- $access_log = \Froxlor\FileDir::makeCorrectFile(Settings::Get('system.logfiles_directory') . getCustomerDetail($domain['customerid'], 'loginname') . $speciallogfile . '-access.log');
+ $error_log = \Froxlor\FileDir::makeCorrectFile(Settings::Get('system.logfiles_directory') . \Froxlor\Customer\Customer::getCustomerDetail($domain['customerid'], 'loginname') . $speciallogfile . '-error.log');
+ $access_log = \Froxlor\FileDir::makeCorrectFile(Settings::Get('system.logfiles_directory') . \Froxlor\Customer\Customer::getCustomerDetail($domain['customerid'], 'loginname') . $speciallogfile . '-access.log');
// error log
if (file_exists($error_log)) {