Settings tweaks

This commit is contained in:
Sacha Greif 2012-12-22 11:06:28 +01:00
parent e3fca2e15c
commit 40a02737cf
2 changed files with 4 additions and 3 deletions

View file

@ -8,7 +8,7 @@ var Setting = FormModel.extend({
scoreUpdateInterval: '',
postInterval: '',
commentInterval: '',
maxPosts: '',
maxPostsPerDay: '',
title: '',
logoUrl: '',
logoHeight: '',
@ -22,7 +22,8 @@ var Setting = FormModel.extend({
},
init: function(options) {
this._super(Settings, options);
this._super(Settings, options);
this.overwriteTitle('scoreUpdateInterval', 'Scoring Frequency');
this.overwriteTitle('requireViewInvite', 'Require Invite to view?');
this.overwriteTitle('requirePostInvite', 'Require Invite to post?');
this.overwriteTitle('requirePostsApproval', 'Posts must be approved by admin?');

View file

@ -15,7 +15,7 @@ Meteor.methods({
var timeSinceLastPost=timeSinceLast(user, Posts);
var numberOfPostsInPast24Hours=numberOfItemsInPast24Hours(user, Posts);
var postInterval = Math.abs(parseInt(getSetting('postInterval'))) || 30;
var maxPostsPer24Hours = Math.abs(parseInt(getSetting('maxPosts'))) || 30;
var maxPostsPer24Hours = Math.abs(parseInt(getSetting('maxPostsPerDay'))) || 30;
// check that user can post
if (!user || !canPost(user))