User: sits    
  Date: 08/01/10 13:47:52

  Modified:    lib/Codestriker/Model MetricStats.pm Metrics.pm
  Log:
  Fixed database code which was preventing user metrics from working under SQL 
Server.
  
  
  
  Index: MetricStats.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/Model/MetricStats.pm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- MetricStats.pm    18 Aug 2007 04:14:37 -0000      1.13
  +++ MetricStats.pm    10 Jan 2008 21:47:52 -0000      1.14
  @@ -134,7 +134,7 @@
       my $total_time = 
        Codestriker::Model::Metrics->calculate_topic_view_time($select_topic);
   
  -    Codestriker::DB::DBI->release_connection($dbh);
  +    Codestriker::DB::DBI->release_connection($dbh, 1);
   
       $total_time = sprintf("%1.1f",$total_time / (60*60));
   
  
  
  
  
  
  Index: Metrics.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Model/Metrics.pm,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Metrics.pm        25 Sep 2007 09:23:49 -0000      1.15
  +++ Metrics.pm        10 Jan 2008 21:47:52 -0000      1.16
  @@ -716,7 +716,7 @@
   
       my $total_time = $self->calculate_topic_view_time($select_topic);
   
  -    Codestriker::DB::DBI->release_connection($dbh);
  +    Codestriker::DB::DBI->release_connection($dbh, 1);
   
       if ($total_time == 0) {
        $total_time = "";
  @@ -838,7 +838,7 @@
            push @history_list, \%entry;
        }
   
  -     Codestriker::DB::DBI->release_connection($dbh);
  +     Codestriker::DB::DBI->release_connection($dbh, 1);
   
        $self->{topichistoryrows} = [EMAIL PROTECTED];
   
  @@ -914,11 +914,10 @@
       # Obtain a database connection.
       my $dbh = Codestriker::DB::DBI->get_connection();
   
  -    # flush out the user metrics from the topic,
  +    # Flush out the user metrics from the topic.
       my $delete_alluser_metric =
        $dbh->prepare_cached('DELETE FROM topicusermetric ' .
                             'WHERE topicid = ?');
  -
       $delete_alluser_metric->execute($self->{topicid});
   
       my $insert_user_metric =
  @@ -944,6 +943,7 @@
        }
       }
   
  +
       # Close the connection, and check for any database errors.
       Codestriker::DB::DBI->release_connection($dbh, 1);
   }
  
  
  

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits

Reply via email to