Changeset 246:161ebb111e47


Ignore:
Timestamp:
23.02.2010 13:19:41 (2 years ago)
Author:
slav0nic <slav0nic0@…>
Branch:
default
Message:

fix bug in moderate view: global name 'topic_list' is not defined . Tnx ChehoV for report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • djangobb/djangobb_forum/views.py

    r245 r246  
    8080    topics = forum.topics.order_by('-sticky', '-updated').select_related() 
    8181    if request.user.is_superuser or request.user in forum.moderators.all(): 
     82        topic_ids = request.POST.getlist('topic_id') 
    8283        if 'move_topics' in request.POST: 
    83             topic_ids = request.POST.getlist('topic_id') 
    8484            return { 
    8585                'categories': Category.objects.all(), 
     
    8989            } 
    9090        elif 'delete_topics' in request.POST: 
    91             for topic_id in topic_list: 
     91            for topic_id in topic_ids: 
    9292                topic = get_object_or_404(Topic, pk=topic_id) 
    9393                topic.delete() 
    9494            return HttpResponseRedirect(reverse('djangobb:index')) 
    9595        elif 'open_topics' in request.POST: 
    96             for topic_id in topic_list: 
     96            for topic_id in topic_ids: 
    9797                open_close_topic(request, topic_id) 
    9898            return HttpResponseRedirect(reverse('djangobb:index')) 
    9999        elif 'close_topics' in request.POST: 
    100             for topic_id in topic_list: 
     100            for topic_id in topic_ids: 
    101101                open_close_topic(request, topic_id) 
    102102            return HttpResponseRedirect(reverse('djangobb:index')) 
Note: See TracChangeset for help on using the changeset viewer.