Commit Graph

385 Commits (7c3dc4877a34530d54a69bb284a3a5cbd2307da9)

Author SHA1 Message Date
barisusakli 655f5087d9 Merge remote-tracking branch 'origin/master' into hashtalk
barisusakli 523f245cd8 removed derp
barisusakli ae02c1a06c closes
barisusakli 3c8ca63608 fixed getCidsByPids
barisusakli 57e204df8e removed most of the debug
dont get more than 6 usernames for upvote tooltips
generatePostPaths wont check null pids
barisusakli ef329c95df fix
barisusakli 0b83657868 more trace
barisusakli 779b2a8d73 optimize queries
barisusakli 10b30e303b mongo posting fix
barisusakli 4736a68534 dont create term object on each call
Julian Lam a5423aff16 getPidIndex callback if none specified
Julian Lam baf72249b6 made uid parameter optional in getPidIndex
barisusakli 171f02101d closes , closes
barisusakli 13bdd939e3 crash fix
barisusakli 4f5c78d675 merge
barisusakli 537dea4e4b crash fix
barisusakli e751a0c0cf closes
barisusakli 7019618863 closes
barisusakli 83de5ba5a4 added topic owner uid
barisusakli b858b120da closes
barisusakli 05fdc945f3 closes
barisusakli dd9a383f46 removed unused functions
barisusakli ca90afd544
(drunk) not even done yet
barisusakli c07d9121df small optimizations
user.isOnline works with an array of uids
do not make 2 trips to db to get main post and first 10 posts
barisusakli b8279dc737 optimize getUserGroups to work with multiple user ids
barisusakli 38b6c4ce55
barisusakli d97af5020a small cleanup to postSummary
barisusakli 5a2b02e798 fix var name,
barisusakli fed8cc6d53 optimize privileges and assorted fixes.
* new methods
privileges.categories.filter
privileges.topics.filter
privileges.posts.filter

they take a list of ids and a privilege, and return the filtered list of
ids, faster than doing  async.filter and calling the db for each id.

* remove event listeners on recent page before adding
* group.exists works for both single group names and arrays
* helpers.allowedTo works for both a single cid and an array of cids
* moved filter:topic.post hook right before topic creation.
* moved filter:topic.reply hook right before topic reply.
barisusakli eeb4c9f487 optimize getPostSummaryByPids
barisusakli e8b767d0dd get recent poster uids
barisusakli 0792731873 new hook filter:topics.get
barisusakli 238d6602a2 check for valid content,
barisusakli 206acab1bf added posted data back whoops
barisusakli afb62c7484 optional timestamp to post.create
barisusakli 64d04f7aa6 closes
barisusakli 3e75a4397a fixes guest post data in topics
barisusakli d57f183f42 privileges.posts.get takes an array of pids now
barisusakli c3a9767bf6 late night optimizations
-isMemberOfSets returns true/false instead of 1/0
-when loading the posts of a topic only get the userdata for each user
once, before this commit if a topic had 10 posts from 2 different users
we were getting the user data for each user 5 times (drunk)
-getVoteStatusByPostIDs and getFavouritesByPostIDs no longer make
pids.length calls to the db, they use isMemberOfSets now
-getUserInfoForPost renamed to getUserInfoForPosts and doesnt make
uids.length calls to db, uses getMultipleUserFields instead
barisusakli bd4722665d closes
removed move button from main post, disable moving main post, fixed
moving posts.
barisusakli 9af12819e3 closes
barisusakli 4c2765a79c closes
barisusakli 3b1e373e7b group titles
barisusakli e8b89513d4 some cleanup in addUserInfoToPost
barisusakli 833aa0f738 derp
barisusakli 7610c11cd1 closes
backup database before upgrade!
upgrade script will take the first post of each topic and set the
`mainPid` property on the topic. then it will remove that pid from the
sorted sets for that topic, this was done to make alternative sorting
work.

added a new sorted set called `tid:<id>:posts:votes` that is used to
sort topic posts by vote count, the original sorted set `tid:<id>:posts`
is used to sort by oldest first or newest first.

the main post is added to the returned posts array on topic load and is
always at the top.
theme changes are minimal just a few new data properties on the posts
and the sorting dropdown.
hopefully didn't miss anything too critical.
barisusakli 55dbc5c823 closes
changed post links to "topic/<topic_id>/<topic_slug>/<post_id>"
barisusakli 1e68974f50 small refactor
barisusakli 472e6b5206 privilege cleanup
barisusakli 4234057821 first pass for
this only handles postTools privileges, topic and category will follow