diff --git a/install/froxlor.sql b/install/froxlor.sql
index 9f84c0f6..6afd3bfa 100644
--- a/install/froxlor.sql
+++ b/install/froxlor.sql
@@ -372,7 +372,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('dkim', 'dkim_domains', 'domains'),
('dkim', 'dkim_dkimkeys', 'dkim-keys.conf'),
('dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart'),
- ('admin', 'show_news_feed', '1'),
+ ('admin', 'show_news_feed', '0'),
('admin', 'show_version_login', '0'),
('admin', 'show_version_footer', '0'),
('spf', 'use_spf', '0'),
diff --git a/install/lib/class.FroxlorInstall.php b/install/lib/class.FroxlorInstall.php
index 8cbab9af..73fd3eb8 100644
--- a/install/lib/class.FroxlorInstall.php
+++ b/install/lib/class.FroxlorInstall.php
@@ -160,6 +160,7 @@ class FroxlorInstall {
$this->_getPostField('admin_user', 'admin');
$this->_getPostField('admin_pass1');
$this->_getPostField('admin_pass2');
+ $this->_getPostField('activate_newsfeed', 1);
$posixusername = posix_getpwuid(posix_getuid());
$this->_getPostField('httpuser', $posixusername['name']);
$posixgroup = posix_getgrgid(posix_getgid());
@@ -473,6 +474,7 @@ class FroxlorInstall {
$this->_updateSetting($upd_stmt, '/var/run/', 'phpfpm', 'fastcgi_ipcdir');
}
+ $this->_updateSetting($upd_stmt, $this->_data['activate_newsfeed'], 'admin', 'show_news_feed');
$this->_updateSetting($upd_stmt, dirname(dirname(dirname(__FILE__))), 'system', 'letsencryptchallengepath');
// insert the lastcronrun to be the installation date
@@ -746,6 +748,8 @@ class FroxlorInstall {
} else { $style = '';
}
$formdata .= $this->_getSectionItemString('admin_pass2', true, $style, 'password');
+ // activate newsfeed?
+ $formdata .= $this->_getSectionItemYesNo('activate_newsfeed', true);
/**
* Server data
@@ -819,10 +823,10 @@ class FroxlorInstall {
}
/**
- * generate form checkbox field
+ * generate form radio field for webserver-selection
*
* @param string $fieldname
- * @param boolean $required
+ * @param boolean $checked
* @param string $style
*
* @return string
@@ -837,6 +841,25 @@ class FroxlorInstall {
return $sectionitem;
}
+ /**
+ * generate form checkbox field
+ *
+ * @param string $fieldname
+ * @param boolean $checked
+ * @param string $style
+ *
+ * @return string
+ */
+ private function _getSectionItemYesNo($fieldname = null, $checked = false, $style = "") {
+ $fieldlabel = $this->_lng['install'][$fieldname];
+ if ($checked) {
+ $checked = 'checked="checked"';
+ }
+ $sectionitem = "";
+ eval("\$sectionitem .= \"" . $this->_getTemplate("dataitemyesno") . "\";");
+ return $sectionitem;
+ }
+
/**
* check for requirements froxlor needs
*/
diff --git a/install/lng/english.lng.php b/install/lng/english.lng.php
index f0cd71d7..bab624aa 100644
--- a/install/lng/english.lng.php
+++ b/install/lng/english.lng.php
@@ -56,6 +56,7 @@ $lng['install']['admin_account'] = 'Administrator Account';
$lng['install']['admin_user'] = 'Administrator Username';
$lng['install']['admin_pass1'] = 'Administrator Password';
$lng['install']['admin_pass2'] = 'Administrator-Password (confirm)';
+$lng['install']['activate_newsfeed'] = 'Enable the official newsfeed
(https://inside.froxlor.org/news/)';
$lng['install']['serversettings'] = 'Server settings';
$lng['install']['servername'] = 'Server name (FQDN, no ip-address)';
$lng['install']['serverip'] = 'Server IP';
diff --git a/install/lng/german.lng.php b/install/lng/german.lng.php
index b2b21db4..dd60e772 100644
--- a/install/lng/german.lng.php
+++ b/install/lng/german.lng.php
@@ -56,6 +56,7 @@ $lng['install']['admin_account'] = 'Admin-Zugang';
$lng['install']['admin_user'] = 'Administrator-Benutzername';
$lng['install']['admin_pass1'] = 'Administrator-Passwort';
$lng['install']['admin_pass2'] = 'Administrator-Passwort (Bestätigung)';
+$lng['install']['activate_newsfeed'] = 'Aktiviere das offizielle Newsfeed
(https://inside.froxlor.org/news/)';
$lng['install']['serversettings'] = 'Servereinstellungen';
$lng['install']['servername'] = 'Servername (FQDN, keine IP-Adresse)';
$lng['install']['serverip'] = 'Server-IP';
diff --git a/install/templates/dataitemyesno.tpl b/install/templates/dataitemyesno.tpl
new file mode 100644
index 00000000..0f370820
--- /dev/null
+++ b/install/templates/dataitemyesno.tpl
@@ -0,0 +1,4 @@
+
+ + +
diff --git a/lib/ajax.php b/lib/ajax.php index 97fdb591..23370663 100644 --- a/lib/ajax.php +++ b/lib/ajax.php @@ -40,7 +40,7 @@ if ($action == "newsfeed") { if (isset($_GET['role']) && $_GET['role'] == "customer") { $feed = Settings::Get("customer.news_feed_url"); } else { - $feed = "http://inside.froxlor.org/news/"; + $feed = "https://inside.froxlor.org/news/"; } if (function_exists("simplexml_load_file") == false) { diff --git a/lng/english.lng.php b/lng/english.lng.php index de7c6820..449ceb90 100644 --- a/lng/english.lng.php +++ b/lng/english.lng.php @@ -1762,7 +1762,7 @@ $lng['admin']['templates']['SERVER_IP'] = 'Replaces the default server ip-addres $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']['show_news_feed']['title'] = 'Show news-feed on admin-dashboard'; -$lng['admin']['show_news_feed']['description'] = 'Enable this to show the official froxlor newsfeed on your dashboard and never miss important information or release-announcements.'; +$lng['admin']['show_news_feed']['description'] = 'Enable this to show the official froxlor newsfeed (https://inside.froxlor.org/news/) on your dashboard and never miss important information or release-announcements.'; $lng['panel']['newsfeed_disabled'] = 'The newsfeed is disabled. Click the edit icon to go to the settings.'; // Added in Froxlor 0.9.32 @@ -1807,7 +1807,7 @@ $lng['error']['passwordshouldnotbeusername'] = 'The password should not be the s // Added in Froxlor 0.9.33 $lng['admin']['customer_show_news_feed'] = "Show newsfeed on customer-dashboard"; $lng['admin']['customer_news_feed_url']['title'] = "Use custom RSS-feed"; -$lng['admin']['customer_news_feed_url']['description'] = "Specify a custom RSS-feed that will be shown to your customers on their dashboard.