mirror of
https://github.com/vale981/Vulcan
synced 2025-03-08 19:11:38 -05:00
feeds require to be enabled
This commit is contained in:
parent
0d983355eb
commit
37ab8d48b9
4 changed files with 36 additions and 12 deletions
|
@ -34,12 +34,12 @@ Meteor.methods({
|
|||
}
|
||||
});
|
||||
|
||||
resetNewsletterSchedule = function () {
|
||||
resetNewsletterJob = function () {
|
||||
SyncedCron.stop();
|
||||
addSchedule();
|
||||
addJob();
|
||||
}
|
||||
|
||||
var addSchedule = function () {
|
||||
var addJob = function () {
|
||||
SyncedCron.add({
|
||||
name: 'scheduleNewsletter',
|
||||
schedule: function(parser) {
|
||||
|
@ -54,6 +54,6 @@ var addSchedule = function () {
|
|||
}
|
||||
Meteor.startup(function () {
|
||||
if (getSetting('enableNewsletter', false)) {
|
||||
addSchedule();
|
||||
addJob();
|
||||
}
|
||||
});
|
|
@ -36,6 +36,21 @@ var feedItemIdProperty = {
|
|||
}
|
||||
addToPostSchema.push(feedItemIdProperty);
|
||||
|
||||
// Settings
|
||||
|
||||
var enableFeeds = {
|
||||
propertyName: 'enableFeeds',
|
||||
propertySchema: {
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
autoform: {
|
||||
group: 'feeds',
|
||||
instructions: 'Enable posting from RSS feeds (requires restart).'
|
||||
}
|
||||
}
|
||||
}
|
||||
addToSettingsSchema.push(enableFeeds);
|
||||
|
||||
Meteor.startup(function () {
|
||||
Feeds.allow({
|
||||
insert: isAdminById,
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
SyncedCron.add({
|
||||
name: 'Post by RSS feed',
|
||||
schedule: function(parser) {
|
||||
return parser.text('every 30 minutes');
|
||||
},
|
||||
job: function() {
|
||||
fetchFeeds();
|
||||
var addJob = function () {
|
||||
SyncedCron.add({
|
||||
name: 'Post by RSS feed',
|
||||
schedule: function(parser) {
|
||||
return parser.text('every 30 minutes');
|
||||
},
|
||||
job: function() {
|
||||
fetchFeeds();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Meteor.startup(function () {
|
||||
if (getSetting('enableFeeds', false)) {
|
||||
addJob();
|
||||
}
|
||||
});
|
||||
})
|
|
@ -199,6 +199,7 @@ input[type="search"]{
|
|||
padding-bottom: 5px;
|
||||
margin-bottom: 15px;
|
||||
border-bottom: 1px solid #B5B0B0;
|
||||
color: $light-text;
|
||||
}
|
||||
fieldset{
|
||||
margin-bottom: 30px;
|
||||
|
|
Loading…
Add table
Reference in a new issue