Merge remote-tracking branch 'origin/0.9.31'

This commit is contained in:
Michael Kaufmann (d00p)
2013-12-08 10:22:21 +01:00
10 changed files with 50 additions and 5 deletions

View File

@@ -194,6 +194,14 @@ return array(
'default' => false, 'default' => false,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'admin_show_news_feed' => array(
'label' => $lng['admin']['show_news_feed'],
'settinggroup' => 'admin',
'varname' => 'show_news_feed',
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
),
'panel_allow_domain_change_admin' => array( 'panel_allow_domain_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_domain_change_admin'], 'label' => $lng['serversettings']['panel_allow_domain_change_admin'],
'settinggroup' => 'panel', 'settinggroup' => 'panel',

View File

@@ -362,6 +362,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('dkim', 'dkim_domains', 'domains'), ('dkim', 'dkim_domains', 'domains'),
('dkim', 'dkim_dkimkeys', 'dkim-keys.conf'), ('dkim', 'dkim_dkimkeys', 'dkim-keys.conf'),
('dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart'), ('dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart'),
('admin', 'show_news_feed', '1'),
('admin', 'show_version_login', '0'), ('admin', 'show_version_login', '0'),
('admin', 'show_version_footer', '0'), ('admin', 'show_version_footer', '0'),
('spf', 'use_spf', '0'), ('spf', 'use_spf', '0'),

View File

@@ -2521,6 +2521,22 @@ if (isFroxlorVersion('0.9.31-dev6')) {
} }
if (isFroxlorVersion('0.9.31-rc1')) { if (isFroxlorVersion('0.9.31-rc1')) {
showUpdateStep("Updating from 0.9.31-rc1 to 0.9.31-rc2");
lastStepStatus(0);
$update_admin_news_feed = isset($_POST['update_admin_news_feed']) ? (int)$_POST['update_admin_news_feed'] : '1';
showUpdateStep("Adding new news-feed option");
$ins_stmt = Database::prepare("
INSERT INTO `".TABLE_PANEL_SETTINGS."` SET `settinggroup` = 'admin', `varname` = 'show_news_feed', `value` = :value
");
Database::pexecute($ins_stmt, array('value' => $update_admin_news_feed));
lastStepStatus(0);
updateToVersion('0.9.31-rc2');
}
if (isFroxlorVersion('0.9.31-rc2')) {
showUpdateStep("Updating from 0.9.31-rc1 to 0.9.31-rc99"); showUpdateStep("Updating from 0.9.31-rc1 to 0.9.31-rc99");
lastStepStatus(0); lastStepStatus(0);

View File

@@ -601,4 +601,13 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= makeyesno('update_error_report_customer', '1', '0', '0'); $question.= makeyesno('update_error_report_customer', '1', '0', '0');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
} }
if (versionInUpdate($current_version, '0.9.31-rc2')) {
$has_preconfig = true;
$description = 'You can enable/disable the display/usage of the news-feed for admins<br /><br />';
$question = '<strong>Do you want to enable the news-feed for admins? (default: yes):</strong>&nbsp;';
$question.= makeyesno('update_admin_news_feed', '1', '0', '1').'<br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
} }

View File

@@ -31,9 +31,10 @@ if ($action == "newsfeed") {
die(); die();
} }
// get version
require './tables.inc.php';
if (function_exists('curl_version')) { if (function_exists('curl_version')) {
// get version
require './tables.inc.php';
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $feed); curl_setopt($ch, CURLOPT_URL, $feed);
curl_setopt($ch, CURLOPT_USERAGENT, 'Froxlor/'.$version); curl_setopt($ch, CURLOPT_USERAGENT, 'Froxlor/'.$version);
@@ -43,6 +44,7 @@ if ($action == "newsfeed") {
$news = simplexml_load_string(trim($output)); $news = simplexml_load_string(trim($output));
} else { } else {
if (ini_get('allow_url_fopen')) { if (ini_get('allow_url_fopen')) {
ini_set('user_agent', 'Froxlor/'.$version);
$news = simplexml_load_file($feed, null, LIBXML_NOCDATA); $news = simplexml_load_file($feed, null, LIBXML_NOCDATA);
} else { } else {
$news = false; $news = false;

View File

@@ -51,6 +51,6 @@ define('TABLE_PANEL_DOMAIN_SSL_SETTINGS', 'domain_ssl_settings');
define('TABLE_DOMAINTOIP', 'panel_domaintoip'); define('TABLE_DOMAINTOIP', 'panel_domaintoip');
// VERSION INFO // VERSION INFO
$version = '0.9.31-rc1'; $version = '0.9.31-rc2';
$dbversion = '2'; $dbversion = '2';
$branding = ''; $branding = '';

View File

@@ -1778,3 +1778,4 @@ $lng['admin']['templates']['SERVER_HOSTNAME'] = 'Replaces the system-hostname (U
$lng['admin']['templates']['SERVER_IP'] = 'Replaces the default server ip-address'; $lng['admin']['templates']['SERVER_IP'] = 'Replaces the default server ip-address';
$lng['admin']['templates']['SERVER_PORT'] = 'Replaces the default server port'; $lng['admin']['templates']['SERVER_PORT'] = 'Replaces the default server port';
$lng['admin']['templates']['DOMAINNAME'] = 'Replaces the customers standard-subdomain (can be empty if none is generated)'; $lng['admin']['templates']['DOMAINNAME'] = 'Replaces the customers standard-subdomain (can be empty if none is generated)';
$lng['admin']['show_news_feed'] = 'Show news-feed on admin-dashboard';

View File

@@ -1504,3 +1504,4 @@ $lng['admin']['templates']['SERVER_HOSTNAME'] = 'Wird mit dem System-Hostname (U
$lng['admin']['templates']['SERVER_IP'] = 'Wird mit der standard System IP-Adresse ersetzt'; $lng['admin']['templates']['SERVER_IP'] = 'Wird mit der standard System IP-Adresse ersetzt';
$lng['admin']['templates']['SERVER_PORT'] = 'Wird mit dem standard Port ersetzt'; $lng['admin']['templates']['SERVER_PORT'] = 'Wird mit dem standard Port ersetzt';
$lng['admin']['templates']['DOMAINNAME'] = 'Wird mit der Standardsubdomain des Kunden ersetzt (kann leer sein, wenn keine erstellt werden soll)'; $lng['admin']['templates']['DOMAINNAME'] = 'Wird mit der Standardsubdomain des Kunden ersetzt (kann leer sein, wenn keine erstellt werden soll)';
$lng['admin']['show_news_feed'] = 'Zeige News-Feed im Admin-Dashboard';

View File

@@ -34,6 +34,11 @@ class apache_fcgid extends apache
if ($domain['ssl'] == 1 && $ssl_vhost) { if ($domain['ssl'] == 1 && $ssl_vhost) {
$srvName = 'ssl-fpm.external'; $srvName = 'ssl-fpm.external';
} }
// #1317 - perl is executed via apache and therefore, when using fpm, does not know the user
// which perl is supposed to run as, hence the need for Suexec need
if (customerHasPerlEnabled($domain['customerid'])) {
$php_options_text.= ' SuexecUserGroup "' . $domain['loginname'] . '" "' . $domain['loginname'] . '"' . "\n";
}
$php_options_text.= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName . ' -socket ' . $php->getInterface()->getSocketFile() . ' -idle-timeout ' . $this->settings['phpfpm']['idle_timeout'] . "\n"; $php_options_text.= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName . ' -socket ' . $php->getInterface()->getSocketFile() . ' -idle-timeout ' . $this->settings['phpfpm']['idle_timeout'] . "\n";
$php_options_text.= ' <Directory "' . makeCorrectDir($domain['documentroot']) . '">' . "\n"; $php_options_text.= ' <Directory "' . makeCorrectDir($domain['documentroot']) . '">' . "\n";
$php_options_text.= ' <FilesMatch "\.php$">' . "\n"; $php_options_text.= ' <FilesMatch "\.php$">' . "\n";

View File

@@ -165,7 +165,8 @@ $header
</section> </section>
<if $settings['admin']['show_news_feed'] == '1'>
<section class="dboarditem bradius" id="newsfeed" style="display: none"> <section class="dboarditem bradius" id="newsfeed" style="display: none">
<table> <table>
<tr> <tr>
@@ -174,7 +175,8 @@ $header
</table> </table>
<div id="newsfeeditems"></div> <div id="newsfeeditems"></div>
</section> </section>
</if>
<section class="dboarditem bradius"> <section class="dboarditem bradius">
<table> <table>
<tr> <tr>