/[smeserver]/rpms/smeserver-manager/sme10/smeserver-manager-0.1.2-viewlogfiles_download.patch
ViewVC logotype

Annotation of /rpms/smeserver-manager/sme10/smeserver-manager-0.1.2-viewlogfiles_download.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Mon Jun 21 15:09:41 2021 UTC (3 years, 5 months ago) by michel
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
make: « clog » est à jour.

1 michel 1.1 diff -urN smeserver-manager-0.1.2.old/root/etc/e-smith/events/actions/locales2-conf smeserver-manager-0.1.2/root/etc/e-smith/events/actions/locales2-conf
2     --- smeserver-manager-0.1.2.old/root/etc/e-smith/events/actions/locales2-conf 2020-11-19 11:53:26.000000000 +0400
3     +++ smeserver-manager-0.1.2/root/etc/e-smith/events/actions/locales2-conf 2020-11-29 00:10:27.998000000 +0400
4     @@ -80,7 +80,7 @@
5     close FIL2;
6    
7     print FIL ");\n\nour %Lexicon = (\n";
8     - print FIL " %\{ SrvMngr::I18N::Modules::General::${lang}::Lexicon \},\n";
9     + print FIL " %\{ SrvMngr::I18N::Modules::General::${lang}::Lexicon \},\n" unless $module eq 'General';
10     print FIL " %lexicon\n);\n\n\n1;\n";
11    
12     close FIL;
13     diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Controller/Viewlogfiles.pm smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Controller/Viewlogfiles.pm
14     --- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Controller/Viewlogfiles.pm 2020-11-19 11:53:26.000000000 +0400
15     +++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Controller/Viewlogfiles.pm 2020-11-29 00:22:50.381000000 +0400
16     @@ -23,6 +23,7 @@
17     use File::Basename;
18     use HTML::Entities;
19     use esmith::FormMagick qw(gen_locale_date_string);
20     +use File::Temp qw(tempfile);
21    
22     use constant TRUE => 1;
23     use constant FALSE => 0;
24     @@ -111,6 +112,7 @@
25     my $modul = 'Log file download';
26    
27     $notif = download_logFile( $c, %log_datas );
28     + return undef unless defined $notif;
29     }
30    
31     $c->stash( title => $title, notif => $notif, log_datas => \%log_datas);
32     @@ -179,6 +181,7 @@
33     }
34     }
35    
36     + @logfiles = ();
37     # Now go and find all the files under /var/log
38     find({wanted => \&findlogfiles, no_chdir => 1}, '/var/log');
39    
40     @@ -308,29 +311,22 @@
41     # the Content-disposition (an officially unsupported header) for some
42     # reason. Yay Microsoft.
43    
44     - # compute file size first for the header !!
45     -
46     - my @fileholder = ();
47     - my $filesize = 0;
48     + my $file2 = new File::Temp( UNLINK => 0 );
49    
50     while (my $line = <FILE>) {
51     chomp $line;
52     my $linew = timestamp2local($line) . $nl;
53     - $filesize += length($linew);
54     - push @fileholder, $linew;
55     + print $file2 $linew;
56     }
57     close(FILE);
58    
59     - # print header
60     - print <<"EOF";
61     -Expires: 0
62     -Content-Type:application/octet-stream
63     -Content-Disposition:attachment;filename=$filename
64     -Content-Length:$filesize
65     -
66     -
67     -EOF
68     - print @fileholder ;
69     + $c->render_file(
70     + 'filepath' => "$file2",
71     + 'filename' => "$filename",
72     + 'format' => 'x-download',
73     + 'content_disposition' => 'attachment',
74     + 'cleanup' => 1,
75     + );
76    
77     return undef;
78     }
79     diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr.pm smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr.pm
80     --- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr.pm 2020-11-29 00:07:51.000000000 +0400
81     +++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr.pm 2020-12-01 20:21:47.135000000 +0400
82     @@ -23,7 +23,7 @@
83     use SrvMngr::Model::Main;
84    
85    
86     -our $VERSION = '1.202';
87     +our $VERSION = '1.203';
88     $VERSION = eval $VERSION;
89    
90     use Exporter 'import';

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed