Changeset 1045 for trunk/newpage.cgi

Show
Ignore:
Timestamp:
06/09/07 17:49:43 (18 months ago)
Author:
kake
Message:

Make sure that common categories and locales (if configured) show up on recent changes and create new page form (fixes #199).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/newpage.cgi

    r752 r1045  
    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    } 
    3347    print OpenGuides::Template->output( wiki     => $wiki, 
    3448                                        config   => $config, 
    3549                                        template => "newpage.tt", 
    36                                         vars     => { 
    37                                             not_editable     => 1, 
    38                                             not_deletable    => 1, 
    39                                             deter_robots     => 1, 
    40                                             disallowed_chars => \@badchars, 
    41                                             pagename         => $pagename } 
     50                                        vars     => \%tt_vars, 
    4251    ); 
    4352}