french updated
[koha.git] / tools / koha-news.pl
index ff763e0..3730c10 100755 (executable)
@@ -49,7 +49,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
         query           => $cgi,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { tools => 1 },
+        flagsrequired   => { tools => 'edit_news' },
         debug           => 1,
     }
 );
@@ -60,8 +60,8 @@ my $tlangs = getTranslatedLanguages() ;
 foreach my $language ( @$tlangs ) {
     push @lang_list,
       {
-        language => $language->{'language_code'},
-        selected => ( $new_detail->{lang} eq $language->{'language_code'} ? 1 : 0 ),
+        language => $language->{'rfc4646_subtag'},
+        selected => ( $new_detail->{lang} eq $language->{'rfc4646_subtag'} ? 1 : 0 ),
       };
 }
 
@@ -117,5 +117,6 @@ else {
 }
 $template->param(
                                DHTMLcalendar_dateformat =>  C4::Dates->DHTMLcalendar(),
+                               dateformat    => C4::Context->preference("dateformat"),
                );
 output_html_with_http_headers $cgi, $cookie, $template->output;