show and check whether a php-config is used by the system-hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -70,7 +70,15 @@ if ($page == 'overview') {
|
|||||||
while ($row2 = $domainresult_stmt->fetch(PDO::FETCH_ASSOC)) {
|
while ($row2 = $domainresult_stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$domains.= $row2['domain'] . '<br/>';
|
$domains.= $row2['domain'] . '<br/>';
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (Settings::Get('system.mod_fcgid_defaultini_ownvhost') == $row['id']
|
||||||
|
|| Settings::Get('phpfpm.vhost_defaultini') == $row['id']
|
||||||
|
) {
|
||||||
|
$domains .= Settings::Get('system.hostname');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($domains == '') {
|
||||||
$domains = $lng['admin']['phpsettings']['notused'];
|
$domains = $lng['admin']['phpsettings']['notused'];
|
||||||
}
|
}
|
||||||
$count ++;
|
$count ++;
|
||||||
@@ -173,6 +181,14 @@ if ($page == 'overview') {
|
|||||||
);
|
);
|
||||||
$result = Database::pexecute_first($result_stmt, array('id' => $id));
|
$result = Database::pexecute_first($result_stmt, array('id' => $id));
|
||||||
|
|
||||||
|
if ((Settings::Get('system.mod_fcgid') == '1'
|
||||||
|
&& Settings::Get('system.mod_fcgid_defaultini_ownvhost') == $id)
|
||||||
|
|| (Settings::Get('phpfpm.enabled') == '1'
|
||||||
|
&& Settings::Get('phpfpm.vhost_defaultini') == $id)
|
||||||
|
) {
|
||||||
|
standard_error('cannotdeletehostnamephpconfig');
|
||||||
|
}
|
||||||
|
|
||||||
if ($result['id'] != 0
|
if ($result['id'] != 0
|
||||||
&& $result['id'] == $id
|
&& $result['id'] == $id
|
||||||
&& (int)$userinfo['change_serversettings'] == 1
|
&& (int)$userinfo['change_serversettings'] == 1
|
||||||
@@ -186,7 +202,7 @@ if ($page == 'overview') {
|
|||||||
// config that is to be deleted
|
// config that is to be deleted
|
||||||
$upd_stmt = Database::prepare("
|
$upd_stmt = Database::prepare("
|
||||||
UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
|
UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
|
||||||
`phpsettingid` = 1 WHERE `phpsettingid` = :id"
|
`phpsettingid` = '1' WHERE `phpsettingid` = :id"
|
||||||
);
|
);
|
||||||
Database::pexecute($upd_stmt, array('id' => $id));
|
Database::pexecute($upd_stmt, array('id' => $id));
|
||||||
|
|
||||||
|
|||||||
@@ -1810,4 +1810,7 @@ $lng['admin']['integrityid'] = '#';
|
|||||||
$lng['admin']['integrityname'] = 'Name';
|
$lng['admin']['integrityname'] = 'Name';
|
||||||
$lng['admin']['integrityresult'] = 'Result';
|
$lng['admin']['integrityresult'] = 'Result';
|
||||||
$lng['admin']['integrityfix'] = 'Fix problems automatically';
|
$lng['admin']['integrityfix'] = 'Fix problems automatically';
|
||||||
$lng['question']['admin_integritycheck_reallyfix'] = 'Do you really want to try fixing all database integrity problems automatically?';
|
$lng['question']['admin_integritycheck_reallyfix'] = 'Do you really want to try fixing all database integrity problems automatically?';
|
||||||
|
$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['error']['cannotdeletehostnamephpconfig'] = 'This PHP-configuration is used by the Froxlor-vhost and cannot be deleted.';
|
||||||
|
|||||||
@@ -1537,3 +1537,6 @@ $lng['admin']['integrityname'] = 'Name';
|
|||||||
$lng['admin']['integrityresult'] = 'Ergebnis';
|
$lng['admin']['integrityresult'] = 'Ergebnis';
|
||||||
$lng['admin']['integrityfix'] = 'Probleme automatisch beheben';
|
$lng['admin']['integrityfix'] = 'Probleme automatisch beheben';
|
||||||
$lng['question']['admin_integritycheck_reallyfix'] = 'Möchten Sie wirklich versuchen sätliche Datenbank - Integritätsprobleme automatisch zu beheben?';
|
$lng['question']['admin_integritycheck_reallyfix'] = 'Möchten Sie wirklich versuchen sätliche Datenbank - Integritätsprobleme automatisch zu beheben?';
|
||||||
|
$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['error']['cannotdeletehostnamephpconfig'] = 'Diese PHP-Konfiguration ist dem Froxlor-Vhost zugewiesen und kann daher nicht gelöscht werden.';
|
||||||
|
|||||||
Reference in New Issue
Block a user