[geeklog-hg] geeklog: only list files ending with .log in the Log Viewer

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon May 20 12:38:04 EDT 2013


changeset 9079:b1384cc3af52
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/b1384cc3af52
user: Dirk Haun <dirk at haun-online.de>
date: Mon May 20 17:21:51 2013 +0200
description:
only list files ending with .log in the Log Viewer

diffstat:

 public_html/admin/logviewer.php |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 3bcfb1415d4a -r b1384cc3af52 public_html/admin/logviewer.php
--- a/public_html/admin/logviewer.php	Tue May 21 00:06:06 2013 +0900
+++ b/public_html/admin/logviewer.php	Mon May 20 17:21:51 2013 +0200
@@ -75,7 +75,7 @@
 $files = array();
 if ($dir = @opendir($_CONF['path_log'])) {
     while(($file = readdir($dir)) !== false) {
-        if (is_file($_CONF['path_log'] . $file) && $file != 'index.html' ) {
+        if (is_file($_CONF['path_log'] . $file) && preg_match('/\.log$/i', $file)) {
             array_push($files,$file);
         }
     }



More information about the geeklog-cvs mailing list