lilalo

diff l3-cgi-lite @ 142:e939c147dcdd

Добавлен l3pre.php --- mediawiki extension, предназначенный для вставки на wiki фрагментов журнала
author igor@chub.in
date Tue Jul 22 00:16:20 2008 +0300 (2008-07-22)
parents 078fab45d863
children 51a232faeb27
line diff
     1.1 --- a/l3-cgi-lite	Fri Jul 04 16:12:31 2008 +0300
     1.2 +++ b/l3-cgi-lite	Tue Jul 22 00:16:20 2008 +0300
     1.3 @@ -37,6 +37,15 @@
     1.4  my $style_files = $l3config::Config{"frontend_files"} ;
     1.5  my $frontend_css = $l3config::Config{"frontend_css"} ;
     1.6  
     1.7 +my $filter=$ENV{QUERY_STRING};
     1.8 +if ($filter !~ /filter=/) {
     1.9 +#    $filter="";
    1.10 +}
    1.11 +else {
    1.12 +    $filter =~ s@.*filter=@@;
    1.13 +    $filter =~ s@\&.*@@;
    1.14 +}
    1.15 +
    1.16  my $data_file = "data.xml";
    1.17  
    1.18  path_is_correct($path)
    1.19 @@ -65,10 +74,12 @@
    1.20               && -e "$real_path/index.html" 
    1.21               && (stat("$real_path/index.html"))[9] > (stat("$real_path/$data_file"))[9] && 0!=0 ) {
    1.22  
    1.23 -        my $l3_frontend = "l3-frontend --backend_datafile $real_path/$data_file --output $real_path/index.html --start_from_command $start_from_command ";
    1.24 +        my $l3_frontend = "l3-frontend --backend_datafile $real_path/$data_file".
    1.25 +                                     " --output $real_path/index.html".
    1.26 +                                     " --start_from_command $start_from_command ".
    1.27 +                                     " --filter '$filter'";
    1.28          system($l3_frontend) == 0
    1.29              or error("Файл журнала найден, но возникла ошибка при его обработке:<br/> $!");
    1.30 -        #$print .= "(перегенирован)<br/>";
    1.31      }
    1.32  
    1.33      {
    1.34 @@ -192,7 +203,8 @@
    1.35          }
    1.36          $i++;
    1.37      }
    1.38 -    return "<table class='nav_bar' cellpadding='0' cellspacing='0' width='100%'><tr><td>$nav_bar</td></tr></table>";
    1.39 +    $filter = "($filter)" if $filter;
    1.40 +    return "<table class='nav_bar' cellpadding='0' cellspacing='0' width='100%'><tr><td>$nav_bar $filter</td></tr></table>";
    1.41  }
    1.42  
    1.43  sub count_command_lines($)