also check for php.configs that are set as default on deletion; emphasize default config in overview

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-02-18 17:13:25 +01:00
parent 8ff2c930ee
commit 4f4689c4e9
3 changed files with 21 additions and 0 deletions

View File

@@ -72,6 +72,7 @@ if ($page == 'overview') {
} }
} }
// check whether we use that config as froxor-vhost config
if (Settings::Get('system.mod_fcgid_defaultini_ownvhost') == $row['id'] if (Settings::Get('system.mod_fcgid_defaultini_ownvhost') == $row['id']
|| Settings::Get('phpfpm.vhost_defaultini') == $row['id'] || Settings::Get('phpfpm.vhost_defaultini') == $row['id']
) { ) {
@@ -81,6 +82,16 @@ if ($page == 'overview') {
if ($domains == '') { if ($domains == '') {
$domains = $lng['admin']['phpsettings']['notused']; $domains = $lng['admin']['phpsettings']['notused'];
} }
// check whether this is our default config
if ((Settings::Get('system.mod_fcgid') == '1'
&& Settings::Get('system.mod_fcgid_defaultini') == $id)
|| (Settings::Get('phpfpm.enabled') == '1'
&& Settings::Get('phpfpm.defaultini') == $id)
) {
$row['description'] = '<b>'.$row['description'].'</b>';
}
$count ++; $count ++;
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";"); eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
} }
@@ -189,6 +200,14 @@ if ($page == 'overview') {
standard_error('cannotdeletehostnamephpconfig'); standard_error('cannotdeletehostnamephpconfig');
} }
if ((Settings::Get('system.mod_fcgid') == '1'
&& Settings::Get('system.mod_fcgid_defaultini') == $id)
|| (Settings::Get('phpfpm.enabled') == '1'
&& Settings::Get('phpfpm.defaultini') == $id)
) {
standard_error('cannotdeletedefaultphpconfig');
}
if ($result['id'] != 0 if ($result['id'] != 0
&& $result['id'] == $id && $result['id'] == $id
&& (int)$userinfo['change_serversettings'] == 1 && (int)$userinfo['change_serversettings'] == 1

View File

@@ -1814,3 +1814,4 @@ $lng['question']['admin_integritycheck_reallyfix'] = 'Do you really want to try
$lng['serversettings']['system_croncmdline']['title'] = 'Cron execution command (php-binary)'; $lng['serversettings']['system_croncmdline']['title'] = 'Cron execution command (php-binary)';
$lng['serversettings']['system_croncmdline']['description'] = 'Command to execute our cronjobs. Change this only if you know what you are doing (default: "/usr/bin/nice -n 5 /usr/bin/php5 -q")!'; $lng['serversettings']['system_croncmdline']['description'] = 'Command to execute our cronjobs. Change this only if you know what you are doing (default: "/usr/bin/nice -n 5 /usr/bin/php5 -q")!';
$lng['error']['cannotdeletehostnamephpconfig'] = 'This PHP-configuration is used by the Froxlor-vhost and cannot be deleted.'; $lng['error']['cannotdeletehostnamephpconfig'] = 'This PHP-configuration is used by the Froxlor-vhost and cannot be deleted.';
$lng['error']['cannotdeletedefaultphpconfig'] = 'This PHP-configuration is set as default and cannot be deleted.';

View File

@@ -1540,3 +1540,4 @@ $lng['question']['admin_integritycheck_reallyfix'] = 'M&ouml;chten Sie wirklich
$lng['serversettings']['system_croncmdline']['title'] = 'Cron Startbefehl (php Programm)'; $lng['serversettings']['system_croncmdline']['title'] = 'Cron Startbefehl (php Programm)';
$lng['serversettings']['system_croncmdline']['description'] = 'Befehl zum Ausführen des Cronjobs. Ändern dieser Einstellung nur wenn nötig (Standard: "/usr/bin/nice -n 5 /usr/bin/php5 -q")!'; $lng['serversettings']['system_croncmdline']['description'] = 'Befehl zum Ausführen des Cronjobs. Ändern dieser Einstellung nur wenn nötig (Standard: "/usr/bin/nice -n 5 /usr/bin/php5 -q")!';
$lng['error']['cannotdeletehostnamephpconfig'] = 'Diese PHP-Konfiguration ist dem Froxlor-Vhost zugewiesen und kann daher nicht gelöscht werden.'; $lng['error']['cannotdeletehostnamephpconfig'] = 'Diese PHP-Konfiguration ist dem Froxlor-Vhost zugewiesen und kann daher nicht gelöscht werden.';
$lng['error']['cannotdeletedefaultphpconfig'] = 'Diese PHP-Konfiguration ist als Standard hinterlegt und kann daher nicht gelöscht werden.';