Skip to content

Commit 8ab3cdc

Browse files
committed
Merged revisions 2681-2739 from 3.0.4 stable branch.
1 parent 8cddcd7 commit 8ab3cdc

File tree

227 files changed

+2453
-3084
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+2453
-3084
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -865,11 +865,11 @@ public function install_ispconfig()
865865
if($conf['nginx']['installed'] == true){
866866
$command = 'usermod -a -G ispconfig '.$conf['nginx']['user'];
867867
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
868-
if(is_user('ispapps')){
868+
//if(is_user('ispapps')){
869869
// Allow the ispapps vhost access to /etc/squirrelmail
870-
$command = 'usermod -a -G '.$conf['apache']['group'].' ispapps';
871-
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
872-
}
870+
//$command = 'usermod -a -G '.$conf['apache']['group'].' ispapps';
871+
//caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
872+
//}
873873
if(is_group('ispapps')){
874874
$command = 'usermod -a -G ispapps '.$conf['nginx']['user'];
875875
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");

install/dist/lib/gentoo.lib.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,13 +653,15 @@ public function configure_apps_vhost()
653653
if(substr($socket_dir,-1) != '/') $socket_dir .= '/';
654654
if(!is_dir($socket_dir)) exec('mkdir -p '.$socket_dir);
655655
$fpm_socket = $socket_dir.'apps.sock';
656+
$cgi_socket = escapeshellcmd($conf['nginx']['cgi_socket']);
656657

657658
$content = str_replace('{apps_vhost_ip}', $apps_vhost_ip, $content);
658659
$content = str_replace('{apps_vhost_port}', $conf['web']['apps_vhost_port'], $content);
659660
$content = str_replace('{apps_vhost_dir}', $conf['web']['website_basedir'].'/apps', $content);
660661
$content = str_replace('{apps_vhost_servername}', $apps_vhost_servername, $content);
661662
//$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
662663
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
664+
$content = str_replace('{cgi_socket}', $cgi_socket, $content);
663665

664666
wf($vhost_conf_dir.'/apps.vhost', $content);
665667

install/lib/installer_base.lib.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,13 +1500,15 @@ public function configure_apps_vhost() {
15001500
if(substr($socket_dir,-1) != '/') $socket_dir .= '/';
15011501
if(!is_dir($socket_dir)) exec('mkdir -p '.$socket_dir);
15021502
$fpm_socket = $socket_dir.'apps.sock';
1503+
$cgi_socket = escapeshellcmd($conf['nginx']['cgi_socket']);
15031504

15041505
$content = str_replace('{apps_vhost_ip}', $apps_vhost_ip, $content);
15051506
$content = str_replace('{apps_vhost_port}', $conf['web']['apps_vhost_port'], $content);
15061507
$content = str_replace('{apps_vhost_dir}', $conf['web']['website_basedir'].'/apps', $content);
15071508
$content = str_replace('{apps_vhost_servername}', $apps_vhost_servername, $content);
15081509
//$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
15091510
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
1511+
$content = str_replace('{cgi_socket}', $cgi_socket, $content);
15101512

15111513
wf($vhost_conf_dir.'/apps.vhost', $content);
15121514

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE `shell_user` CHANGE `ssh_rsa` `ssh_rsa` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';

install/sql/ispconfig3.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ CREATE TABLE `shell_user` (
10261026
`shell` varchar(255) NOT NULL default '/bin/bash',
10271027
`dir` varchar(255) default NULL,
10281028
`chroot` varchar(255) NOT NULL,
1029-
`ssh_rsa` VARCHAR( 600 ) NOT NULL default '',
1029+
`ssh_rsa` text NOT NULL,
10301030
PRIMARY KEY (`shell_user_id`)
10311031
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
10321032

install/tpl/config.inc.php.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ $conf['init_scripts'] = '/etc/init.d';
122122

123123

124124
//** Interface
125-
$conf['interface_modules_enabled'] = 'dashboard,mail,sites,dns,tools';
125+
$conf['interface_modules_enabled'] = 'dashboard,mail,sites,dns,tools,help';
126126

127127
//** Demo mode
128128
/* The demo mode is an option to restrict certain actions in the interface like

install/tpl/nginx_apps.vhost.master

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,15 @@ server {
3838
try_files $uri =404;
3939
root /usr/share/;
4040
include /etc/nginx/fastcgi_params;
41-
fastcgi_pass unix:{fpm_socket};
41+
# To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used
42+
fastcgi_pass 127.0.0.1:9000;
4243
fastcgi_index index.php;
4344
fastcgi_param SCRIPT_FILENAME $request_filename;
45+
fastcgi_param PATH_INFO $fastcgi_script_name;
46+
fastcgi_buffer_size 128k;
47+
fastcgi_buffers 256 4k;
48+
fastcgi_busy_buffers_size 256k;
49+
fastcgi_temp_file_write_size 256k;
4450
}
4551
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
4652
root /usr/share/;
@@ -57,9 +63,15 @@ server {
5763
try_files $uri =404;
5864
root /usr/share/;
5965
include /etc/nginx/fastcgi_params;
60-
fastcgi_pass unix:{fpm_socket};
66+
# To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used
67+
fastcgi_pass 127.0.0.1:9000;
6168
fastcgi_index index.php;
6269
fastcgi_param SCRIPT_FILENAME $request_filename;
70+
fastcgi_param PATH_INFO $fastcgi_script_name;
71+
fastcgi_buffer_size 128k;
72+
fastcgi_buffers 256 4k;
73+
fastcgi_busy_buffers_size 256k;
74+
fastcgi_temp_file_write_size 256k;
6375
}
6476
location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
6577
root /usr/share/;
@@ -68,4 +80,24 @@ server {
6880
location /webmail {
6981
rewrite ^/* /squirrelmail last;
7082
}
83+
84+
location /cgi-bin/mailman {
85+
root /usr/lib/;
86+
fastcgi_split_path_info (^/cgi-bin/mailman/[^/]*)(.*)$;
87+
include /etc/nginx/fastcgi_params;
88+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
89+
fastcgi_param PATH_INFO $fastcgi_path_info;
90+
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
91+
fastcgi_intercept_errors on;
92+
fastcgi_pass unix:{cgi_socket};
93+
}
94+
95+
location /images/mailman {
96+
alias /usr/share/images/mailman;
97+
}
98+
99+
location /pipermail {
100+
alias /var/lib/mailman/archives/public;
101+
autoindex on;
102+
}
71103
}

install/tpl/server.ini.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ wget=/usr/bin/wget
103103

104104
[rescue]
105105
try_rescue=n
106-
do_not_try_rescue_apache=n
106+
do_not_try_rescue_httpd=n
107107
do_not_try_rescue_mysql=n
108108
do_not_try_rescue_mail=n
109109

interface/lib/classes/custom_datasource.inc.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,31 @@ function dns_servers($field, $record) {
6363
return $records_new;
6464
}
6565

66+
function webdav_domains($field, $record) {
67+
global $app, $conf;
68+
69+
$servers = $app->db->queryAllRecords("SELECT * FROM server WHERE active = 1 AND mirror_server_id = 0");
70+
$server_ids = array();
71+
$app->uses('getconf');
72+
if(is_array($servers) && !empty($servers)){
73+
foreach($servers as $server){
74+
$web_config = $app->getconf->get_server_config($server['server_id'], 'web');
75+
if($web_config['server_type'] != 'nginx') $server_ids[] = $server['server_id'];
76+
}
77+
}
78+
$server_ids = implode(',', $server_ids);
79+
$records = $app->db->queryAllRecords("SELECT domain_id,domain FROM web_domain WHERE type = 'vhost' AND server_id IN (".$server_ids.") AND ".$app->tform->getAuthSQL('r')." ORDER BY domain");
80+
81+
$records_new = array();
82+
if(is_array($records)) {
83+
foreach($records as $rec) {
84+
$key = $rec['domain_id'];
85+
$records_new[$key] = $rec['domain'];
86+
}
87+
}
88+
return $records_new;
89+
}
90+
6691

6792
function client_servers($field, $record) {
6893
global $app, $conf;

interface/lib/classes/listform.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public function getSortSQL()
282282
public function decode($record)
283283
{
284284
global $conf, $app;
285-
if(is_array($record)) {
285+
if(is_array($record) && count($record) > 0) {
286286
foreach($this->listDef['item'] as $field){
287287
$key = $field['field'];
288288
if(isset($record[$key])) {

0 commit comments

Comments
 (0)