diff options
Diffstat (limited to 'config/imspector-dev/services_imspector_logs.php')
-rw-r--r-- | config/imspector-dev/services_imspector_logs.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/config/imspector-dev/services_imspector_logs.php b/config/imspector-dev/services_imspector_logs.php index 09e732b8..aa6a9a9b 100644 --- a/config/imspector-dev/services_imspector_logs.php +++ b/config/imspector-dev/services_imspector_logs.php @@ -6,6 +6,7 @@ JavaScript Code is GPL Licensed from SmoothWall Express. Copyright (C) 2007 Ryan Wagoner <rswagoner@gmail.com>. + Copyright (C) 2012 Marcello Coutinho All rights reserved. Redistribution and use in source and binary forms, with or without @@ -62,13 +63,16 @@ $convo_remote_bgcolor = '#eeeeee'; function convert_dir_list ($topdir) { if (!is_dir($topdir)) return; if ($dh = opendir($topdir)) { - while (($file = readdir($dh)) !== false) { + $limit=(is_numericint($imspector_config['limit'])?$imspector_config['limit']:"1000"); + $count=0; + while (($file = readdir($dh)) !== false && $count < $limit) { if(!preg_match('/^\./', $file) == 0) continue; if (is_dir("$topdir/$file")) { $list .= convert_dir_list("$topdir/$file"); } else { $list .= "$topdir/$file\n"; } + $count ++; } closedir($dh); } @@ -160,7 +164,7 @@ include("head.inc"); $tab_array[] = array(gettext("Settings "), false, "/pkg_edit.php?xml=imspector.xml&id=0"); $tab_array[] = array(gettext("Replacements "), false, "/pkg_edit.php?xml=imspector_replacements.xml&id=0"); $tab_array[] = array(gettext("Access Lists "), false, "/pkg.php?xml=imspector_acls.xml"); - $tab_array[] = array(gettext("Log "), true, "/services_imspector_logs.php"); + $tab_array[] = array(gettext("Log "), true, "/imspector_logs.php"); $tab_array[] = array(gettext("Sync "), false, "/pkg_edit.php?xml=imspector_sync.xml&id=0"); display_top_tabs($tab_array); |