tbrehm
2012-08-15 cea1e5d3d0a7c45568a1539f9ecb6cf36c7f7f6c
Fixed: FS#2346 - doveadm request disabledoveadm column in mail_user table
- Added missing sys_tpl table to ispconfig3.sql and moved the definition of the table to the upd_0035.sql file as new tables cant be added in existing update files.
- added new ssl_key field to web_domain table.
- cleaned up unused code from apache plugin.

5 files modified
1 files added
98 ■■■■■ changed files
install/sql/incremental/upd_0034.sql 19 ●●●●● patch | view | raw | blame | history
install/sql/incremental/upd_0035.sql 25 ●●●●● patch | view | raw | blame | history
install/sql/ispconfig3.sql 25 ●●●●● patch | view | raw | blame | history
interface/web/mail/mail_user_edit.php 4 ●●●● patch | view | raw | blame | history
server/lib/classes/system.inc.php 6 ●●●● patch | view | raw | blame | history
server/plugins-available/apache2_plugin.inc.php 19 ●●●● patch | view | raw | blame | history
install/sql/incremental/upd_0034.sql
@@ -68,20 +68,6 @@
-- --------------------------------------------------------
--
-- Table structure for table `sys_theme`
--
CREATE TABLE IF NOT EXISTS `sys_theme` (
  `var_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `tpl_name` varchar(32) NOT NULL,
  `username` varchar(64) NOT NULL,
  `logo_url` varchar(255) NOT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
--
-- Dumping data for table `aps_settings`
--
@@ -90,7 +76,4 @@
INSERT INTO `aps_settings` (`id`, `name`, `value`) VALUES(3, 'ignore-webserver-module', '');
ALTER TABLE  `client` ADD  `limit_aps` int(11) NOT NULL DEFAULT '0' AFTER  `limit_webdav_user`;
ALTER TABLE  `client_template` ADD  `limit_aps` int(11) NOT NULL DEFAULT '0' AFTER  `limit_webdav_user`;
INSERT INTO `dbispconfig`.`sys_theme` (`var_id`, `tpl_name`, `username`, `logo_url`) VALUES (NULL, 'default', 'global', 'themes/default/images/header_logo.png');
INSERT INTO `dbispconfig`.`sys_theme` (`var_id`, `tpl_name`, `username`, `logo_url`) VALUES (NULL, 'default-v2', 'global', 'themes/default-v2/images/header_logo.png');
ALTER TABLE  `client_template` ADD  `limit_aps` int(11) NOT NULL DEFAULT '0' AFTER  `limit_webdav_user`;
install/sql/incremental/upd_0035.sql
New file
@@ -0,0 +1,25 @@
-- --------------------------------------------------------
--
-- Table structure for table `sys_theme`
--
CREATE TABLE IF NOT EXISTS `sys_theme` (
  `var_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `tpl_name` varchar(32) NOT NULL,
  `username` varchar(64) NOT NULL,
  `logo_url` varchar(255) NOT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
INSERT INTO `sys_theme` (`var_id`, `tpl_name`, `username`, `logo_url`) VALUES (NULL, 'default', 'global', 'themes/default/images/header_logo.png');
INSERT INTO `sys_theme` (`var_id`, `tpl_name`, `username`, `logo_url`) VALUES (NULL, 'default-v2', 'global', 'themes/default-v2/images/header_logo.png');
-- --------------------------------------------------------
ALTER TABLE  `web_domain` ADD  `ssl_key` MEDIUMTEXT NOT NULL AFTER  `ssl_bundle`;
ALTER TABLE  `mail_user` ADD  `disabledoveadm` enum('n','y') NOT NULL default 'n' AFTER  `disablelda`
install/sql/ispconfig3.sql
@@ -789,6 +789,7 @@
  `disablesmtp` enum('n','y') NOT NULL default 'n',
  `disablesieve` enum('n','y') NOT NULL default 'n',
  `disablelda` enum('n','y') NOT NULL default 'n',
  `disabledoveadm` enum('n','y') NOT NULL default 'n',
  PRIMARY KEY  (`mailuser_id`),
  KEY `server_id` (`server_id`,`email`),
  KEY `email_access` (`email`,`access`)
@@ -1500,6 +1501,20 @@
-- --------------------------------------------------------
--
-- Table structure for table `sys_theme`
--
CREATE TABLE IF NOT EXISTS `sys_theme` (
  `var_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `tpl_name` varchar(32) NOT NULL,
  `username` varchar(64) NOT NULL,
  `logo_url` varchar(255) NOT NULL,
  PRIMARY KEY (`var_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
-- 
-- Table structure for table  `sys_user`
-- 
@@ -1641,6 +1656,7 @@
  `ssl_request` mediumtext NULL,
  `ssl_cert` mediumtext NULL,
  `ssl_bundle` mediumtext NULL,
  `ssl_key` mediumtext NULL,
  `ssl_action` varchar(16) NULL,
  `stats_password` varchar(255) default NULL,
  `stats_type` varchar(255) default 'webalizer',
@@ -2057,6 +2073,15 @@
-- Dumping data for table `sys_user`
-- 
INSERT INTO `sys_theme` (`var_id`, `tpl_name`, `username`, `logo_url`) VALUES (NULL, 'default', 'global', 'themes/default/images/header_logo.png');
INSERT INTO `sys_theme` (`var_id`, `tpl_name`, `username`, `logo_url`) VALUES (NULL, 'default-v2', 'global', 'themes/default-v2/images/header_logo.png');
-- --------------------------------------------------------
--
-- Dumping data for table `sys_user`
--
INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'dashboard,admin,client,mail,monitor,sites,dns,vm,tools,help', 'dashboard', 'default', 'admin', 1, 'en', '1,2', 1, 0);
-- --------------------------------------------------------
interface/web/mail/mail_user_edit.php
@@ -251,7 +251,7 @@
            $disabledeliver = ($this->dataRecord["postfix"] == 'y')?'n':'y';
            $disablesmtp = ($this->dataRecord["postfix"] == 'y')?'n':'y';
        
            $sql = "UPDATE mail_user SET disableimap = '$disableimap', disablesieve = '$disableimap', disablepop3 = '$disablepop3', disablesmtp = '$disablesmtp', disabledeliver = '$disabledeliver', disablelda = '$disabledeliver' WHERE mailuser_id = ".$this->id;
            $sql = "UPDATE mail_user SET disableimap = '$disableimap', disablesieve = '$disableimap', disablepop3 = '$disablepop3', disablesmtp = '$disablesmtp', disabledeliver = '$disabledeliver', disablelda = '$disabledeliver', disabledoveadm = '$disableimap' WHERE mailuser_id = ".$this->id;
            $app->db->query($sql);
        }
    }
@@ -292,7 +292,7 @@
            $disabledeliver = ($this->dataRecord["postfix"] == 'y')?'n':'y';
            $disablesmtp = ($this->dataRecord["postfix"] == 'y')?'n':'y';
        
            $sql = "UPDATE mail_user SET disableimap = '$disableimap', disablesieve = '$disableimap', disablepop3 = '$disablepop3', disablesmtp = '$disablesmtp', disabledeliver = '$disabledeliver', disablelda = '$disabledeliver' WHERE mailuser_id = ".$this->id;
            $sql = "UPDATE mail_user SET disableimap = '$disableimap', disablesieve = '$disableimap', disablepop3 = '$disablepop3', disablesmtp = '$disablesmtp', disabledeliver = '$disabledeliver', disablelda = '$disabledeliver', disabledoveadm = '$disableimap' WHERE mailuser_id = ".$this->id;
            $app->db->query($sql);
        }
        
server/lib/classes/system.inc.php
@@ -41,9 +41,9 @@
     * @return system
     */
    public function system(){
        global $go_info;
          $this->server_id = $go_info['isp']['server_id'];
          $this->server_conf = $go_info['isp']['server_conf'];
        //global $go_info;
          //$this->server_id = $go_info['isp']['server_id'];
          //$this->server_conf = $go_info['isp']['server_conf'];
          $this->server_conf['passwd_datei'] = '/etc/passwd';
          $this->server_conf['shadow_datei'] = '/etc/shadow';
          $this->server_conf['group_datei'] = '/etc/group';
server/plugins-available/apache2_plugin.inc.php
@@ -1,7 +1,7 @@
<?php
/*
Copyright (c) 2007 - 2009, Till Brehm, projektfarm Gmbh
Copyright (c) 2007 - 2012, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@@ -458,21 +458,6 @@
            if(is_link($data['old']['document_root'].'/log')) $app->system->unlink($data['old']['document_root'].'/log');
        }
        
        /*
        // Create the symlink for the logfiles
        if(!is_dir('/var/log/ispconfig/httpd/'.$data['new']['domain'])) $app->system->mkdirpath('/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");
            if ($web_config["website_symlinks_rel"] == 'y') {
                $this->create_relative_link("/var/log/ispconfig/httpd/".$data["new"]["domain"], $data["new"]["document_root"]."/log");
            } else {
                exec("ln -s /var/log/ispconfig/httpd/".$data["new"]["domain"]." ".$data["new"]["document_root"]."/log");
            }
            $app->log('Creating symlink: ln -s /var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/log',LOGLEVEL_DEBUG);
        }
        */
        //* Create the log dir if nescessary and mount it
        if(!is_dir($data['new']['document_root'].'/log') || is_link($data['new']['document_root'].'/log')) {
            if(is_link($data['new']['document_root'].'/log')) unlink($data['new']['document_root'].'/log');
@@ -651,7 +636,7 @@
                // make tmp directory writable for Apache and the website users
                $app->system->chmod($data['new']['document_root'].'/tmp',0777);
            
                // Set Log symlink to 755 to make the logs accessible by the FTP user
                // Set Log directory to 755 to make the logs accessible by the FTP user
                if(realpath($data['new']['document_root'].'/log') == '/var/log/ispconfig/httpd/'.$data['new']['domain'].'/error.log') {
                    $app->system->chmod($data['new']['document_root'].'/log',0755);
                }