Commit df52d4b3 authored by tbrehm's avatar tbrehm
Browse files

Fixed some bugs in the website module.

parent 4cb0eb50
......@@ -646,7 +646,7 @@ class installer_base {
exec('crontab -u root -l > crontab.txt');
$existing_root_cron_jobs = file('crontab.txt');
$root_cron_jobs = array('* * * * * /usr/bin/php -q /usr/local/ispconfig/server/server.php &> /dev/null');
$root_cron_jobs = array('* * * * * /usr/bin/php -q /usr/local/ispconfig/server/server.sh &> /dev/null');
foreach($root_cron_jobs as $cron_job) {
if(!in_array($cron_job."\n", $existing_root_cron_jobs)) {
$existing_root_cron_jobs[] = $cron_job."\n";
......
......@@ -50,8 +50,15 @@ CREATE TABLE `client` (
`limit_spamfilter_wblist` int(11) NOT NULL default '0',
`limit_spamfilter_user` int(11) NOT NULL default '0',
`limit_spamfilter_policy` int(11) NOT NULL default '0',
`default_webserver` int(11) NOT NULL,
`limit_web_ip` text NOT NULL,
`default_webserver` int(11) NOT NULL default '1',
`limit_web_ip` text,
`limit_web_domain` int(11) NOT NULL default '-1',
`limit_web_subdomain` int(11) NOT NULL default '-1',
`limit_web_aliasdomain` int(11) NOT NULL default '-1',
`limit_ftp_user` int(11) NOT NULL default '-1',
`default_dnsserver` int(10) unsigned NOT NULL default '1',
`limit_dns_zone` int(11) NOT NULL default '-1',
`limit_dns_record` int(11) NOT NULL default '-1',
`username` varchar(255) default NULL,
`password` varchar(255) default NULL,
`language` varchar(255) NOT NULL default 'en',
......
......@@ -889,9 +889,9 @@ class tform {
if(is_array($record_new) && count($record_new) > 0) {
foreach($record_new as $key => $val) {
if($record_old[$key] != $val) {
if(@$record_old[$key] != $val) {
// Record has changed
$diffrec[$key] = array('old' => $record_old[$key],
$diffrec[$key] = array('old' => @$record_old[$key],
'new' => $val);
}
}
......
......@@ -94,7 +94,7 @@ class page_action extends tform_actions {
global $app, $conf;
// Get the record of the parent domain
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"]));
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"]));
// Set a few fixed values
$this->dataRecord["type"] = 'alias';
......
......@@ -122,7 +122,7 @@ class page_action extends tform_actions {
$client_select = "<option value='0'></option>";
if(is_array($clients)) {
foreach( $clients as $client) {
$selected = ($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':'';
$selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':'';
$client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
}
}
......@@ -235,8 +235,8 @@ class page_action extends tform_actions {
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
$client_id = intval($client["client_id"]);
} else {
$client_id = intval($web_rec["client_group_id"]);
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".intval($this->dataRecord["client_group_id"]));
$client_id = intval(@$web_rec["client_group_id"]);
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".intval(@$this->dataRecord["client_group_id"]));
$client_id = intval($client["client_id"]);
}
......
......@@ -79,7 +79,7 @@ class page_action extends tform_actions {
global $app, $conf;
// Get the record of the parent domain
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"]));
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"]));
// remove the parent domain part of the domain name before we show it in the text field.
$this->dataRecord["domain"] = str_replace('.'.$parent_domain["domain"],'',$this->dataRecord["domain"]);
......@@ -93,7 +93,7 @@ class page_action extends tform_actions {
global $app, $conf;
// Get the record of the parent domain
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"]));
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"]));
// Set a few fixed values
$this->dataRecord["type"] = 'subdomain';
......
......@@ -97,6 +97,7 @@ class apache2_plugin {
if(!is_dir($data["new"]["document_root"]."/cgi-bin")) exec("mkdir -p ".$data["new"]["document_root"]."/cgi-bin");
// Create the symlink for the logfiles
if(!is_dir('/var/log/ispconfig/httpd/'.$data["new"]["domain"])) exec('mkdir -p /var/log/ispconfig/httpd/'.$data["new"]["domain"]);
if(!is_link($data["new"]["document_root"]."/log")) exec("ln -s /var/log/ispconfig/httpd/".$data["new"]["domain"]." ".$data["new"]["document_root"]."/log");
// TODO: Create the symlinks
......
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