Mercurial > hg > fapweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
968:c71afc1a3a85 | 969:26ae3f21a3bb |
---|---|
953 $pdata["file"] = $efile; | 953 $pdata["file"] = $efile; |
954 if (isset($fileTypeData[$efile["filetype"]]["type"])) | 954 if (isset($fileTypeData[$efile["filetype"]]["type"])) |
955 $pdata["type"] = $fileTypeData[$efile["filetype"]]["type"]; | 955 $pdata["type"] = $fileTypeData[$efile["filetype"]]["type"]; |
956 } | 956 } |
957 else | 957 else |
958 if ($entry["file_id"] == 0) | |
958 $pdata["valid"] = $efile = false; | 959 $pdata["valid"] = $efile = false; |
959 | 960 |
960 switch ($pdata["type"]) | 961 switch ($pdata["type"]) |
961 { | 962 { |
962 case EFILE_IMAGE: | 963 case EFILE_IMAGE: |
981 | 982 |
982 default: | 983 default: |
983 return FALSE; | 984 return FALSE; |
984 } | 985 } |
985 | 986 |
986 if ($efile !== false) | 987 foreach ($pdata["files"] as $pkey => $pfile) |
987 { | 988 { |
988 foreach ($pdata["files"] as $pkey => $pfile) | 989 if ($pfile["exists"]) |
989 { | 990 $pdata["exists"]++; |
990 if ($pfile["exists"]) | 991 |
991 $pdata["exists"]++; | 992 if (!$pfile["exists"])// |
992 | 993 $pdata["valid"] = FALSE; |
993 if (!$pfile["exists"] || $pfile["mtime"] < $efile["utime"]) | |
994 $pdata["valid"] = FALSE; | |
995 } | |
996 } | 994 } |
997 | 995 |
998 return TRUE; | 996 return TRUE; |
999 } | 997 } |
1000 | 998 |