Thread: [Codestriker-commits] CVS update: codestriker/lib Codestriker.pm
                
                Brought to you by:
                
                    sits
                    
                
            
            
        
        
        
    | 
      
      
      From: <si...@us...> - 2005-05-23 07:45:55
       | 
| Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=3722995&action=view User: sits Date: 05/05/23 00:45:36 Modified: lib Codestriker.pm Log: Fixed up backwards compatibility for detecting readonly topics Index: Codestriker.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- Codestriker.pm 22 May 2005 22:26:03 -0000 1.72 +++ Codestriker.pm 23 May 2005 07:45:33 -0000 1.73 @@ -471,7 +471,7 @@ return (grep /^$topic_state$/, @Codestriker::readonly_states); } else { # Backwards compatibility for older configs. - return $topic_state > 0; + return $topic_state ne "Open"; } } | 
| 
      
      
      From: <si...@us...> - 2005-05-24 08:36:03
       | 
|   User: sits    
  Date: 05/05/24 01:35:54
  Modified:    lib      Codestriker.pm
  Log:
  Fix for older configs corrected for detection of readonly states
  
  
  
  Index: Codestriker.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- Codestriker.pm	23 May 2005 07:45:33 -0000	1.73
  +++ Codestriker.pm	24 May 2005 08:35:53 -0000	1.74
  @@ -471,7 +471,7 @@
   	return (grep /^$topic_state$/, @Codestriker::readonly_states);
       } else {
   	# Backwards compatibility for older configs.
  -	return $topic_state ne "Open";
  +        return $topic_state eq "Open" ? 0 : 1;
       }
   }
   
  
  
  
 | 
| 
      
      
      From: <si...@us...> - 2006-05-28 23:49:23
       | 
|   User: sits    
  Date: 06/05/28 16:46:20
  Modified:    .        CHANGELOG
               lib      Codestriker.pm
  Log:
  Update CHANGELOG indicating UTF-8 processing
  
  
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
  retrieving revision 1.186
  retrieving revision 1.187
  diff -u -r1.186 -r1.187
  --- CHANGELOG	26 May 2006 04:55:25 -0000	1.186
  +++ CHANGELOG	28 May 2006 23:46:20 -0000	1.187
  @@ -3,6 +3,12 @@
   
   Version 1.9.2
   
  +* Codestriker now works with UTF-8 text, to support unicode character
  +  input for topic titles, descriptions, comment text, and project
  +  names and descriptions.  This required making Perl 5.8 as a
  +  pre-requisite, as Perl 5.6 doesn't cut the mustard for unicode
  +  processing.
  +
   * Created a new optional configuration parameter $repository_name_map
     in codestriker.conf.  This allows for a user-defined repository name
     to be displayed in the codestriker UI, rather than the full
  
  
  
  
  
  Index: Codestriker.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- Codestriker.pm	26 May 2006 05:42:48 -0000	1.86
  +++ Codestriker.pm	28 May 2006 23:46:20 -0000	1.87
  @@ -28,7 +28,7 @@
   	      );
   
   # Version of Codestriker.
  -$Codestriker::VERSION = "1.9.2-unicode-unstable";
  +$Codestriker::VERSION = "1.9.2-alpha-6";
   
   # Default title to display on each Codestriker screen.
   $Codestriker::title = "Codestriker $Codestriker::VERSION";
  
  
  
 | 
| 
      
      
      From: <si...@us...> - 2006-05-29 23:22:38
       | 
|   User: sits    
  Date: 06/05/29 16:19:36
  Modified:    lib      Codestriker.pm
  Log:
  Fixed whoops for project support
  
  
  
  Index: Codestriker.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- Codestriker.pm	28 May 2006 23:46:20 -0000	1.87
  +++ Codestriker.pm	29 May 2006 23:19:36 -0000	1.88
  @@ -473,7 +473,7 @@
   
   # Return true if project support has been enabled.
   sub projects_disabled {
  -    if (defined $Codestriker::project_states) {
  +    if (defined @Codestriker::project_states) {
   	return $#Codestriker::project_states == -1;
       } elsif (defined $Codestriker::allow_projects) {
   	# Support for older codestriker.conf files.
  
  
  
 | 
| 
      
      
      From: <si...@us...> - 2007-07-03 10:00:26
       | 
|   User: sits    
  Date: 07/07/03 03:00:24
  Modified:    lib      Codestriker.pm
  Log:
  Workaround for retrieving the stderr information when executing processes
  when running under mod_perl.  All looking good now, even if it is a dirty
  hack.
  
  
  
  Index: Codestriker.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- Codestriker.pm	3 Jul 2007 06:29:37 -0000	1.99
  +++ Codestriker.pm	3 Jul 2007 10:00:24 -0000	1.100
  @@ -14,6 +14,9 @@
   
   use Time::Local;
   use IPC::Open3;
  +use File::Temp qw/ tempdir /;
  +use File::Path;
  +use Fatal qw / open close waitpid /;
   
   # Export codestriker.conf configuration variables.
   use vars qw ( $mailhost $mailuser $mailpasswd $use_compression
  @@ -535,33 +538,50 @@
       # is not defined.
       $stderr_fh = \*STDERR unless defined $stderr_fh;
   
  -    if (exists $ENV{'MOD_PERL'}) {
  -	# The open3() call simply doesn't work under mod_perl/apache2,
  -	# so we need to use open() instead, which is a pain since we lose
  -	# error information.
  -	my $command_line = "\"$command\"";
  -	foreach my $arg (@args) {
  -	    $command_line .= " \"$arg\"";
  -	}
  -	my $received_data = 0;
  -	if (open(COMMAND, "$command_line |")) {
  -	    while (<COMMAND>) {
  +    my $command_tmpdir;
  +    eval {
  +	if (exists $ENV{'MOD_PERL'}) {
  +	    # The open3() call doesn't work under mod_perl/apache2,
  +	    # so create a command which stores the stdout and stderr
  +	    # into temporary files.
  +	    if (defined $Codestriker::tmpdir && $Codestriker::tmpdir ne "") {
  +		$command_tmpdir = tempdir(DIR => $Codestriker::tmpdir);
  +	    } else {
  +		$command_tmpdir = tempdir();
  +	    }
  +
  +	    # Build up the command string with naive quoting.
  +	    my $command_line = "\"$command\"";
  +	    foreach my $arg (@args) {
  +		$command_line .= " \"$arg\"";
  +	    }
  +
  +	    my $stdout_filename = "$command_tmpdir/stdout.txt";
  +	    my $stderr_filename = "$command_tmpdir/stderr.txt";
  +
  +	    # Thankfully this works under Windows.
  +	    my $system_line = "$command_line > \"$stdout_filename\" 2> \"$stderr_filename\"";
  +	    system($system_line) == 0 || croak "Failed to execute $system_line: $!\n";
  +
  +	    open(TMP_STDOUT, $stdout_filename);
  +	    binmode TMP_STDOUT;
  +	    while (<TMP_STDOUT>) {
   		print $stdout_fh $_;
  -		$received_data = 1;
   	    }
  -	}
  -	if (!$received_data) {
  -	    print $stderr_fh "Command failed: $!\n";
  -	    print $stderr_fh "$command_line\n";
  -	    print $stderr_fh "Check your webserver error log for more information.\n";
  -	}
  -    } else {
  -	my $write_stdin_fh = new FileHandle;
  -	my $read_stdout_fh = new FileHandle;
  -	my $read_stderr_fh = new FileHandle;
  +	    binmode TMP_STDERR;
  +
  +	    open(TMP_STDERR, $stderr_filename);
  +	    while (<TMP_STDERR>) {
  +		print $stderr_fh $_;
  +	    }
  +
  +	    close TMP_STDOUT;
  +	    close TMP_STDERR;
  +	} else {
  +	    my $write_stdin_fh = new FileHandle;
  +	    my $read_stdout_fh = new FileHandle;
  +	    my $read_stderr_fh = new FileHandle;
   
  -	# Open3 throws an exception on failure.
  -	eval {
   	    my $pid = open3($write_stdin_fh, $read_stdout_fh, $read_stderr_fh,
   			    $command, @args);
   
  @@ -578,12 +598,20 @@
   	    
   	    # Wait for the process to terminate.
   	    waitpid($pid, 0);
  -	};
  -	if ($@) {
  -	    print $stderr_fh "Command failed: $@\n";
  -	    print $stderr_fh "$command " . join(' ', @args) . "\n";
  -	    print $stderr_fh "Check your webserver error log for more information.\n";
   	}
  +    };
  +    if ($@) {
  +	my $error_string = "Command failed: $@\n";
  +	$error_string .= "$command " . join(' ', @args) . "\n";
  +	$error_string .= "Check your webserver error log for more information.\n";
  +	print $stderr_fh $error_string;
  +	print STDERR $error_string;
  +	flush STDERR;
  +    }
  +
  +    # Make sure the temporary directory is removed if it was created.
  +    if (defined $command_tmpdir) {
  +	rmtree($command_tmpdir);
       }
   
       # Flush the output file handles.
  
  
  
 | 
| 
      
      
      From: <si...@us...> - 2007-07-12 10:02:08
       | 
| User: sits Date: 07/07/12 03:02:00 Modified: lib Codestriker.pm Log: Bump version number to next release Index: Codestriker.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v retrieving revision 1.101 retrieving revision 1.102 diff -u -r1.101 -r1.102 --- Codestriker.pm 12 Jul 2007 09:49:02 -0000 1.101 +++ Codestriker.pm 12 Jul 2007 10:01:59 -0000 1.102 @@ -35,7 +35,7 @@ ); # Version of Codestriker. -$Codestriker::VERSION = "1.9.3"; +$Codestriker::VERSION = "1.9.4"; # Default title to display on each Codestriker screen. $Codestriker::title = "Codestriker $Codestriker::VERSION"; | 
| 
      
      
      From: <si...@us...> - 2007-10-02 04:38:22
       | 
| User: sits Date: 07/10/01 21:38:21 Modified: lib Codestriker.pm Log: Bump version to 1.9.4 Index: Codestriker.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v retrieving revision 1.104 retrieving revision 1.105 diff -u -r1.104 -r1.105 --- Codestriker.pm 24 Sep 2007 22:45:16 -0000 1.104 +++ Codestriker.pm 2 Oct 2007 04:38:21 -0000 1.105 @@ -36,7 +36,7 @@ ); # Version of Codestriker. -$Codestriker::VERSION = "1.9.4-rc2"; +$Codestriker::VERSION = "1.9.4"; # Default title to display on each Codestriker screen. $Codestriker::title = "Codestriker $Codestriker::VERSION"; | 
| 
      
      
      From: <si...@us...> - 2008-06-19 03:37:56
       | 
|   User: sits    
  Date: 08/06/18 20:37:55
  Modified:    lib      Codestriker.pm
  Log:
  More dead-core removal.
  
  
  
  Index: Codestriker.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- Codestriker.pm	14 Mar 2008 01:30:52 -0000	1.107
  +++ Codestriker.pm	19 Jun 2008 03:37:55 -0000	1.108
  @@ -26,7 +26,7 @@
   	      $file_reviewer $db $dbuser $dbpasswd $codestriker_css
   	      $NORMAL_MODE $COLOURED_MODE $COLOURED_MONO_MODE $topic_states
   	      $bug_db $bug_db_host $bug_db_name $bug_db_password $bug_db_user
  -	      $lxr_map $email_send_options $default_topic_br_mode
  +	      $lxr_map $email_send_options
   	      $allow_delete $allow_searchlist $default_file_to_view
                 $allow_projects $antispam_email $VERSION $title $BASEDIR
   	      $metric_config $tmpdir @metric_schema $comment_state_metrics
  
  
  
 | 
| 
      
      
      From: <si...@us...> - 2008-08-08 06:53:16
       | 
| User: sits Date: 08/08/07 23:53:07 Modified: lib Codestriker.pm Log: Version bump Index: Codestriker.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v retrieving revision 1.108 retrieving revision 1.109 diff -u -r1.108 -r1.109 --- Codestriker.pm 19 Jun 2008 03:37:55 -0000 1.108 +++ Codestriker.pm 8 Aug 2008 06:53:07 -0000 1.109 @@ -36,7 +36,7 @@ ); # Version of Codestriker. -$Codestriker::VERSION = "1.9.5"; +$Codestriker::VERSION = "1.9.6"; # Default title to display on each Codestriker screen. $Codestriker::title = "Codestriker $Codestriker::VERSION"; | 
| 
      
      
      From: <si...@us...> - 2008-08-29 10:49:07
       | 
|   User: sits    
  Date: 08/08/29 03:49:04
  Modified:    lib/Codestriker/Http/Method StaticResourcesMethod.pm
                        AddProjectMethod.pm UpdateTopicStateMethod.pm
                        CreateTopicMethod.pm ViewTopicTextMethod.pm
                        SearchTopicsMethod.pm SubmitSearchTopicsMethod.pm
                        DownloadMetricsMethod.pm AddCommentMethod.pm
                        ViewMetricsMethod.pm CreateProjectMethod.pm
                        ViewTopicPropertiesMethod.pm
                        ViewTopicCommentsMethod.pm
                        DownloadTopicTextMethod.pm AddTopicMethod.pm
                        ListProjectsMethod.pm EditProjectMethod.pm
                        ViewTopicMetricsMethod.pm CreateCommentMethod.pm
                        UpdateTopicPropertiesMethod.pm
                        UpdateProjectMethod.pm ViewTopicFileMethod.pm
                        ListTopicsMethod.pm
               lib/Codestriker/Action SubmitEditTopicMetrics.pm
                        ViewTopicInfo.pm ViewTopicProperties.pm
                        CreateTopic.pm EditComment.pm
                        SubmitEditTopicProperties.pm
               template/en/default editcomment.html.tmpl
                        createtopic.html.tmpl viewtopicinfo.html.tmpl
                        viewtopicproperties.html.tmpl
               html     codestriker.js
               .        codestriker.conf
               lib/Codestriker/Http Dispatcher.pm UrlBuilder.pm Method.pm
                        Response.pm
               lib      Codestriker.pm
  Added:       lib/Codestriker/Http/Method UpdateTopicMetricsMethod.pm
               t/Http/Method update-topic-metrics.t
  Log:
  More work on the nice URL - can now add comments.
  
  
  
  Index: StaticResourcesMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/StaticResourcesMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StaticResourcesMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ StaticResourcesMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -35,7 +35,7 @@
       if ($self->{cgi_style}) {
           return $htmlurl;
       } else {
  -    	return $self->{url_prefix} . "/static";
  +    	return $self->{url_prefix} . "/html";
       }
   }
   
  
  
  
  
  
  Index: AddProjectMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/AddProjectMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AddProjectMethod.pm	26 Aug 2008 22:18:51 -0000	1.1
  +++ AddProjectMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -33,7 +33,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "submit_project") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/admin/projects/add}) {
  +	} elsif ($path_info =~ m{^/admin/projects/add}) {
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: UpdateTopicStateMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/UpdateTopicStateMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UpdateTopicStateMethod.pm	18 Aug 2008 22:11:05 -0000	1.1
  +++ UpdateTopicStateMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -35,7 +35,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "change_topics_state") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/update}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/update}) {
   	    $self->_extract_nice_parameters($http_input,
   	                                    project => 'projectid');
   		return 1;
  
  
  
  
  
  Index: CreateTopicMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/CreateTopicMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CreateTopicMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ CreateTopicMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -32,10 +32,11 @@
   	
   	my $action = $http_input->{query}->param('action'); 
       my $path_info = $http_input->{query}->path_info();
  +    print STDERR "Check path: $path_info\n";
       if ($self->{cgi_style} && defined $action && $action eq "create") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/topics/create/}) {
  +	} elsif ($path_info =~ m{^/topics/create}) {
   	    $self->_extract_nice_parameters($http_input,
   	                                    obsoletes => 'obsoletes');
   		return 1;
  
  
  
  
  
  Index: ViewTopicTextMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/ViewTopicTextMethod.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ViewTopicTextMethod.pm	20 Aug 2008 00:43:33 -0000	1.3
  +++ ViewTopicTextMethod.pm	29 Aug 2008 10:48:57 -0000	1.4
  @@ -32,7 +32,7 @@
       } else {
      	    confess "Parameter projectid missing" unless defined $args{projectid};
       	return $self->{url_prefix} . "/project/$args{projectid}/topic/$args{topicid}/text" .
  -    	       (defined $args{fview} ? "/filenumber/$args{filenumber}" : "") .
  +    	       (defined $args{fview} ? "/filenumber/$args{fview}" : "") .
       	       (defined $args{mode} ? "/mode/$args{mode}" : "") .
   			   (defined $args{filenumber} ? "#" . "$args{filenumber}|$args{line}|$args{new}" : "");
       }    
  @@ -46,9 +46,9 @@
       if ($self->{cgi_style} && defined $action && $action eq "view") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/\d+/text}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/text}) {
   	    $self->_extract_nice_parameters($http_input,
  -	                                    project => 'projectid', topic => 'topicid',
  +	                                    project => 'projectid', topic => 'topic',
   	                                    filenumber => 'fview', mode => 'mode');
   		return 1;
   	} else {
  
  
  
  
  
  Index: SearchTopicsMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/SearchTopicsMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SearchTopicsMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ SearchTopicsMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -33,7 +33,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "search") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/topics/search/}) {
  +	} elsif ($path_info =~ m{^/topics/search/}) {
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: SubmitSearchTopicsMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/SubmitSearchTopicsMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SubmitSearchTopicsMethod.pm	15 Aug 2008 06:10:41 -0000	1.1
  +++ SubmitSearchTopicsMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -33,7 +33,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "submit_search") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/topics/submitsearch/}) {
  +	} elsif ($path_info =~ m{^/topics/submitsearch/}) {
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: DownloadMetricsMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/DownloadMetricsMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DownloadMetricsMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ DownloadMetricsMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -33,7 +33,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "metrics_download") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/metrics/download$}) {
  +	} elsif ($path_info =~ m{^/metrics/download$}) {
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: AddCommentMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/AddCommentMethod.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AddCommentMethod.pm	18 Aug 2008 11:11:29 -0000	1.2
  +++ AddCommentMethod.pm	29 Aug 2008 10:48:57 -0000	1.3
  @@ -5,7 +5,7 @@
   # This program is free software; you can redistribute it and modify it under
   # the terms of the GPL.
   
  -# Method for submitting a searching topic form.
  +# Method for submitting a new comment.
   
   package Codestriker::Http::Method::AddCommentMethod;
   
  @@ -24,8 +24,8 @@
   	    die "Parameter topicid missing" unless defined $args{topicid};
      		die "Parameter projectid missing" unless defined $args{projectid};
   
  -    	return $self->{url_prefix} . "/project/$args{projectid}/topic/$args{topicid}/comment/" .
  -    	       "$args{filenumber}|$args{line}|$args{new}/add";
  +    	return $self->{url_prefix} . "/project/$args{projectid}/topic/$args{topicid}/comment" .
  +    	       (defined $args{filenumber} && $args{filenumber} ne "" ? "/$args{filenumber}|$args{line}|$args{new}/add" : "");
       }
   }
   
  @@ -37,13 +37,13 @@
       if ($self->{cgi_style} && defined $action && $action eq "submit_comment") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/\d+/comment/(\d+)\|(\d+)\|(\d+)/add}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/comment/(\d+)\|(\d+)\|(\d+)/add}) {
  +	    $self->_extract_nice_parameters($http_input,
  +	                                    project => 'projectid', topic => 'topic',
  +	                                    anchor => 'anchor', context => 'context');
   		$http_input->{fn} = $1;
   		$http_input->{line} = $2;
   		$http_input->{new} = $3;
  -	    $self->_extract_nice_parameters($http_input,
  -	                                    project => 'projectid', topic => 'topicid',
  -	                                    anchor => 'anchor', context => 'context');
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: ViewMetricsMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/ViewMetricsMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ViewMetricsMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ ViewMetricsMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -33,7 +33,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "metrics_report") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/metrics/view$}) {
  +	} elsif ($path_info =~ m{^/metrics/view$}) {
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: CreateProjectMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/CreateProjectMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CreateProjectMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ CreateProjectMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -33,7 +33,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "create_project") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/admin/projects/create$}) {
  +	} elsif ($path_info =~ m{^/admin/projects/create$}) {
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: ViewTopicPropertiesMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/ViewTopicPropertiesMethod.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ViewTopicPropertiesMethod.pm	18 Aug 2008 11:19:59 -0000	1.2
  +++ ViewTopicPropertiesMethod.pm	29 Aug 2008 10:48:57 -0000	1.3
  @@ -36,9 +36,9 @@
       if ($self->{cgi_style} && defined $action && $action eq "view_topic_properties") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/\d+/properties/view}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/properties/view}) {
   	    $self->_extract_nice_parameters($http_input,
  -	                                    project => 'projectid', topic => 'topicid');
  +	                                    project => 'projectid', topic => 'topic');
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: ViewTopicCommentsMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/ViewTopicCommentsMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ViewTopicCommentsMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ ViewTopicCommentsMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -36,9 +36,9 @@
       if ($self->{cgi_style} && defined $action && $action eq "list_comments") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/\d+/comments}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/comments}) {
   	    $self->_extract_nice_parameters($http_input,
  -	                                    project => 'projectid', topic => 'topicid');
  +	                                    project => 'projectid', topic => 'topic');
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: DownloadTopicTextMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/DownloadTopicTextMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DownloadTopicTextMethod.pm	26 Aug 2008 22:18:51 -0000	1.1
  +++ DownloadTopicTextMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -38,7 +38,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "download") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/\d+/download}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/download}) {
   	    $self->_extract_nice_parameters($http_input,
   	                                    project => 'projectid', topic => 'topicid');
   		return 1;
  
  
  
  
  
  Index: AddTopicMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/AddTopicMethod.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AddTopicMethod.pm	17 Aug 2008 22:25:37 -0000	1.2
  +++ AddTopicMethod.pm	29 Aug 2008 10:48:57 -0000	1.3
  @@ -35,7 +35,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "submit_new_topic") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topics/add}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topics/add}) {
   	    $self->_extract_nice_parameters($http_input,
   	                                    project => 'projectid');
   		return 1;
  
  
  
  
  
  Index: ListProjectsMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/ListProjectsMethod.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ListProjectsMethod.pm	26 Aug 2008 22:18:51 -0000	1.2
  +++ ListProjectsMethod.pm	29 Aug 2008 10:48:57 -0000	1.3
  @@ -33,7 +33,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "list_projects") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/admin/projects/list$}) {
  +	} elsif ($path_info =~ m{^/admin/projects/list$}) {
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: EditProjectMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/EditProjectMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EditProjectMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ EditProjectMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -33,7 +33,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "edit_project") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/admin/project/\d+/edit$}) {
  +	} elsif ($path_info =~ m{^/admin/project/\d+/edit$}) {
   	    $self->_extract_nice_parameters($http_input,
   	                                    project => 'projectid');
   		return 1;
  
  
  
  
  
  Index: ViewTopicMetricsMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/ViewTopicMetricsMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ViewTopicMetricsMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ ViewTopicMetricsMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -36,9 +36,9 @@
       if ($self->{cgi_style} && defined $action && $action eq "viewinfo") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/\d+/metrics}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/metrics}) {
   	    $self->_extract_nice_parameters($http_input,
  -	                                    project => 'projectid', topic => 'topicid');
  +	                                    project => 'projectid', topic => 'topic');
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: CreateCommentMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/CreateCommentMethod.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CreateCommentMethod.pm	20 Aug 2008 00:43:33 -0000	1.2
  +++ CreateCommentMethod.pm	29 Aug 2008 10:48:57 -0000	1.3
  @@ -22,14 +22,15 @@
       confess "Parameter topicid missing" unless defined $args{topicid};
   
       if ($self->{cgi_style}) {
  -	    return $self->{url_prefix} . "?action=edit&fn=$args{filenumber}&line=$args{line}&new=$args{new}&topic=$args{topicid}" .
  +	    return $self->{url_prefix} . "?action=edit&topic=$args{topicid}" .
  +	    (defined $args{filenumber} && $args{filenumber} ne "" . "&fn=$args{filenumber}&line=$args{line}&new=$args{new}") .
   		(defined $args{anchor} ? "&a=$args{anchor}" : "") .
   		(defined $args{context} ? "&context=$args{context}" : "");
       } else {
      	    confess "Parameter projectid missing" unless defined $args{projectid};
       	return $self->{url_prefix} . "/project/$args{projectid}/topic/$args{topicid}/comment/" .
  -    	       "$args{filenumber}|$args{line}|$args{new}/create" .
  -		       (defined $args{anchor} ? "/anchor/$args{anchor}" : "") .
  +    	       (defined $args{filenumber} && $args{filenumber} ne "" ? "$args{filenumber}|$args{line}|$args{new}/create" : "") .
  +		       (defined $args{anchor} && $args{anchor} ne '' ? "/anchor/$args{anchor}" : "") .
   		       (defined $args{context} ? "/context/$args{context}" : "");
       }
   }
  @@ -42,13 +43,13 @@
       if ($self->{cgi_style} && defined $action && $action eq "edit") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/\d+/comment/(\d+)\|(\d+)\|(\d+)/create}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/comment/(\d+)\|(\d+)\|(\d+)/create}) {
  +	    $self->_extract_nice_parameters($http_input,
  +	                                    project => 'projectid', topic => 'topic',
  +	                                    anchor => 'anchor', context => 'context');
   		$http_input->{fn} = $1;
   		$http_input->{line} = $2;
   		$http_input->{new} = $3;
  -	    $self->_extract_nice_parameters($http_input,
  -	                                    project => 'projectid', topic => 'topicid',
  -	                                    anchor => 'anchor', context => 'context');
   		return 1;
   	} else {
   		return 0;
  
  
  
  
  
  Index: UpdateTopicPropertiesMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/UpdateTopicPropertiesMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UpdateTopicPropertiesMethod.pm	18 Aug 2008 11:19:59 -0000	1.1
  +++ UpdateTopicPropertiesMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -36,7 +36,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "edit_topic_properties") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/\d+/properties}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/properties}) {
   	    $self->_extract_nice_parameters($http_input,
   	                                    project => 'projectid', topic => 'topicid');
   		return 1;
  
  
  
  
  
  Index: UpdateProjectMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/UpdateProjectMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UpdateProjectMethod.pm	27 Aug 2008 08:43:10 -0000	1.1
  +++ UpdateProjectMethod.pm	29 Aug 2008 10:48:57 -0000	1.2
  @@ -33,7 +33,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "submit_editproject") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/admin/project/\d+/update$}) {
  +	} elsif ($path_info =~ m{^/admin/project/\d+/update$}) {
   	    $self->_extract_nice_parameters($http_input,
   	                                    project => 'projectid');
   		return 1;
  
  
  
  
  
  Index: ViewTopicFileMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/ViewTopicFileMethod.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ViewTopicFileMethod.pm	10 Aug 2008 12:18:42 -0000	1.1
  +++ ViewTopicFileMethod.pm	29 Aug 2008 10:48:58 -0000	1.2
  @@ -41,7 +41,7 @@
       if ($self->{cgi_style} && defined $action && $action eq "view_file") {  
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/project/\d+/topic/\d+/file/\d+}) {
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/file/\d+}) {
   	    $self->_extract_nice_parameters($http_input,
   	                                    project => 'projectid', topic => 'topicid',
   	                                    file => 'fn');
  
  
  
  
  
  Index: ListTopicsMethod.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Method/ListTopicsMethod.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ListTopicsMethod.pm	15 Aug 2008 06:30:39 -0000	1.3
  +++ ListTopicsMethod.pm	29 Aug 2008 10:48:58 -0000	1.4
  @@ -66,8 +66,8 @@
           ($action eq "list_topics" || $action eq "list_topics_rss")) { 
   		$http_input->extract_cgi_parameters();
   		return 1;
  -	} elsif ($path_info =~ m{^$self->{url_prefix}/feed/topics/list} ||
  -	         $path_info =~ m{^$self->{url_prefix}/topics/list}) {
  +	} elsif ($path_info =~ m{^/feed/topics/list} ||
  +	         $path_info =~ m{^/topics/list}) {
   	    $self->_extract_nice_parameters($http_input,
   	                                    author => 'sauthor', reviewer => 'sreviewer',
   	                                    cc => 'scc', bugid => 'sbugid', text => 'stext',
  
  
  
  
  
  Index: UpdateTopicMetricsMethod.pm
  ===================================================================
  RCS file: UpdateTopicMetricsMethod.pm
  diff -N UpdateTopicMetricsMethod.pm
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ UpdateTopicMetricsMethod.pm	29 Aug 2008 10:48:57 -0000	1.1
  @@ -0,0 +1,54 @@
  +###############################################################################
  +# Codestriker: Copyright (c) 2001, 2002 David Sitsky.  All rights reserved.
  +# si...@us...
  +#
  +# This program is free software; you can redistribute it and modify it under
  +# the terms of the GPL.
  +
  +# Method for updating the topic metrics.
  +
  +package Codestriker::Http::Method::UpdateTopicMetricsMethod;
  +
  +use strict;
  +use Carp;
  +use Codestriker::Http::Method;
  +
  +@Codestriker::Http::Method::UpdateTopicMetricsMethod::ISA = ("Codestriker::Http::Method");
  +
  +# Generate a URL for this method.
  +sub url() {
  +	my ($self, %args) = @_;
  +	
  +	if ($self->{cgi_style}) {
  +        return $self->{url_prefix} . "?action=edit_topic_metrics&topic=$args{topicid}";
  +	} else {
  +        confess "Parameter topicid missing" unless defined $args{topicid};
  +   	    confess "Parameter projectid missing" unless defined $args{projectid};
  +		return $self->{url_prefix} . "/project/$args{projectid}/topic/$args{topicid}/metrics/update";
  +	}
  +}
  +
  +sub extract_parameters {
  +	my ($self, $http_input) = @_;
  +	
  +	my $action = $http_input->{query}->param('action'); 
  +    my $path_info = $http_input->{query}->path_info();
  +    if ($self->{cgi_style} && defined $action && $action eq "edit_topic_metrics") {  
  +		$http_input->extract_cgi_parameters();
  +		return 1;
  +	} elsif ($path_info =~ m{^/project/\d+/topic/\d+/properties}) {
  +	    $self->_extract_nice_parameters($http_input,
  +	                                    project => 'projectid', topic => 'topicid');
  +		return 1;
  +	} else {
  +		return 0;
  +	}
  +}
  +
  +sub execute {
  +	my ($self, $http_input, $http_output) = @_;
  +	
  +	Codestriker::Action::SubmitEditTopicMetrics->process($http_input, $http_output);
  +}
  +
  +1;
  
  
  
  
  
  Index: SubmitEditTopicMetrics.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/SubmitEditTopicMetrics.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SubmitEditTopicMetrics.pm	29 Jun 2004 02:51:41 -0000	1.3
  +++ SubmitEditTopicMetrics.pm	29 Aug 2008 10:48:59 -0000	1.4
  @@ -5,7 +5,7 @@
   # This program is free software; you can redistribute it and modify it under
   # the terms of the GPL.
   
  -# Action object for handling the submission of changing the properties of a
  +# Action object for handling the submission of changing the metrics of a
   # topic.
   
   package Codestriker::Action::SubmitEditTopicMetrics;
  
  
  
  
  
  Index: ViewTopicInfo.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/ViewTopicInfo.pm,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ViewTopicInfo.pm	15 Aug 2008 06:10:42 -0000	1.16
  +++ ViewTopicInfo.pm	29 Aug 2008 10:48:59 -0000	1.17
  @@ -130,6 +130,8 @@
       $vars->{'view_comments_url'} = $url_builder->view_comments_url(topicid => $topicid,
                                                                      projectid => $topic->{project_id});
       $vars->{'list_projects_url'} = $url_builder->list_projects_url();
  +    $vars->{'action_url'} = $url_builder->update_topicinfo_url(topicid => $topicid,
  +                                                               projectid => $topic->{project_id});
   
       # Display the "update" message if the topic state has been changed.
       $vars->{'updated'} = $http_input->get('updated');
  
  
  
  
  
  Index: ViewTopicProperties.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/ViewTopicProperties.pm,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ViewTopicProperties.pm	15 Aug 2008 06:10:41 -0000	1.19
  +++ ViewTopicProperties.pm	29 Aug 2008 10:48:59 -0000	1.20
  @@ -60,6 +60,8 @@
   
       # Obtain a new URL builder object.
       my $url_builder = Codestriker::Http::UrlBuilder->new($query);
  +    $vars->{'action_url'} = $url_builder->update_topic_properties_url(topicid => $topicid,
  +                                                                      projectid => $topic->{project_id});
   
       Codestriker::Action::ViewTopic::ProcessTopicHeader($vars, $topic,
   						       $url_builder);
  
  
  
  
  
  Index: CreateTopic.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/CreateTopic.pm,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- CreateTopic.pm	19 Aug 2008 10:50:17 -0000	1.33
  +++ CreateTopic.pm	29 Aug 2008 10:48:59 -0000	1.34
  @@ -43,7 +43,7 @@
       $vars->{'search_url'} = $url_builder->search_url();
       
       # TODO: fix this once create topic is only done within context of a project.
  -   ...
 
[truncated message content] |