Commit cea1e5d3 authored by tbrehm's avatar tbrehm
Browse files

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.
parent a8ccf601
......@@ -67,20 +67,6 @@ CREATE TABLE IF NOT EXISTS `aps_settings` (
-- --------------------------------------------------------
--
-- 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(2, 'ignore-php-configu
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');
\ No newline at end of file
ALTER TABLE `client_template` ADD `limit_aps` int(11) NOT NULL DEFAULT '0' AFTER `limit_webdav_user`;
\ No newline at end of file
-- --------------------------------------------------------
--
-- 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`
......@@ -789,6 +789,7 @@ CREATE TABLE `mail_user` (
`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 @@ CREATE TABLE `sys_session` (
-- --------------------------------------------------------
--
-- 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 @@ CREATE TABLE `web_domain` (
`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 @@ INSERT INTO `sys_ini` (`sysini_id`, `config`) VALUES (1, '');
-- 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);
-- --------------------------------------------------------
......
......@@ -251,7 +251,7 @@ class page_action extends tform_actions {
$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 @@ class page_action extends tform_actions {
$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);
}
......
......@@ -41,9 +41,9 @@ class system{
* @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';
......
<?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 @@ class apache2_plugin {
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 @@ class apache2_plugin {
// 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);
}
......
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