Changeset 1086 for trunk/newpage.cgi

Show
Ignore:
Timestamp:
06/17/07 03:15:31 (18 months ago)
Author:
ilmari
Message:

r22807@vesla: ilmari | 2007-06-17 02:04:48 +0100
Move the common categories/locales navbar display decision into the templates (fixes #214)

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/newpage.cgi

    r1045 r1086  
    3131 
    3232sub show_form { 
    33     my %tt_vars = ( 
    34                     not_editable     => 1, 
    35                     not_deletable    => 1, 
    36                     deter_robots     => 1, 
    37                     disallowed_chars => \@badchars, 
    38                     pagename         => $pagename, 
    39                   ); 
    40     if ($config->enable_common_categories || $config->enable_common_locales) { 
    41         $tt_vars{common_catloc} = 1; 
    42         $tt_vars{common_categories} = $config->enable_common_categories; 
    43         $tt_vars{common_locales} = $config->enable_common_locales; 
    44         $tt_vars{catloc_link} = $config->script_url . $config->script_name 
    45                                 . "?id="; 
    46     } 
    4733    print OpenGuides::Template->output( wiki     => $wiki, 
    4834                                        config   => $config, 
    4935                                        template => "newpage.tt", 
    50                                         vars     => \%tt_vars, 
     36                                        vars     => { 
     37                                            not_editable     => 1, 
     38                                            not_deletable    => 1, 
     39                                            deter_robots     => 1, 
     40                                            disallowed_chars => \@badchars, 
     41                                            pagename         => $pagename } 
    5142    ); 
    5243}