Adding a custom newsfeed to the customer-dashboard, fixes #1408
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
@@ -341,6 +341,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('customer', 'ftpprefix', 'ftp'),
|
||||
('customer', 'mysqlprefix', 'sql'),
|
||||
('customer', 'ftpatdomain', '0'),
|
||||
('customer', 'show_news_feed', '0'),
|
||||
('customer', 'news_feed_url', ''),
|
||||
('ticket', 'noreply_email', 'NO-REPLY@SERVERNAME'),
|
||||
('ticket', 'worktime_all', '1'),
|
||||
('ticket', 'worktime_begin', '00:00'),
|
||||
|
||||
@@ -2770,3 +2770,14 @@ if (isFroxlorVersion('0.9.32-rc3')) {
|
||||
showUpdateStep("Updating from 0.9.32-rc3 to 0.9.32 final", false);
|
||||
updateToVersion('0.9.32');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.32')) {
|
||||
showUpdateStep("Updating from 0.9.32 to 0.9.33-dev1", false);
|
||||
|
||||
showUpdateStep("Adding settings for custom newsfeed on customer-dashboard");
|
||||
Settings::AddNew("customer.show_news_feed", isset($_POST['customer_show_news_feed']) ? (int)$_POST['customer_show_news_feed'] : '0');
|
||||
Settings::AddNew("customer.news_feed_url", isset($_POST['customer_news_feed_url']) ? $_POST['customer_news_feed_url'] : '');
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.33-dev1');
|
||||
}
|
||||
|
||||
@@ -658,4 +658,14 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version) {
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if (versionInUpdate($current_version, '0.9.33-dev1')) {
|
||||
$has_preconfig = true;
|
||||
$description = 'You can enable/disable the display/usage of the custom newsfeed for customers.<br /><br />';
|
||||
$question = '<strong>Do you want to enable the custom newsfeed for customer? (default: no):</strong> ';
|
||||
$question.= makeyesno('customer_show_news_feed', '1', '0', '0').'<br />';
|
||||
$question.= '<strong>You have to set the URL for your RSS-feed here, if you have choosen to enable the custom newsfeed on the customer-dashboard:</strong> ';
|
||||
$question.= '<input type="text" class="text" name="customer_news_feed_url" value="" /><br />';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user