浏览代码

BiAuditGenerate - drobna poprawka

Mariusz Muszyński 8 年之前
父节点
当前提交
ff870dd36b
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      SE/se-lib/Route/UrlAction/BiAuditGenerate.php

+ 3 - 3
SE/se-lib/Route/UrlAction/BiAuditGenerate.php

@@ -299,14 +299,14 @@ function toggle(source) {
 <?php
 		array_walk($reports, function ($report) use ($url) {
 			echo "<div class=\"col-sm-2\"><h4>{$report['label']}</h4>";
-			$hrefs = array_diff(array_map(function ($path) use ($url, $report) {
-				if (!is_file($path)) return null;
+			$hrefs = array_filter(array_map(function ($path) use ($url, $report) {
+				if (!is_file($path)) return false;
 				$file = basename($path);
 				if (preg_match($report['regex'], $file, $matches)) $i = " (" . ltrim($matches[1], '0') . ")";
 				else $i = '';
 				if ($report['parentDir']) $file = basename(dirname($path)) . "/" . $file;
 				return "<a href=\"{$url}/{$file}\" target=\"_blank\" class=\"btn btn-primary\">{$report['button']}{$i}</a>";
-			}, $report['files']), [null]);
+			}, $report['files']));
 			if ($hrefs) echo implode('<br/><br/>', $hrefs);
 			else echo "<h5>Nie znaleziono</h5>";
 			echo "</div>\n";