Commit 04620b7f authored by tbrehm's avatar tbrehm
Browse files

Merged these revisions from trunk: 2153-2164,2166,2168,2171

parent aec1333f
......@@ -121,7 +121,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......
......@@ -121,7 +121,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......
......@@ -121,7 +121,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......
......@@ -121,7 +121,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......
......@@ -77,7 +77,7 @@ $form["tabs"]['domain'] = array (
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'domain_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
......
......@@ -97,7 +97,7 @@ $form["tabs"]['domain'] = array (
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'domain_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
......
......@@ -77,7 +77,7 @@ $form["tabs"]['domain'] = array (
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'domain_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
......
......@@ -22,7 +22,7 @@
</div>
<div class="ctrlHolder">
<label for="php_open_basedir">{tmpl_var name='php_open_basedir_txt'}</label>
<input name="php_open_basedir" id="php_open_basedir" value="{tmpl_var name='php_open_basedir'}" size="30" maxlength="255" type="text" class="textInput" style="width:400px;" />
<input name="php_open_basedir" id="php_open_basedir" value="{tmpl_var name='php_open_basedir'}" size="30" type="text" class="textInput" style="width:400px;" />
</div>
<div class="ctrlHolder">
<label for="custom_php_ini">{tmpl_var name='custom_php_ini_txt'}</label>
......
......@@ -130,6 +130,9 @@ class page_action extends tform_actions {
$this->parent_domain_record = $parent_domain;
//* make sure that the email domain is lowercase
if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
parent::onSubmit();
}
......
......@@ -196,7 +196,8 @@ class page_action extends tform_actions {
}
$ssl_domain_select = '';
$ssl_domains = array($this->dataRecord["domain"],'www.'.$this->dataRecord["domain"]);
$tmp = $app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id = ".$this->id);
$ssl_domains = array($tmp["domain"],'www.'.$tmp["domain"]);
if(is_array($ssl_domains)) {
foreach( $ssl_domains as $ssl_domain) {
$selected = ($ssl_domain == $this->dataRecord['ssl_domain'])?'SELECTED':'';
......@@ -330,10 +331,14 @@ class page_action extends tform_actions {
}
}
// Clients may not set the client_group_id, so we unset them if user is not a admin and the client is not a reseller
if(!$app->auth->has_clients($_SESSION['s']['user']['userid'])) unset($this->dataRecord["client_group_id"]);
}
//* make sure that the email domain is lowercase
if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
parent::onSubmit();
......
......@@ -95,6 +95,9 @@ class page_action extends tform_actions {
$this->parent_domain_record = $parent_domain;
//* make sure that the email domain is lowercase
if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
parent::onSubmit();
}
......
......@@ -1775,7 +1775,7 @@ $wb['monitor_services_ftp_txt'] = 'FTP-Server:';
$wb['monitor_services_smtp_txt'] = 'SMTP-Server:';
$wb['monitor_services_pop_txt'] = 'POP3-Server:';
$wb['monitor_services_imap_txt'] = 'IMAP-Server:';
$wb['monitor_services_mydns_txt'] = 'myDNS-Server:';
$wb['monitor_services_mydns_txt'] = 'DNS-Server:';
$wb['monitor_services_mysql_txt'] = 'mySQL-Server:';
$wb['monitor_settings_datafromdate_txt'] = 'Data from: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i';
......
......@@ -42,7 +42,7 @@ $TTL {tmpl_var name='ttl'}
{tmpl_var name='name'} SRV {tmpl_var name='aux'} {tmpl_var name='data'}
</tmpl_if>
<tmpl_if name="type" op='==' value='TXT'>
{tmpl_var name='name'} TXT {tmpl_var name='data'}
{tmpl_var name='name'} TXT "{tmpl_var name='data'}"
</tmpl_if>
</tmpl_loop>
......@@ -173,19 +173,22 @@ foreach($records as $rec) {
$awstats_conf_dir = $web_config['awstats_conf_dir'];
$awstats_website_conf_file = $web_config['awstats_conf_dir'].'/awstats.'.$domain.'.conf';
if(is_file($awstats_website_conf_file)) unlink($awstats_website_conf_file);
if(!is_file($awstats_website_conf_file)) {
$awstats_conf_file_content = 'Include "'.$awstats_conf_dir.'/awstats.conf"
LogFile="/var/log/ispconfig/httpd/'.$domain.'/access.log"
LogFile="/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log"
SiteDomain="'.$domain.'"
HostAliases="www.'.$domain.' localhost 127.0.0.1"';
file_put_contents($awstats_website_conf_file,$awstats_conf_file_content);
}
if(!@is_dir($statsdir)) mkdir($statsdir);
if(is_file('/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log')) unlink('/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log');
symlink($logfile,'/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log');
// awstats_buildstaticpages.pl -update -config=mydomain.com -lang=en -dir=/var/www/domain.com/web/stats -awstatsprog=/path/to/awstats.pl
$command = "$awstats_buildstaticpages_pl -update -LogFile='$logfile' -config='$domain' -lang=en -dir='$statsdir' -awstatsprog='$awstats_pl'";
$command = "$awstats_buildstaticpages_pl -update -config='$domain' -lang=en -dir='$statsdir' -awstatsprog='$awstats_pl'";
if($awstats_pl != '' && $awstats_buildstaticpages_pl != '' && fileowner($awstats_pl) == 0 && fileowner($awstats_buildstaticpages_pl) == 0) {
exec($command);
......@@ -211,7 +214,7 @@ exec('chmod +r /var/log/ispconfig/httpd/*');
$sql = "SELECT domain_id, domain, document_root FROM web_domain WHERE server_id = ".$conf['server_id'];
$records = $app->db->queryAllRecords($sql);
foreach($records as $rec) {
$yesterday = date('Ymd',time() - 86400);
$yesterday = date('Ymd',time() - 86400*2);
$logfile = escapeshellcmd($rec['document_root'].'/log/'.$yesterday.'-access.log');
if(@is_file($logfile)) {
// Compress yesterdays logfile
......
......@@ -243,9 +243,10 @@ class modules {
foreach($hooks as $hook) {
$module_name = $hook['module'];
$function_name = $hook['function'];
// Claa the processing function of the module
// Call the processing function of the module
if($this->debug) $app->log("Call function '$function_name' in module '$module_name' raised by TableHook '$table_name'.",LOGLEVEL_DEBUG);
call_user_method($function_name,$app->loaded_modules[$module_name],$table_name,$action,$data);
// call_user_method($function_name,$app->loaded_modules[$module_name],$table_name,$action,$data);
call_user_func(array($app->loaded_modules[$module_name],$function_name),$table_name,$action,$data);
unset($module_name);
unset($function_name);
}
......
......@@ -116,7 +116,8 @@ class plugins {
$function_name = $event['function'];
// Call the processing function of the plugin
$app->log("Calling function '$function_name' from plugin '$plugin_name' raised by event '$event_name'.",LOGLEVEL_DEBUG);
call_user_method($function_name,$app->loaded_plugins[$plugin_name],$event_name,$data);
// call_user_method($function_name,$app->loaded_plugins[$plugin_name],$event_name,$data);
call_user_func(array($app->loaded_plugins[$plugin_name],$function_name),$event_name,$data);
unset($plugin_name);
unset($function_name);
}
......
......@@ -54,7 +54,8 @@ class services {
$module_name = $this->registered_services[$service_name]['module'];
$function_name = $this->registered_services[$service_name]['function'];
$app->log("Calling function '$function_name' from module '$module_name'.",LOGLEVEL_DEBUG);
call_user_method($function_name,$app->loaded_modules[$module_name],$action);
// call_user_method($function_name,$app->loaded_modules[$module_name],$action);
call_user_func(array($app->loaded_modules[$module_name],$function_name),$action);
} else {
$app->log("Unable to restart $service_name. Service not registered.",LOGLEVEL_WARNING);
}
......
......@@ -1694,13 +1694,13 @@ class monitor_core_module {
case 'log_freshclam':
if($dist == 'debian') { $logfile = '/var/log/clamav/freshclam.log'; }
elseif($dist == 'redhat') { $logfile = (is_file('/var/log/clamav/freshclam.log') ? '/var/log/clamav/freshclam.log' : '/var/log/freshclam.log'); }
elseif($dist == 'suse') { $logfile = ''; }
elseif($dist == 'suse') { $logfile = '/var/log/freshclam.log'; }
elseif($dist == 'gentoo') { $logfile = '/var/log/clamav/freshclam.log'; }
break;
case 'log_clamav':
if($dist == 'debian') { $logfile = '/var/log/clamav/clamav.log'; }
elseif($dist == 'redhat') { $logfile = (is_file('/var/log/clamav/clamd.log') ? '/var/log/clamav/clamd.log' : '/var/log/maillog'); }
elseif($dist == 'suse') { $logfile = ''; }
elseif($dist == 'suse') { $logfile = '/var/log/clamd.log'; }
elseif($dist == 'gentoo') { $logfile = '/var/log/clamav/clamd.log'; }
break;
case 'log_fail2ban':
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment