~ubuntu-branches/ubuntu/quantal/awstats/quantal

« back to all changes in this revision

Viewing changes to debian/patches/1017_fix_html_output_markup.patch

  • Committer: Package Import Robot
  • Author(s): Sergey B Kirpichev
  • Date: 2011-10-29 16:43:28 UTC
  • Revision ID: package-import@ubuntu.com-20111029164328-us8n3qfb070hitzm
Tags: 7.0~dfsg-3
* Bump up Standards-Version (to 3.9.2)
* Removed .gitignore
* Replace /usr/share/doc/awstats/html/awstats_changelog.txt.gz by
  symlink to avoid lintian warning
* Include patches/1016_downloads_list_page.patch to generate
  "Downloads Full list" page (Closes: #638857)
* Refresh patches with --no-index --no-timestamps -pab --diffstat
* Include patches/1017_fix_html_output_markup.patch to fix some output
  issues (Closes: #630943)
* Update copyright for debian/* files
* Minor tweaks of debian/README.Debian
* Add some hints to restrict access to /cgi-bin/awstats.pl (Closes:
  #590953)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: HTML output nits
 
2
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
 
3
Debian-Bug: http://bugs.debian.org/630943
 
4
Forwarded: https://sourceforge.net/tracker/index.php?func=detail&aid=3429995&group_id=13764&atid=363764
 
5
 
 
6
---
 
7
 wwwroot/cgi-bin/awstats.pl |   48 +++++++++++++++------------------------------
 
8
 1 file changed, 16 insertions(+), 32 deletions(-)
 
9
 
 
10
--- a/wwwroot/cgi-bin/awstats.pl
 
11
+++ b/wwwroot/cgi-bin/awstats.pl
 
12
@@ -795,7 +795,7 @@
 
13
                        else { print "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"; }
 
14
                        if ( $FrameName ne 'index' ) {
 
15
                                print
 
16
-"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
 
17
+"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
 
18
                        }
 
19
                        else {
 
20
                                print
 
21
@@ -807,11 +807,11 @@
 
22
                else {
 
23
                        if ( $FrameName ne 'index' ) {
 
24
                                print
 
25
-"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
 
26
+"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n";
 
27
                        }
 
28
                        else {
 
29
                                print
 
30
-"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">\n";
 
31
+"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\">\n";
 
32
                        }
 
33
                        print '<html lang="' . $Lang . '"'
 
34
                          . ( $PageDir ? ' dir="rtl"' : '' ) . ">\n";
 
35
@@ -885,14 +885,6 @@
 
36
 
 
37
 # A STYLE section must be in head section. Do not use " for number in a style section
 
38
                        print "<style type=\"text/css\">\n";
 
39
-                       if ( $BuildReportFormat eq 'xhtml' || $BuildReportFormat eq 'xml' )
 
40
-                       {
 
41
-                               print( $ENV{'HTTP_USER_AGENT'} =~ /Firebird/i
 
42
-                                       ? "<!--\n"
 
43
-                                       : "<![CDATA[\n"
 
44
-                               );
 
45
-                       }
 
46
-                       else { print "<!--\n"; }
 
47
 
 
48
                        if ( !$StyleSheet ) {
 
49
                                print
 
50
@@ -943,14 +935,6 @@
 
51
                                &$function();
 
52
                        }
 
53
 
 
54
-                       if ( $BuildReportFormat eq 'xhtml' || $BuildReportFormat eq 'xml' )
 
55
-                       {
 
56
-                               print( $ENV{'HTTP_USER_AGENT'} =~ /Firebird/i
 
57
-                                       ? "//-->\n"
 
58
-                                       : "]]>\n"
 
59
-                               );
 
60
-                       }
 
61
-                       else { print "//-->\n"; }
 
62
                        print "</style>\n";
 
63
                }
 
64
 
 
65
@@ -9874,7 +9858,7 @@
 
66
                                print "<option"
 
67
                                  . (
 
68
                                          "$MonthRequired" eq "$monthix"
 
69
-                                       ? " selected=\"true\""
 
70
+                                       ? " selected=\"selected\""
 
71
                                        : ""
 
72
                                  )
 
73
                                  . " value=\"$monthix\">$MonthNumLib{$monthix}</option>\n";
 
74
@@ -13010,13 +12994,13 @@
 
75
                                !$StaticLinks
 
76
                                  && $monthix == $nowmonth
 
77
                                  && $YearRequired == $nowyear
 
78
-                               ? '<font class="currentday">'
 
79
+                               ? '<span class="currentday">'
 
80
                                : ''
 
81
                          );
 
82
                        print "$MonthNumLib{$monthix}<br />$YearRequired";
 
83
                        print(   !$StaticLinks
 
84
                                  && $monthix == $nowmonth
 
85
-                                 && $YearRequired == $nowyear ? '</font>' : '' );
 
86
+                                 && $YearRequired == $nowyear ? '</span>' : '' );
 
87
                        print "</td>";
 
88
 
 
89
                        #                                       }
 
90
@@ -13073,13 +13057,13 @@
 
91
                                !$StaticLinks
 
92
                                  && $monthix == $nowmonth
 
93
                                  && $YearRequired == $nowyear
 
94
-                               ? '<font class="currentday">'
 
95
+                               ? '<span class="currentday">'
 
96
                                : ''
 
97
                          );
 
98
                        print "$MonthNumLib{$monthix} $YearRequired";
 
99
                        print(   !$StaticLinks
 
100
                                  && $monthix == $nowmonth
 
101
-                                 && $YearRequired == $nowyear ? '</font>' : '' );
 
102
+                                 && $YearRequired == $nowyear ? '</span>' : '' );
 
103
                        print "</td>";
 
104
                        if ( $ShowMonthStats =~ /U/i ) {
 
105
                                print "<td>",
 
106
@@ -13426,7 +13410,7 @@
 
107
                                  && $day == $nowday
 
108
                                  && $month == $nowmonth
 
109
                                  && $year == $nowyear
 
110
-                               ? '<font class="currentday">'
 
111
+                               ? '<span class="currentday">'
 
112
                                : ''
 
113
                        );
 
114
                        print "$day<br /><span style=\"font-size: "
 
115
@@ -13438,7 +13422,7 @@
 
116
                        print(   !$StaticLinks
 
117
                                  && $day == $nowday
 
118
                                  && $month == $nowmonth
 
119
-                                 && $year == $nowyear ? '</font>' : '' );
 
120
+                                 && $year == $nowyear ? '</span>' : '' );
 
121
                        print "</td>\n";
 
122
                }
 
123
                print "<td>&nbsp;</td>";
 
124
@@ -13500,14 +13484,14 @@
 
125
                                  && $day == $nowday
 
126
                                  && $month == $nowmonth
 
127
                                  && $year == $nowyear
 
128
-                               ? '<font class="currentday">'
 
129
+                               ? '<span class="currentday">'
 
130
                                : ''
 
131
                          );
 
132
                        print Format_Date( "$year$month$day" . "000000", 2 );
 
133
                        print(   !$StaticLinks
 
134
                                  && $day == $nowday
 
135
                                  && $month == $nowmonth
 
136
-                                 && $year == $nowyear ? '</font>' : '' );
 
137
+                                 && $year == $nowyear ? '</span>' : '' );
 
138
                        print "</td>";
 
139
                        if ( $ShowDaysOfMonthStats =~ /V/i ) {
 
140
                                print "<td>",
 
141
@@ -13803,14 +13787,14 @@
 
142
                                                  && $_ == ( $nowwday - 1 )
 
143
                                                  && $MonthRequired == $nowmonth
 
144
                                                  && $YearRequired == $nowyear
 
145
-                                               ? '<font class="currentday">'
 
146
+                                               ? '<span class="currentday">'
 
147
                                                : ''
 
148
                                          );
 
149
                                        print $Message[ $_ + 84 ];
 
150
                                        print(   !$StaticLinks
 
151
                                                  && $_ == ( $nowwday - 1 )
 
152
                                                  && $MonthRequired == $nowmonth
 
153
-                                                 && $YearRequired == $nowyear ? '</font>' : '' );
 
154
+                                                 && $YearRequired == $nowyear ? '</span>' : '' );
 
155
                                        print "</td>";
 
156
                                }
 
157
                                print "</tr>\n</table>\n";
 
158
@@ -13847,14 +13831,14 @@
 
159
                                                  && $_ == ( $nowwday - 1 )
 
160
                                                  && $MonthRequired == $nowmonth
 
161
                                                  && $YearRequired == $nowyear
 
162
-                                               ? '<font class="currentday">'
 
163
+                                               ? '<span class="currentday">'
 
164
                                                : ''
 
165
                                          );
 
166
                                        print $Message[ $_ + 84 ];
 
167
                                        print(   !$StaticLinks
 
168
                                                  && $_ == ( $nowwday - 1 )
 
169
                                                  && $MonthRequired == $nowmonth
 
170
-                                                 && $YearRequired == $nowyear ? '</font>' : '' );
 
171
+                                                 && $YearRequired == $nowyear ? '</span>' : '' );
 
172
                                        print "</td>";
 
173
                                        if ( $ShowDaysOfWeekStats =~ /P/i ) {
 
174
                                                print "<td>", Format_Number(int($avg_dayofweek_p[$_])), "</td>";