Commit 04620b7f authored by tbrehm's avatar tbrehm

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

parent aec1333f
......@@ -264,7 +264,11 @@ update-rc.d mydns defaults
6) Install vlogger and webalizer
apt-get -y install vlogger webalizer
apt-get -y install vlogger webalizer awstats
mkdir /usr/share/awstats/tools
cp -prf /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/share/awstats/tools/awstats_buildstaticpages.pl
7) Install Jailkit (optional, only needed if you want to use chrooting for SSH users)
......
......@@ -954,8 +954,8 @@ CREATE TABLE `sys_datalog` (
`action` char(1) NOT NULL default '',
`tstamp` int(11) NOT NULL default '0',
`user` varchar(255) NOT NULL default '',
`data` longtext NOT NULL,
`status` set('pending','ok','warning','error') NOT NULL default 'pending',
`data` longtext NOT NULL,
`status` set('pending','ok','warning','error') NOT NULL default 'ok',
PRIMARY KEY (`datalog_id`),
KEY `server_id` (`server_id`,`status`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
......
......@@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
//** Application
define('ISPC_APP_TITLE', 'ISPConfig');
define('ISPC_APP_VERSION', '3.0.3.1');
define('ISPC_APP_VERSION', '3.0.3.2');
//** Database
......
......@@ -148,7 +148,8 @@ class plugin {
$app->loaded_plugins[$plugin_name] = new $plugin_name;
}
if($this->debug) $app->log("Called method: '$function_name' in plugin '$plugin_name' for 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);
}
}
......
......@@ -192,53 +192,53 @@ class remoting {
return $affected_rows;
}
//* Get mail mailinglist details
public function mail_mailinglist_get($session_id, $primary_id)
{
global $app;
if(!$this->checkPerm($session_id, 'mail_mailinglist_get')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$app->uses('remoting_lib');
$app->remoting_lib->loadFormDef('../mail/form/mail_mailinglist.tform.php');
return $app->remoting_lib->getDataRecord($primary_id);
}
//* Add a mail mailinglist
public function mail_mailinglist_add($session_id, $client_id, $params)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_add')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$primary_id = $this->insertQuery('../mail/form/mail_mailinglist.tform.php',$client_id,$params);
return $primary_id;
}
//* Update a mail mailinglist
public function mail_mailinglist_update($session_id, $client_id, $primary_id, $params)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_update')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->updateQuery('../mail/form/mail_mailinglist.tform.php', $client_id, $primary_id, $params);
return $affected_rows;
}
//* Delete a mail mailinglist
public function mail_mailinglist_delete($session_id, $primary_id)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_delete')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->deleteQuery('../mail/form/mail_mailinglist.tform.php', $primary_id);
return $affected_rows;
}
//* Get mail mailinglist details
public function mail_mailinglist_get($session_id, $primary_id)
{
global $app;
if(!$this->checkPerm($session_id, 'mail_mailinglist_get')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$app->uses('remoting_lib');
$app->remoting_lib->loadFormDef('../mail/form/mail_mailinglist.tform.php');
return $app->remoting_lib->getDataRecord($primary_id);
}
//* Add a mail mailinglist
public function mail_mailinglist_add($session_id, $client_id, $params)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_add')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$primary_id = $this->insertQuery('../mail/form/mail_mailinglist.tform.php',$client_id,$params);
return $primary_id;
}
//* Update a mail mailinglist
public function mail_mailinglist_update($session_id, $client_id, $primary_id, $params)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_update')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->updateQuery('../mail/form/mail_mailinglist.tform.php', $client_id, $primary_id, $params);
return $affected_rows;
}
//* Delete a mail mailinglist
public function mail_mailinglist_delete($session_id, $primary_id)
{
if(!$this->checkPerm($session_id, 'mail_mailinglist_delete')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->deleteQuery('../mail/form/mail_mailinglist.tform.php', $primary_id);
return $affected_rows;
}
//* Get mail user details
public function mail_user_get($session_id, $primary_id)
{
......@@ -1005,7 +1005,7 @@ class remoting {
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->updateQuery('../client/form/client.tform.php', $client_id, $reseller_id, $params);
$affected_rows = $this->updateQuery('../client/form/client.tform.php', $reseller_id, $client_id, $params);
$app->remoting_lib->ispconfig_sysuser_update($params,$client_id);
......
......@@ -737,7 +737,7 @@ class tform {
}
break;
case 'ISEMAIL':
if(!preg_match("/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}$/i", $field_value)) {
if(!preg_match("/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-zA-Z0-9\-]{2,30}$/i", $field_value)) {
$errmsg = $validator['errmsg'];
if(isset($this->wordbook[$errmsg])) {
$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
......@@ -860,14 +860,14 @@ class tform {
}
$salt.="$";
// $salt = substr(md5(time()),0,2);
$record[$key] = crypt($record[$key],$salt);
$record[$key] = crypt(stripslashes($record[$key]),$salt);
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} elseif ($field['encryption'] == 'MYSQL') {
$sql_insert_val .= "PASSWORD('".$app->db->quote($record[$key])."'), ";
} elseif ($field['encryption'] == 'CLEARTEXT') {
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
} else {
$record[$key] = md5($record[$key]);
$record[$key] = md5(stripslashes($record[$key]));
$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
}
......@@ -895,14 +895,14 @@ class tform {
}
$salt.="$";
// $salt = substr(md5(time()),0,2);
$record[$key] = crypt($record[$key],$salt);
$record[$key] = crypt(stripslashes($record[$key]),$salt);
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') {
$sql_update .= "`$key` = PASSWORD('".$app->db->quote($record[$key])."'), ";
} elseif (isset($field['encryption']) && $field['encryption'] == 'CLEARTEXT') {
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
} else {
$record[$key] = md5($record[$key]);
$record[$key] = md5(stripslashes($record[$key]));
$sql_update .= "`$key` = '".$app->db->quote($record[$key])."', ";
}
......
......@@ -138,10 +138,10 @@ if($_POST['create'] == 1) {
if(isset($_POST['ns2']) && $_POST['ns2'] == '') $error .= $app->lng('error_ns2_empty').'<br />';
if(isset($_POST['email']) && $_POST['email'] == '') $error .= $app->lng('error_email_empty').'<br />';
if(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z\-]{2,10}[\.]{0,1}$/',$_POST['domain'])) $error .= $app->lng('error_domain_regex').'<br />';
if(isset($_POST['ns1']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}[\.]{0,1}$/',$_POST['ns1'])) $error .= $app->lng('error_ns1_regex').'<br />';
if(isset($_POST['ns2']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z]{2,10}[\.]{0,1}$/',$_POST['ns2'])) $error .= $app->lng('error_ns2_regex').'<br />';
if(isset($_POST['email']) && !preg_match('/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z\-]{2,10}$/i',$_POST['email'])) $error .= $app->lng('error_email_regex').'<br />';
if(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,30}[\.]{0,1}$/',$_POST['domain'])) $error .= $app->lng('error_domain_regex').'<br />';
if(isset($_POST['ns1']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9]{2,30}[\.]{0,1}$/',$_POST['ns1'])) $error .= $app->lng('error_ns1_regex').'<br />';
if(isset($_POST['ns2']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9]{2,30}[\.]{0,1}$/',$_POST['ns2'])) $error .= $app->lng('error_ns2_regex').'<br />';
if(isset($_POST['email']) && !preg_match('/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z0-9\-]{2,30}$/i',$_POST['email'])) $error .= $app->lng('error_email_regex').'<br />';
// make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($_POST['client_group_id'])) {
......
......@@ -82,7 +82,7 @@ $form["tabs"]['dns_soa'] = array (
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'origin_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z\-]{2,10}[\.]{0,1}$/',
'regex' => '/^[\w\.\-\/]{2,255}\.[a-zA-Z0-9\-]{2,30}[\.]{0,1}$/',
'errmsg'=> 'origin_error_regex'),
),
'default' => '',
......
......@@ -74,7 +74,7 @@ $form["tabs"]['alias'] = array (
1 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'source_error_unique'),
2 => array ( 'type' => 'REGEX',
'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z\-]{2,10}$/',
'regex' => '/^\@[\w\.\-]{2,64}\.[a-zA-Z0-9\-]{2,10}$/',
'errmsg'=> 'source_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' => '',
......
......@@ -74,7 +74,7 @@ $form["tabs"]['catchall'] = 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-Z\-]{2,30}$/',
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
......
......@@ -48,7 +48,7 @@ $form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match wi
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = 'r'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['filter'] = array (
'title' => "Filter",
......
......@@ -266,7 +266,7 @@ class page_action extends tform_actions {
$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '".mysql_real_escape_string($this->dataRecord["email"])."'");
if($tmp_user["id"] > 0) {
// There is already a record that we will update
$app->db->datalogUpdate('spamfilter_users', "policy_id = $ploicy_id", 'id', $tmp_user["id"]);
$app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]);
} else {
// We create a new record
$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`)
......
......@@ -27,7 +27,7 @@
<td class="tbl_col_active"><select name="search_active" onChange="submitForm('pageForm','mail/mail_aliasdomain_list.php');">{tmpl_var name='search_active'}</select></td>
<td class="tbl_col_source"><input type="text" name="search_source" value="{tmpl_var name='search_source'}" /></td>
<td class="tbl_col_destination"><input type="text" name="search_destination" value="{tmpl_var name='search_destination'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','mail/mail_alias_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','mail/mail_aliasdomain_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
<tbody>
......
......@@ -127,7 +127,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 z: ';
$wb['monitor_settings_datetimeformat_txt'] = 'Y-d-m 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'] = 'Daten vom: ';
$wb['monitor_settings_datetimeformat_txt'] = 'd-m-Y H:i';
......
......@@ -127,7 +127,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';
......
......@@ -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':
......
Markdown is supported
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