Changeset 311


Ignore:
Timestamp:
Dec 29, 2003, 3:51:30 PM (18 years ago)
Author:
kake
Message:

Tweaks to stop tests warning on 5.8.2

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides/CGI.pm

    r310 r311  
    7474        unless UNIVERSAL::isa( $config, "Config::Tiny" );
    7575    my $cookie_name = $class->_get_cookie_name( config => $config );
     76    # Supply 'default' values to stop CGI::Cookie complaining about
     77    # uninitialised values.  *Real* default should be applied before
     78    # calling this method.
    7679    my $cookie = CGI::Cookie->new(
    7780        -name  => $cookie_name,
    78         -value => { user       => $args{username},
    79                     gclink     => $args{include_geocache_link},
    80                     prevab     => $args{preview_above_edit_box},
    81                     lltrad     => $args{latlong_traditional},
    82                     omithlplks => $args{omit_help_links},
    83                     rcmined    => $args{show_minor_edits_in_rc},
     81        -value => { user       => $args{username} || "",
     82                    gclink     => $args{include_geocache_link} || 0,
     83                    prevab     => $args{preview_above_edit_box} || 0,
     84                    lltrad     => $args{latlong_traditional} || 0,
     85                    omithlplks => $args{omit_help_links} || 0,
     86                    rcmined    => $args{show_minor_edits_in_rc} || 0,
    8487                  },
    8588        -expires => "+1M",
  • trunk/t/15_template.t

    r310 r311  
    128128
    129129# Test that TT vars are picked up from user cookie prefs.
    130 my $cookie = OpenGuides::CGI->make_prefs_cookie(
     130$cookie = OpenGuides::CGI->make_prefs_cookie(
    131131    config                 => $config,
    132132    omit_formatting_link   => 1,
     
    155155$config->{_}->{template_path} = cwd . "/t/templates";
    156156$config->{_}->{site_name} = "Test Site";
     157$config->{_}->{script_url} = "/";
     158$config->{_}->{script_name} = "";
    157159
    158160$output = OpenGuides::Template->output(
  • trunk/t/41_deletion.t

    r310 r311  
    1010$config->{_}->{template_path} = cwd . "/templates";
    1111$config->{_}->{site_name} = "Test Site";
     12$config->{_}->{script_url} = "/";
     13$config->{_}->{script_name} = "";
    1214
    1315# White box testing - we know that OpenGuides::Template only actually uses
  • trunk/templates/display_categories.tt

    r310 r311  
    11<!-- START CATEGORIES AND LOCALES -->
    22<div id="categories_and_locales">
    3 [% IF categories.size > 0 %]
     3[% IF categories.size AND categories.size > 0 %]
    44  <strong>Categories:</strong>
    55  [% FOREACH category = categories %]
     
    99[% END %]
    1010
    11 [% IF locales.size > 0 %]
     11[% IF locales.size AND locales.size > 0 %]
    1212  <strong>Locale:</strong>
    1313  [% FOREACH locale = locales %]
  • trunk/templates/node.tt

    r310 r311  
    6262<a href="[% cgi_url %]?[% node_param %]">View current version.</a>
    6363[% END %]
    64 [% IF version > 1 %]
     64[% IF version AND version > 1 %]
    6565<a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all
    6666versions.</a>
Note: See TracChangeset for help on using the changeset viewer.