Index: trunk/logwood/run_reports.php |
— | — | @@ -71,7 +71,11 @@ |
72 | 72 | $qallurls->bind_result($a_name, $a_path, $a_count); |
73 | 73 | $qallurls->execute(); |
74 | 74 | while ($qallurls->fetch()) |
75 | | - fwrite($fh, "$a_count\t$a_name\t$a_path\n"); |
| 75 | + fwrite($fh, "$a_count\t$a_name\t" . |
| 76 | + str_replace("\n", "%0A", |
| 77 | + str_replace("\r", "%0D", |
| 78 | + str_replace("%", "%25", |
| 79 | + urldecode($a_path)))) . "\n"); |
76 | 80 | fclose($fh); |
77 | 81 | $qallurls->free_result(); |
78 | 82 | } |
Index: trunk/logwood/fe/logwood.php |
— | — | @@ -179,6 +179,7 @@ |
180 | 180 | <hr> |
181 | 181 | <p id='motif'>Statistics generated by <a href="mailto:keturner@livejournal.com">Logwood</a> |
182 | 182 | <?php echo $db->version()?>; PHP <?php echo phpversion() ?>, |
183 | | -MySQL <?php echo $db->mysql_version() ?>.</p> |
| 183 | +MySQL <?php echo $db->mysql_version() ?>. |
| 184 | +<a href="http://bugzilla.wikimedia.org/enter_bug.cgi?product=Logwood">Report a bug.</a></p> |
184 | 185 | </body> |
185 | 186 | </html> |
Index: trunk/logwood/logwood.c |
— | — | @@ -628,6 +628,9 @@ |
629 | 629 | if (!host_ok(host) || !path_ok(path)) |
630 | 630 | continue; |
631 | 631 | |
| 632 | + if (refer && strncasecmp(refer, "http://", 7)) |
| 633 | + refer = NULL; |
| 634 | + |
632 | 635 | tmt = atoi(reqtime); |
633 | 636 | tm = gmtime(&tmt); |
634 | 637 | |