Mercurial > hg > fapweb
changeset 824:6f52c19b00f4
Fix some 10L's.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 24 Nov 2014 22:52:56 +0200 |
parents | debad9461b00 |
children | 044ee3aa32e3 |
files | msite.inc.php |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/msite.inc.php Mon Nov 24 22:48:10 2014 +0200 +++ b/msite.inc.php Mon Nov 24 22:52:56 2014 +0200 @@ -61,6 +61,7 @@ define("EFILE_UNKNOWN", 0); define("EFILE_IMAGE", 1); define("EFILE_AUDIO", 2); +define("EFILE_VIDEO", 3); define("EFILE_ARCHIVE", 5); // @@ -1003,7 +1004,7 @@ { error_log("Internal error. Failed to initialize finfo().\n"); return stError("Internal error, failed to probe file."); - ); + } $sdata = @finfo_file($finfo, $filename, FILEINFO_NONE); $smime = @finfo_file($finfo, $filename, FILEINFO_MIME_TYPE); @@ -1097,10 +1098,11 @@ // Check basics if (!stChkRequestItem("type", $uploadType, - array(CHK_TYPE, VT_STR, "Invalid upload type."), - array(CHK_ARRAY, VT_STR, array("entry", "preview"), "Invalid upload type.") || + array(CHK_TYPE, VT_STR, "Invalid upload type."), + array(CHK_ARRAY, VT_STR, array("entry", "preview"), "Invalid upload type.")) + || !stChkRequestItem("entry_id", $entryID, - array(CHK_TYPE, VT_INT, "Invalid entry ID.")) + array(CHK_TYPE, VT_INT, "Invalid entry ID."))) return FALSE; // Check entry existence @@ -1114,7 +1116,7 @@ if ($userID != 0) { // Check if the user even exists, just in case - if (($user = stFetchSQL("SELECT * FROM attendees WHERE id=".$userID) === false) + if (($user = stFetchSQL("SELECT * FROM attendees WHERE id=".$userID)) === false) return stError("User ID #".$userID." does not exist??"); if ($entry["owner_id"] != $userID) @@ -1189,7 +1191,7 @@ } // Move file to its destination - $fullFile = stMakePath(FALSE, FALSE, array(stGetSetting($uploadType."Path"), $compo["cpath"], $filename); + $fullFile = stMakePath(FALSE, FALSE, array(stGetSetting($uploadType."Path"), $compo["cpath"], $filename)); if (@move_uploaded_file($tmpFilename, $fullFile) === false) { error_log("Could not move uploaded file '".$tmpFilename."' to '".$fullFile."'.\n");