- added switch if specialsettings are to be set for all subdomains or not

- fixed old syscp-bug #1266, lighttpd has an internal lmit of regex-hits, see http://redmine.lighttpd.net/issues/2059
- removing billing-code in domains/domains_domain.tpl
This commit is contained in:
Michael Kaufmann (d00p)
2010-01-29 09:30:55 +00:00
parent 6014cf7598
commit dea3c4ec62
7 changed files with 31 additions and 9 deletions

4
TODO
View File

@@ -17,8 +17,8 @@ FIXED 0001271 cant install the package magento
FIXED 0001270 xinet reltime update mistake
FIXED 0001268 SysCP Funktion: aktualisierung in Real-Time
0001041 Customer should have access to his webserver logs.
0001267 Domain-Aliases also create a HOST-entry
0001266 Lighttpd has a internal limit of regex-hits which limits max amount of domain-aliases
FIXED 0001267 Domain-Aliases also create a HOST-entry
FIXED 0001266 Lighttpd has a internal limit of regex-hits which limits max amount of domain-aliases
FIXED 0001263 Cosmettic Change
WONTFIX 0001056 Need extra payment methods
WONTFIX 0001262 Currency type modification.

View File

@@ -996,8 +996,20 @@ if($page == 'domains'
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$result['adminid'] . "' ");
}
$ssfs = isset($_POST['specialsettingsforsubdomains']) ? intval($_POST['specialsettingsforsubdomains']) : 1;
if($ssfs == 1)
{
$upd_specialsettings = ", `specialsettings`='" . $db->escape($specialsettings) . "' ";
}
else
{
$upd_specialsettings = '';
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `specialsettings`='' WHERE `parentdomainid`='" . (int)$id . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
}
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "' WHERE `id`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "'" . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
$redirect_props = Array(
'page' => $page,
@@ -1114,6 +1126,8 @@ if($page == 'domains'
$phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true);
}
$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
$result = htmlentities_array($result);
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
}

View File

@@ -1279,5 +1279,7 @@ $lng['crondesc']['cron_apsupdater'] = 'updating APS packages';
$lng['crondesc']['cron_traffic'] = 'traffic calculation';
$lng['crondesc']['cron_ticketsreset'] = 'resetting ticket-counters';
$lng['crondesc']['cron_ticketarchive'] = 'archiving old tickets';
$lng['admin']['specialsettingsforsubdomains'] = 'Apply specialsettings to all subdomains (*.example.com)';
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'If yes these custom vhost-settings will be added to all subdomains; if no subdomain-specialsettings are being removed.';
?>

View File

@@ -1259,5 +1259,7 @@ $lng['crondesc']['cron_apsupdater'] = 'Aktualisieren der APS Pakete';
$lng['crondesc']['cron_traffic'] = 'Traffic-Berechnung';
$lng['crondesc']['cron_ticketsreset'] = 'Zurücksetzen der Ticket-Zähler';
$lng['crondesc']['cron_ticketarchive'] = 'Archivieren alter Tickets';
$lng['admin']['specialsettingsforsubdomains'] = 'Übernehme Einstellungen für alle Subdomains (*.beispiel.de)';
$lng['serversettings']['specialsettingsforsubdomains']['description'] = 'Wenn ja, werden die individuellen Einstellungen für alle Subdomains übernommen; wenn nein, werden Subdomain-Specialsettings entfernt.';
?>

View File

@@ -407,13 +407,13 @@ class lighttpd
if($domain['iswildcarddomain'] == '1')
{
$server_string[] = '(^|\.)' . $domain_name . '$';
$server_string[] = '(?:^|\.)' . $domain_name . '$';
}
else
{
if($domain['wwwserveralias'] == '1')
{
$server_string[] = '^(www\.|)' . $domain_name . '$';
$server_string[] = '^(?:www\.|)' . $domain_name . '$';
}
else
{
@@ -429,13 +429,13 @@ class lighttpd
if($alias_domain['iswildcarddomain'] == '1')
{
$server_string[] = '(^|\.)' . $alias_domain_name . '$';
$server_string[] = '(?:^|\.)' . $alias_domain_name . '$';
}
else
{
if($alias_domain['wwwserveralias'] == '1')
{
$server_string[] = '^(www\.|)' . $alias_domain_name . '$';
$server_string[] = '^(?:www\.|)' . $alias_domain_name . '$';
}
else
{

View File

@@ -3,5 +3,5 @@
<td class="field_name"><font size="-1">{$row['ipandport']}</font></td>
<td class="field_name"><font size="-1">{$row['customername']} (<a href="admin_customers.php?s=$s&amp;page=customers&amp;action=su&amp;id={$row['customerid']}" target="_blank">{$row['loginname']}</a>)</font></td>
<td class="field_name"><a href="$filename?s=$s&amp;page=$page&amp;action=edit&amp;id={$row['id']}">{$lng['panel']['edit']}</a></td>
<td class="field_name"><if !(isset($row['domainaliasid']) && $row['domainaliasid'] != 0) && $enable_billing_data_edit === true><a href="$filename?s=$s&amp;page=$page&amp;action=delete&amp;id={$row['id']}">{$lng['panel']['delete']}</a></if><if isset($row['domainaliasid']) && $row['domainaliasid'] != 0><a href="$filename?s=$s&amp;page=$page&amp;searchfield=d.aliasdomain&amp;searchtext={$row['id']}">{$lng['domains']['hasaliasdomains']}</a></if><if $enable_billing_data_edit !== true>{$lng['panel']['service_still_active']}</if></td>
<td class="field_name"><if !(isset($row['domainaliasid']) && $row['domainaliasid'] != 0)><a href="$filename?s=$s&amp;page=$page&amp;action=delete&amp;id={$row['id']}">{$lng['panel']['delete']}</a></if><if isset($row['domainaliasid']) && $row['domainaliasid'] != 0><a href="$filename?s=$s&amp;page=$page&amp;searchfield=d.aliasdomain&amp;searchtext={$row['id']}">{$lng['domains']['hasaliasdomains']}</a></if></td>
</tr>

View File

@@ -105,6 +105,10 @@ $header
<td class="main_field_name" valign="top">{$lng['admin']['ownvhostsettings']}:<br /><font size="1">{$lng['serversettings']['default_vhostconf']['description']}</font></td>
<td class="main_field_display" nowrap="nowrap"><textarea class="textarea_border" rows="12" cols="60" name="specialsettings">{$result['specialsettings']}</textarea></td>
</tr>
<tr>
<td class="main_field_name" valign="top">{$lng['admin']['specialsettingsforsubdomains']}:<br /><font size="1">{$lng['serversettings']['specialsettingsforsubdomains']['description']}</font></td>
<td class="main_field_display" nowrap="nowrap">{$specialsettingsforsubdomains}</td>
</tr>
</if>
<if $userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1'>
<tr>