Skip to content

Commit df52d4b

Browse files
committed
Fixed some bugs in the website module.
1 parent 4cb0eb5 commit df52d4b

File tree

7 files changed

+19
-11
lines changed

7 files changed

+19
-11
lines changed

install/lib/installer_base.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ public function install_crontab()
646646
exec('crontab -u root -l > crontab.txt');
647647
$existing_root_cron_jobs = file('crontab.txt');
648648

649-
$root_cron_jobs = array('* * * * * /usr/bin/php -q /usr/local/ispconfig/server/server.php &> /dev/null');
649+
$root_cron_jobs = array('* * * * * /usr/bin/php -q /usr/local/ispconfig/server/server.sh &> /dev/null');
650650
foreach($root_cron_jobs as $cron_job) {
651651
if(!in_array($cron_job."\n", $existing_root_cron_jobs)) {
652652
$existing_root_cron_jobs[] = $cron_job."\n";

install/sql/ispconfig3.sql

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,15 @@ CREATE TABLE `client` (
5050
`limit_spamfilter_wblist` int(11) NOT NULL default '0',
5151
`limit_spamfilter_user` int(11) NOT NULL default '0',
5252
`limit_spamfilter_policy` int(11) NOT NULL default '0',
53-
`default_webserver` int(11) NOT NULL,
54-
`limit_web_ip` text NOT NULL,
53+
`default_webserver` int(11) NOT NULL default '1',
54+
`limit_web_ip` text,
55+
`limit_web_domain` int(11) NOT NULL default '-1',
56+
`limit_web_subdomain` int(11) NOT NULL default '-1',
57+
`limit_web_aliasdomain` int(11) NOT NULL default '-1',
58+
`limit_ftp_user` int(11) NOT NULL default '-1',
59+
`default_dnsserver` int(10) unsigned NOT NULL default '1',
60+
`limit_dns_zone` int(11) NOT NULL default '-1',
61+
`limit_dns_record` int(11) NOT NULL default '-1',
5562
`username` varchar(255) default NULL,
5663
`password` varchar(255) default NULL,
5764
`language` varchar(255) NOT NULL default 'en',

interface/lib/classes/tform.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,9 +889,9 @@ function datalogSave($action,$primary_id, $record_old, $record_new) {
889889

890890
if(is_array($record_new) && count($record_new) > 0) {
891891
foreach($record_new as $key => $val) {
892-
if($record_old[$key] != $val) {
892+
if(@$record_old[$key] != $val) {
893893
// Record has changed
894-
$diffrec[$key] = array('old' => $record_old[$key],
894+
$diffrec[$key] = array('old' => @$record_old[$key],
895895
'new' => $val);
896896
}
897897
}

interface/web/sites/web_aliasdomain_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function onSubmit() {
9494
global $app, $conf;
9595

9696
// Get the record of the parent domain
97-
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"]));
97+
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"]));
9898

9999
// Set a few fixed values
100100
$this->dataRecord["type"] = 'alias';

interface/web/sites/web_domain_edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function onShowEnd() {
122122
$client_select = "<option value='0'></option>";
123123
if(is_array($clients)) {
124124
foreach( $clients as $client) {
125-
$selected = ($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':'';
125+
$selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':'';
126126
$client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
127127
}
128128
}
@@ -235,8 +235,8 @@ function onAfterUpdate() {
235235
$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");
236236
$client_id = intval($client["client_id"]);
237237
} else {
238-
$client_id = intval($web_rec["client_group_id"]);
239-
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".intval($this->dataRecord["client_group_id"]));
238+
$client_id = intval(@$web_rec["client_group_id"]);
239+
$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".intval(@$this->dataRecord["client_group_id"]));
240240
$client_id = intval($client["client_id"]);
241241
}
242242

interface/web/sites/web_subdomain_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function onShowEnd() {
7979
global $app, $conf;
8080

8181
// Get the record of the parent domain
82-
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"]));
82+
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"]));
8383

8484
// remove the parent domain part of the domain name before we show it in the text field.
8585
$this->dataRecord["domain"] = str_replace('.'.$parent_domain["domain"],'',$this->dataRecord["domain"]);
@@ -93,7 +93,7 @@ function onSubmit() {
9393
global $app, $conf;
9494

9595
// Get the record of the parent domain
96-
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"]));
96+
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".intval(@$this->dataRecord["parent_domain_id"]));
9797

9898
// Set a few fixed values
9999
$this->dataRecord["type"] = 'subdomain';

server/plugins-enabled/apache2_plugin.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ function update($event_name,$data) {
9797
if(!is_dir($data["new"]["document_root"]."/cgi-bin")) exec("mkdir -p ".$data["new"]["document_root"]."/cgi-bin");
9898

9999
// Create the symlink for the logfiles
100+
if(!is_dir('/var/log/ispconfig/httpd/'.$data["new"]["domain"])) exec('mkdir -p /var/log/ispconfig/httpd/'.$data["new"]["domain"]);
100101
if(!is_link($data["new"]["document_root"]."/log")) exec("ln -s /var/log/ispconfig/httpd/".$data["new"]["domain"]." ".$data["new"]["document_root"]."/log");
101102

102103
// TODO: Create the symlinks

0 commit comments

Comments
 (0)