- fixing some undefined variables
- added missing dkim_notes field to settings-table
This commit is contained in:
@@ -555,6 +555,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (124, 'dkim', 'dkim_keylength', '1024');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (125, 'dkim', 'dkim_servicetype', '0');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (126, 'dkim', 'dkim_add_adsppolicy', '1');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (127, 'dkim', 'dkim_notes', '');
|
||||
|
||||
# --------------------------------------------------------
|
||||
|
||||
|
||||
@@ -368,6 +368,7 @@ if(isFroxlorVersion('0.9.3-svn3'))
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_keylength', '1024');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_servicetype', '0');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_add_adsppolicy', '1');");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_notes', '');");
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.3-svn4');
|
||||
|
||||
@@ -24,6 +24,12 @@ if(@php_sapi_name() != 'cli'
|
||||
die('This script will only work in the shell.');
|
||||
}
|
||||
|
||||
// ensure that default timezone is set
|
||||
if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get"))
|
||||
{
|
||||
@date_default_timezone_set(@date_default_timezone_get());
|
||||
}
|
||||
|
||||
$lockdir = '/var/run/';
|
||||
$lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-';
|
||||
$lockfName = $lockFilename . getmypid();
|
||||
|
||||
@@ -88,9 +88,9 @@ class lighttpd
|
||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port);
|
||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_froxlor_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
||||
|
||||
if(!isset($this->lighttpd_data[$vhosts_filename]))
|
||||
if(!isset($this->lighttpd_data[$vhost_filename]))
|
||||
{
|
||||
$this->lighttpd_data[$vhosts_filename] = '';
|
||||
$this->lighttpd_data[$vhost_filename] = '';
|
||||
}
|
||||
|
||||
$this->lighttpd_data[$vhost_filename].= '$SERVER["socket"] == "' . $ip . ':' . $port . '" {' . "\n";
|
||||
@@ -156,6 +156,7 @@ class lighttpd
|
||||
$htpasswd_query = "SELECT * FROM " . TABLE_PANEL_HTPASSWDS . " WHERE `path` LIKE '" . $domain['documentroot'] . "%'";
|
||||
$result_htpasswds = $this->db->query($htpasswd_query);
|
||||
|
||||
$htaccess_text = '';
|
||||
while($row_htpasswds = $this->db->fetch_array($result_htpasswds))
|
||||
{
|
||||
$row_htpasswds['path'] = makeCorrectDir($row_htpasswds['path']);
|
||||
@@ -275,7 +276,7 @@ class lighttpd
|
||||
}
|
||||
|
||||
$this->lighttpd_data[$vhost_filename].= $this->getVhostContent($domain, $ssl_vhost);
|
||||
$this->lighttpd_data[$vhost_filename].= $this->needed_htpasswds[$row_ipsandports['id']] . "\n";
|
||||
$this->lighttpd_data[$vhost_filename].= $this->needed_htpasswds[$ipandport['id']] . "\n";
|
||||
}
|
||||
}
|
||||
return $included_vhosts;
|
||||
@@ -313,6 +314,7 @@ class lighttpd
|
||||
$ipport = $domain['ip'] . ':' . $domain['port'];
|
||||
}
|
||||
|
||||
$vhost_content = '';
|
||||
$vhost_content.= $this->getServerNames($domain) . " {\n";
|
||||
|
||||
if(preg_match('/^https?\:\/\//', $domain['documentroot']))
|
||||
@@ -345,6 +347,23 @@ class lighttpd
|
||||
{
|
||||
$logfiles_text = '';
|
||||
|
||||
if($domain['speciallogfile'] == '1'
|
||||
&& $this->settings['system']['mod_log_sql'] != '1')
|
||||
{
|
||||
if($domain['parentdomainid'] == '0')
|
||||
{
|
||||
$speciallogfile = '-' . $domain['domain'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$speciallogfile = '-' . $domain['parentdomain'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$speciallogfile = '';
|
||||
}
|
||||
|
||||
if($this->settings['system']['mod_log_sql'] == 1)
|
||||
{
|
||||
// We are using mod_log_sql (http://www.outoforder.cc/projects/apache/mod_log_sql/)
|
||||
|
||||
Reference in New Issue
Block a user