Mercurial > hg > fapweb
diff msite.inc.php @ 969:26ae3f21a3bb
Moar work on previews.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 29 Nov 2014 10:13:20 +0200 |
parents | d5f3a505c73c |
children | a1da651a2e45 |
line wrap: on
line diff
--- a/msite.inc.php Sat Nov 29 08:38:34 2014 +0200 +++ b/msite.inc.php Sat Nov 29 10:13:20 2014 +0200 @@ -955,6 +955,7 @@ $pdata["type"] = $fileTypeData[$efile["filetype"]]["type"]; } else + if ($entry["file_id"] == 0) $pdata["valid"] = $efile = false; switch ($pdata["type"]) @@ -983,16 +984,13 @@ return FALSE; } - if ($efile !== false) + foreach ($pdata["files"] as $pkey => $pfile) { - foreach ($pdata["files"] as $pkey => $pfile) - { - if ($pfile["exists"]) - $pdata["exists"]++; + if ($pfile["exists"]) + $pdata["exists"]++; - if (!$pfile["exists"] || $pfile["mtime"] < $efile["utime"]) - $pdata["valid"] = FALSE; - } + if (!$pfile["exists"])// + $pdata["valid"] = FALSE; } return TRUE;