r10197 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10196‎ | r10197 | r10198 >
Date:19:17, 18 July 2005
Author:kateturner
Status:old
Tags:
Comment:
urldecode urls in all_urls.txt
ignore referers not starting with "http://"
(fe) add bugzilla link
Modified paths:
  • /trunk/logwood/fe/logwood.php (modified) (history)
  • /trunk/logwood/logwood.c (modified) (history)
  • /trunk/logwood/run_reports.php (modified) (history)

Diff [purge]

Index: trunk/logwood/run_reports.php
@@ -71,7 +71,11 @@
7272 $qallurls->bind_result($a_name, $a_path, $a_count);
7373 $qallurls->execute();
7474 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");
7680 fclose($fh);
7781 $qallurls->free_result();
7882 }
Index: trunk/logwood/fe/logwood.php
@@ -179,6 +179,7 @@
180180 <hr>
181181 <p id='motif'>Statistics generated by <a href="mailto:keturner@livejournal.com">Logwood</a>
182182 <?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>
184185 </body>
185186 </html>
Index: trunk/logwood/logwood.c
@@ -628,6 +628,9 @@
629629 if (!host_ok(host) || !path_ok(path))
630630 continue;
631631
 632+ if (refer && strncasecmp(refer, "http://", 7))
 633+ refer = NULL;
 634+
632635 tmt = atoi(reqtime);
633636 tm = gmtime(&tmt);
634637

Status & tagging log