User: sits    
  Date: 08/02/28 15:20:15

  Modified:    lib/Codestriker/Model Project.pm
  Log:
  Fix from Rob for deleting topics in a project correctly.
  
  
  
  Index: Project.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Model/Project.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Project.pm        20 Aug 2006 07:11:22 -0000      1.6
  +++ Project.pm        28 Feb 2008 23:20:15 -0000      1.7
  @@ -238,19 +238,14 @@
       } else {
        # Delete the topics in this project.
        my @sort_order;
  -     my @topic_query_results;
  -     Codestriker::Model::Topic->query("", "", "", "",
  -                                      "", $id, "",
  -                                      "", "",
  -                                      "", "", "",
  -                                      [EMAIL PROTECTED], [EMAIL PROTECTED]);
  +     my @topics = Codestriker::Model::Topic->query("", "", "", "",
  +                                                   "", $id, "",
  +                                                   "", "", "", "", "",
  +                                                   [EMAIL PROTECTED] );
        
        # Delete each of the topics for this project
  -     for (my $index = 0; $index <= $#topic_query_results; $index++) {
  -         my $topic_row = $topic_query_results[$index];
  -         my $topicid = $topic_row->{id};
  -         my $topic_delete = Codestriker::Model::Topic->new($topicid);
  -         $topic_delete->delete();
  +     foreach my $topic ( @topics ) {
  +         $topic->delete();
        }
   
        # Now delete the project.
  
  
  

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits

Reply via email to