tbrehm
2007-09-19 df52d4b33c0267ef9be6d68864d1f14aaad9ab59
Fixed some bugs in the website module.
7 files modified
30 ■■■■■ changed files
install/lib/installer_base.lib.php 2 ●●● patch | view | raw | blame | history
install/sql/ispconfig3.sql 11 ●●●● patch | view | raw | blame | history
interface/lib/classes/tform.inc.php 4 ●●●● patch | view | raw | blame | history
interface/web/sites/web_aliasdomain_edit.php 2 ●●● patch | view | raw | blame | history
interface/web/sites/web_domain_edit.php 6 ●●●● patch | view | raw | blame | history
interface/web/sites/web_subdomain_edit.php 4 ●●●● patch | view | raw | blame | history
server/plugins-enabled/apache2_plugin.inc.php 1 ●●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php
@@ -646,7 +646,7 @@
        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";
install/sql/ispconfig3.sql
@@ -50,8 +50,15 @@
  `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',
interface/lib/classes/tform.inc.php
@@ -889,9 +889,9 @@
                
                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);
                                }
                        }
interface/web/sites/web_aliasdomain_edit.php
@@ -94,7 +94,7 @@
        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';
interface/web/sites/web_domain_edit.php
@@ -122,7 +122,7 @@
            $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 @@
            $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"]);
        }
        
interface/web/sites/web_subdomain_edit.php
@@ -79,7 +79,7 @@
        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 @@
        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';
server/plugins-enabled/apache2_plugin.inc.php
@@ -97,6 +97,7 @@
        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