dougm       02/05/24 10:37:08

  Modified:    lib/Apache compat.pm
               t/response/TestApache compat2.pm
               xs/maps  apache_functions.map
  Log:
  rename ht_time to format_time for the moment to provide 1.x ht_time
  compat since we now require a pool
  
  Revision  Changes    Path
  1.52      +12 -0     modperl-2.0/lib/Apache/compat.pm
  
  Index: compat.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- compat.pm 24 May 2002 17:19:09 -0000      1.51
  +++ compat.pm 24 May 2002 17:37:08 -0000      1.52
  @@ -440,6 +440,18 @@
       $html;
   }
   
  +sub ht_time {
  +    my($t, $fmt, $gmt) = @_;
  +
  +    $t   ||= time;
  +    $fmt ||= '%a, %d %b %Y %H:%M:%S %Z';
  +    $gmt = 1 unless @_ == 3;
  +
  +    my $r = Apache::compat::request('Apache::Util::ht_time');
  +
  +    return Apache::Util::format_time($t, $fmt, $gmt, $r->pool);
  +}
  +
   sub Apache::URI::parse {
       my($class, $r, $uri) = @_;
   
  
  
  
  1.10      +6 -1      modperl-2.0/t/response/TestApache/compat2.pm
  
  Index: compat2.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- compat2.pm        24 May 2002 17:19:09 -0000      1.9
  +++ compat2.pm        24 May 2002 17:37:08 -0000      1.10
  @@ -24,7 +24,7 @@
   sub handler {
       my $r = shift;
   
  -    plan $r, tests => 42;
  +    plan $r, tests => 43;
   
       $r->send_http_header('text/plain');
   
  @@ -215,6 +215,11 @@
   
       ok t_cmp($esc_html, Apache::Util::escape_html($html),
                "Apache::Util::escape_html");
  +
  +
  +    my $fmtdate = Apache::Util::ht_time();
  +
  +    ok t_cmp($fmtdate, $fmtdate, "Apache::Util::ht_time");
   
       OK;
   }
  
  
  
  1.55      +1 -1      modperl-2.0/xs/maps/apache_functions.map
  
  Index: apache_functions.map
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/xs/maps/apache_functions.map,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- apache_functions.map      24 May 2002 17:19:09 -0000      1.54
  +++ apache_functions.map      24 May 2002 17:37:08 -0000      1.55
  @@ -276,7 +276,7 @@
   -ap_set_deprecated
   
   MODULE=Apache::Util 
  - ap_ht_time
  + ap_ht_time | | t, fmt, gmt, p | format_time
   !ap_rfc1413
   !ap_escape_html | | s, p
    #escape_uri
  
  
  


Reply via email to