Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
03bae0d
Moderators can now move comment threads between posts.
LucasSloan Jul 23, 2013
a95fa1a
Children of original movers now hidden for non-admins.
LucasSloan Jul 23, 2013
c7fc246
Made it impossible to vote on moved items.
LucasSloan Jul 23, 2013
2739bef
Status message removed in the event of failed call.
LucasSloan Jul 23, 2013
eefd50e
Entering an properly formatted URL that doesn't lead to a post sends …
LucasSloan Jul 23, 2013
f3721e5
Changed movebox doc string, renamed Link._byURL to Link._move_url.
LucasSloan Jul 24, 2013
afe23b1
Added a lock to movement.
LucasSloan Jul 24, 2013
582d9fd
Changed move proceedure to no longer create new comments. All calls …
LucasSloan Jul 27, 2013
ac9ed72
Removed debugging statements, moved boolean.
LucasSloan Jul 27, 2013
fa13a33
Safed movement against editor trying to move children of already move…
LucasSloan Jul 27, 2013
b7e7355
Merge branch 'interesting_comments' of https://github.com/PotatoDumpl…
LucasSloan Sep 21, 2013
91d0c4e
Descendant karma attribute no longer disappears off python objects.
LucasSloan Oct 1, 2013
bedd944
Merge branch 'interesting_comments' of https://github.com/PotatoDumpl…
LucasSloan Oct 1, 2013
cf10a31
Thread movement now properly increments descendant karma.
LucasSloan Oct 1, 2013
2edef55
Descendant karma attribute no longer disappears off python objects.
LucasSloan Oct 1, 2013
33a3850
Merge branch 'interesting_comments' of https://github.com/PotatoDumpl…
LucasSloan Oct 1, 2013
2124bd7
Changed testing syntax.
LucasSloan Dec 9, 2013
9bdf974
Merge branch 'postmovement' of https://github.com/PotatoDumplings/les…
LucasSloan Dec 9, 2013
ce3d6ff
Merge branch 'master' of https://github.com/tricycle/lesswrong into p…
LucasSloan Dec 9, 2013
5e5f092
Variety of small changes for readability.
LucasSloan Dec 9, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Children of original movers now hidden for non-admins.
  • Loading branch information
LucasSloan committed Jul 23, 2013
commit a95fa1aa59e908744d858a51fcfa445b95c21ebe
1 change: 1 addition & 0 deletions r2/r2/controllers/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def POST_move(self, res, thing, destination, reason):
for child in children:
child.recursive_move(destination, comment)

thing.moved = True
thing.set_body('This comment was moved by ' + c.user.name +
' to [here]({0}).\n\n'.format(comment.make_anchored_permalink(destination)) +
(reason if reason else ''))
Expand Down
14 changes: 7 additions & 7 deletions r2/r2/lib/comment_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ def delete_comment(comment):
def link_comments(link_id):
key = comments_key(link_id)
r = g.permacache.get(key)
#if r:
# return r
#else:
with g.make_lock(lock_key(link_id)):
r = load_link_comments(link_id)
g.permacache.set(key, r)
return r
if r:
return r
else:
with g.make_lock(lock_key(link_id)):
r = load_link_comments(link_id)
g.permacache.set(key, r)
return r

def load_link_comments(link_id):
q = Comment._query(Comment.c.link_id == link_id,
Expand Down
6 changes: 4 additions & 2 deletions r2/r2/models/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ def _submit(cls, title, article, author, sr, ip, tags, spam = False, date = None
# Parse and create polls in the article
l.set_article(article)

print l.url
l.set_url_cache()

# Add tags
Expand Down Expand Up @@ -874,7 +873,8 @@ class Comment(Thing, Printable):
banned_before_moderator = False,
is_html = False,
retracted = False,
show_response_to = False)
show_response_to = False,
moved = False)

def _markdown(self):
pass
Expand Down Expand Up @@ -966,8 +966,10 @@ def recursive_move(self, destination, parent):
for child in children:
child.recursive_move(destination, comment)


self.moderator_banned = not c.user_is_admin
self.banner = c.user.name
#self.moved = True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be commented out?

self._commit()
# NB: change table updated by reporting
from r2.models.report import unreport
Expand Down
2 changes: 1 addition & 1 deletion r2/r2/public/static/lesswrong.css
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ div.inline-listing a:hover {
clear: both;
margin: 10px 15px 30px 0;
}
.commentreplacement textarea, input {
.commentreplacement textarea, .commentreplacement input {
border-color: #e9e9e9;
-webkit-box-shadow: inset 1px 1px 5px #dbdbdb;
-moz-box-shadow: inset 1px 1px 5px #dbdbdb;
Expand Down
2 changes: 1 addition & 1 deletion r2/r2/templates/comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
</%def>

<%def name="Child()">
${parent.Child(not thing.collapsed)}
${parent.Child(not (thing.collapsed or ((not c.user_is_admin) and thing.moved)), not ((not c.user_is_admin) and thing.moved))}
</%def>

<%def name="commentBody()">
Expand Down