Mercurial > public > sg101
comparison gpp/forums/views.py @ 112:d1b0b86441c0
Forums: added a sync() function on the forum model. Created javascript for the moderate forum function to drive the master topic select checkbox.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 30 Sep 2009 00:42:13 +0000 |
parents | e5faf9f0c11a |
children | d97ceb95ce02 |
comparison
equal
deleted
inserted
replaced
111:e5faf9f0c11a | 112:d1b0b86441c0 |
---|---|
556 def _move_topic(topic, old_forum, new_forum): | 556 def _move_topic(topic, old_forum, new_forum): |
557 if new_forum != old_forum: | 557 if new_forum != old_forum: |
558 topic.forum = new_forum | 558 topic.forum = new_forum |
559 topic.save() | 559 topic.save() |
560 # Have to adjust foreign keys to last_post, denormalized counts, etc.: | 560 # Have to adjust foreign keys to last_post, denormalized counts, etc.: |
561 old_forum.topic_count_update() | 561 old_forum.sync() |
562 old_forum.post_count_update() | |
563 old_forum.save() | 562 old_forum.save() |
564 new_forum.topic_count_update() | 563 new_forum.sync() |
565 new_forum.post_count_update() | |
566 new_forum.save() | 564 new_forum.save() |
567 | 565 |
568 | 566 |
569 def _bulk_sticky(forum, topic_ids): | 567 def _bulk_sticky(forum, topic_ids): |
570 """ | 568 """ |