mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
clean up dead code, remove package-tap.i18n
This commit is contained in:
parent
4646e1041a
commit
9fb82628d2
14 changed files with 2 additions and 117 deletions
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
|
@ -131,35 +131,6 @@ Telescope.utils.getOutgoingUrl = function (url) {
|
|||
return Telescope.utils.getSiteUrl() + "out?url=" + encodeURIComponent(url);
|
||||
};
|
||||
|
||||
// This function should only ever really be necessary server side
|
||||
// Client side using .path() is a better option since it's relative
|
||||
// and shouldn't care about the siteUrl.
|
||||
Telescope.utils.getRouteUrl = function (routeName, params, options) {
|
||||
options = options || {};
|
||||
var route = FlowRouter.path(
|
||||
routeName,
|
||||
params || {},
|
||||
options
|
||||
);
|
||||
return route;
|
||||
};
|
||||
|
||||
Telescope.utils.getSignupUrl = function() {
|
||||
return this.getRouteUrl('signUp');
|
||||
};
|
||||
Telescope.utils.getSigninUrl = function() {
|
||||
return this.getRouteUrl('signIn');
|
||||
};
|
||||
|
||||
//TODO: fix this
|
||||
Telescope.utils.getPostCommentUrl = function(postId, commentId) {
|
||||
// get link to a comment on a post page
|
||||
return this.getRouteUrl('post_page_comment', {
|
||||
_id: postId,
|
||||
commentId: commentId
|
||||
});
|
||||
};
|
||||
|
||||
Telescope.utils.slugify = function (s) {
|
||||
var slug = getSlug(s, {
|
||||
truncate: 60
|
||||
|
@ -174,8 +145,8 @@ Telescope.utils.slugify = function (s) {
|
|||
};
|
||||
|
||||
Telescope.utils.getUnusedSlug = function (collection, slug) {
|
||||
var suffix = "";
|
||||
var index = 0;
|
||||
let suffix = "";
|
||||
let index = 0;
|
||||
|
||||
// test if slug is already in use
|
||||
while (!!collection.findOne({slug: slug+suffix})) {
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
import Telescope from 'meteor/nova:lib';
|
||||
|
||||
getUnsubscribeLink = function(user){
|
||||
return Telescope.utils.getRouteUrl('unsubscribe', {hash: user.telescope.emailHash});
|
||||
};
|
||||
|
||||
Meteor.methods({
|
||||
unsubscribeUser : function(hash){
|
||||
check(hash, String);
|
||||
// TO-DO: currently, if you have somebody's email you can unsubscribe them
|
||||
// A user-specific salt should be added to the hashing method to prevent this
|
||||
var user = Meteor.users.findOne({"telescope.emailHash": hash});
|
||||
if(user){
|
||||
Meteor.users.update(user._id, {
|
||||
$set: {
|
||||
'profile.notifications.users' : 0,
|
||||
'profile.notifications.posts' : 0,
|
||||
'profile.notifications.comments' : 0,
|
||||
'profile.notifications.replies' : 0
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
|
@ -207,11 +207,6 @@ function PostsNewRequiredPropertiesCheck (post, user) {
|
|||
// generate slug
|
||||
post.slug = Telescope.utils.slugify(post.title);
|
||||
|
||||
// post is not pending and has been scheduled to be posted in the future by a moderator/admin
|
||||
if (post.status !== Posts.config.STATUS_PENDING && post.postedAt && post.postedAt > post.createdAt) {
|
||||
post.status = Posts.config.STATUS_SCHEDULED;
|
||||
}
|
||||
|
||||
// if post is approved but doesn't have a postedAt date, give it a default date
|
||||
// note: pending posts get their postedAt date only once theyre approved
|
||||
if (Posts.isApproved(post) && !post.postedAt) {
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"translation_function_name": "__",
|
||||
"helper_name": "_",
|
||||
"namespace": "project"
|
||||
}
|
Loading…
Add table
Reference in a new issue