';
+
+ if($version == '0.9.4-svn2')
+ {
+ $has_preconfig = true;
+ $return .= 'Froxlor-0.9.4-svn2 now enabled the usage of a domain-wildcard entry and subdomains for this domain at once (subdomains are parsed before the main vhost container). ';
+ $return .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain. ';
+ $return .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.
';
+ $return .= 'Do you want to use wildcard-entries for existing domains?: ';
+ $return .= makeyesno('update_domainwildcardentry', '1', '0', '1');
+ }
+
+ $return .= '
'.makecheckbox('update_changesagreed', 'I have read the update notifications and I am aware of the changes made to my system.', '1', true, '0', true);
+ $return .= '
';
+ $return .= '';
+
+ if($has_preconfig) {
+ return $return;
+ } else {
+ return '';
+ }
+}
diff --git a/lib/functions/aps/function.domainHasApsInstances.php b/lib/functions/aps/function.domainHasApsInstances.php
index 7b00d50b..a1510a68 100644
--- a/lib/functions/aps/function.domainHasApsInstances.php
+++ b/lib/functions/aps/function.domainHasApsInstances.php
@@ -26,7 +26,6 @@
*
* @return boolean
*/
-
function domainHasApsInstances($domainid = 0)
{
global $db, $settings;
diff --git a/lng/english.lng.php b/lng/english.lng.php
index 5815e7ea..ff9bc336 100644
--- a/lng/english.lng.php
+++ b/lng/english.lng.php
@@ -1258,7 +1258,8 @@ $lng['panel']['off'] = 'off';
$lng['update']['updateinprogress_onlyadmincanlogin'] = 'A newer version of Froxlor has been installed but not yet set up. Only the administrator can log in and finish the update.';
$lng['update']['update'] = 'Froxlor Update';
$lng['update']['proceed'] = 'Proceed';
-$lng['update']['update_information'] = 'The Froxlor files have been updated to version %newversion. The installed version is %curversion.
Customers will not be able to log in until the update has been finished. Proceed?';
+$lng['update']['update_information']['part_a'] = 'The Froxlor files have been updated to version %newversion. The installed version is %curversion.';
+$lng['update']['update_information']['part_b'] = '
Customers will not be able to log in until the update has been finished. Proceed?';
$lng['update']['noupdatesavail'] = 'You already have the latest Froxlor version.';
$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.';
diff --git a/lng/german.lng.php b/lng/german.lng.php
index 06a671a1..3b6188e6 100644
--- a/lng/german.lng.php
+++ b/lng/german.lng.php
@@ -1238,7 +1238,8 @@ $lng['panel']['off'] = 'aus';
$lng['update']['updateinprogress_onlyadmincanlogin'] = 'Eine neuere Version von Froxlor wurde installiert, aber noch nicht eingerichtet. Nur der Administrator kann sich anmelden und die Aktualisierung abschließen.';
$lng['update']['update'] = 'Froxlor Aktualisierung';
$lng['update']['proceed'] = 'Ausführen';
-$lng['update']['update_information'] = 'Die Froxlor Dateien wurden aktualisiert. Neue Version ist %newversion. Die bisher installierte Version ist %curversion
Ein Kunden-Login ist vor Abschluss des Aktualisierungsvorganges nicht m&oouml;glich. Aktualisierung ausführen?';
+$lng['update']['update_information']['part_a'] = 'Die Froxlor Dateien wurden aktualisiert. Neue Version ist %newversion. Die bisher installierte Version ist %curversion';
+$lng['update']['update_information']['part_b'] = '
Ein Kunden-Login ist vor Abschluss des Aktualisierungsvorganges nicht m&oouml;glich. Aktualisierung ausführen?';
$lng['update']['noupdatesavail'] = 'Ihre Froxlor-Version ist aktuell.';
$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.';
diff --git a/lng/polish.lng.php b/lng/polish.lng.php
index 33e593e1..a5121910 100644
--- a/lng/polish.lng.php
+++ b/lng/polish.lng.php
@@ -1258,7 +1258,8 @@ $lng['panel']['off'] = 'off';
$lng['update']['updateinprogress_onlyadmincanlogin'] = 'A newer version of Froxlor has been installed but not yet set up. Only the administrator can log in and finish the update.';
$lng['update']['update'] = 'Aktualizacja Froxlora';
$lng['update']['proceed'] = 'Proceed';
-$lng['update']['update_information'] = 'The Froxlor files have been updated to version %newversion. The installed version is %curversion.
Customers will not be able to log in until the update has been finished. Proceed?';
+$lng['update']['update_information']['part_a'] = 'The Froxlor files have been updated to version %newversion. The installed version is %curversion.';
+$lng['update']['update_information']['part_b'] = '
Customers will not be able to log in until the update has been finished. Proceed?';
$lng['update']['noupdatesavail'] = 'You already have the latest Froxlor version.';
$lng['admin']['cron']['cronsettings'] = 'ustawienia Cronjob';
$lng['cron']['cronname'] = 'cronjob-name';
diff --git a/scripts/jobs/cron_tasks.inc.http.10.apache.php b/scripts/jobs/cron_tasks.inc.http.10.apache.php
index 8fa4470e..c8a20f34 100644
--- a/scripts/jobs/cron_tasks.inc.http.10.apache.php
+++ b/scripts/jobs/cron_tasks.inc.http.10.apache.php
@@ -493,13 +493,22 @@ class apache
protected function getVhostFilename($domain, $ssl_vhost = false)
{
- if($ssl_vhost === true)
+ if((int)$domain['parentdomainid'] == 0)
{
- $vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_froxlor_ssl_vhost_' . $domain['domain'] . '.conf');
+ $vhost_no = '21';
}
else
{
- $vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/20_froxlor_normal_vhost_' . $domain['domain'] . '.conf');
+ $vhost_no = '20';
+ }
+
+ if($ssl_vhost === true)
+ {
+ $vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/'.$vhost_no.'_froxlor_ssl_vhost_' . $domain['domain'] . '.conf');
+ }
+ else
+ {
+ $vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/'.$vhost_no.'_froxlor_normal_vhost_' . $domain['domain'] . '.conf');
}
return $vhost_filename;
@@ -627,7 +636,7 @@ class apache
public function createVirtualHosts()
{
- $result_domains = $this->db->query("SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC");
+ $result_domains = $this->db->query("SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `d`.`phpsettingid`, `c`.`adminid`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) " . "WHERE `d`.`aliasdomain` IS NULL ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC");
while($domain = $this->db->fetch_array($result_domains))
{
@@ -950,7 +959,7 @@ class apache
if($vhost_filename != '.'
&& $vhost_filename != '..'
&& !in_array($vhost_filename, $this->known_vhostfilenames)
- && preg_match('/^(05|10|20|30)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
+ && preg_match('/^(05|10|20|21|30|50|51)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
{
fwrite($this->debugHandler, ' apache::wipeOutOldVhostConfigs: unlinking ' . $vhost_filename . "\n");
diff --git a/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php b/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php
index 918d3853..81dc5041 100644
--- a/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php
+++ b/scripts/jobs/cron_tasks.inc.http.20.lighttpd.php
@@ -141,6 +141,9 @@ class lighttpd
$vhosts = $this->createLighttpdHosts($row_ipsandports['ip'], $row_ipsandports['port'], $row_ipsandports['ssl'], $vhost_filename);
if($vhosts !== null && is_array($vhosts) && isset($vhosts[0]))
{
+ // sort vhosts by number (subdomains first!)
+ sort($vhosts);
+
foreach($vhosts as $vhost) {
$this->lighttpd_data[$vhost_filename].= ' include "'.$vhost.'"'."\n";
}
@@ -230,11 +233,11 @@ class lighttpd
if($ssl == '0')
{
- $query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
+ $query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
}
else
{
- $query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`iswildcarddomain`, `d`.`domain` ASC";
+ $query2 = "SELECT `d`.*, `pd`.`domain` AS `parentdomain`, `c`.`loginname`, `c`.`guid`, `c`.`email`, `c`.`documentroot` AS `customerroot`, `c`.`deactivated`, `c`.`phpenabled` AS `phpenabled` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON (`pd`.`id` = `d`.`parentdomainid`) WHERE `d`.`ssl_ipandport`='" . $ipandport['id'] . "' AND `d`.`aliasdomain` IS NULL ORDER BY `d`.`parentdomainid` DESC, `d`.`iswildcarddomain`, `d`.`domain` ASC";
}
$included_vhosts = array();
@@ -252,8 +255,18 @@ class lighttpd
$_tmp_path = substr(makeCorrectDir($this->settings['system']['apacheconf_vhost']), 0, -1);
$_pos = strrpos($_tmp_path, '/');
$_inc_path = substr($_tmp_path, $_pos+1);
- $vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'].'/vhosts/50_'.$domain['domain'].'.conf');
- $included_vhosts[] = $_inc_path.'/vhosts/50_'.$domain['domain'].'.conf';
+
+ if((int)$domain['parentdomainid'] == 0)
+ {
+ $vhost_no = '51';
+ }
+ else
+ {
+ $vhost_no = '50';
+ }
+
+ $vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'].'/vhosts/'.$vhost_no.'_'.$domain['domain'].'.conf');
+ $included_vhosts[] = $_inc_path.'/vhosts/'.$vhost_no.'_'.$domain['domain'].'.conf';
}
if(!isset($this->lighttpd_data[$vhost_filename]))
{
@@ -805,7 +818,7 @@ class lighttpd
if($vhost_filename != '.'
&& $vhost_filename != '..'
&& !in_array($vhost_filename, $this->known_filenames)
- && preg_match('/^(05|10|20|30)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
+ && preg_match('/^(05|10|20|21|30|50|51)_(froxlor|syscp)_(dirfix|ipandport|normal_vhost|wildcard_vhost|ssl_vhost)_(.+)\.conf$/', $vhost_filename)
&& file_exists(makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/' . $vhost_filename)))
{
fwrite($this->debugHandler, ' lighttpd::wipeOutOldConfigs: unlinking ' . $vhost_filename . "\n");
diff --git a/templates/main.css b/templates/main.css
index 1477ce00..df22892f 100644
--- a/templates/main.css
+++ b/templates/main.css
@@ -449,3 +449,12 @@ TR.RowOverSelected {
text-align: left;
}
+.preconfig
+{
+ text-align: left;
+ margin-top: 20px;
+ margin-bottom: 5px;
+ margin-right: 15px;
+ margin-left: 15px;
+}
+