Mercurial > hg > fapweb
diff admajax.php @ 896:52737f6192bb
More work on preview handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 26 Nov 2014 21:02:36 +0200 |
parents | 5c5bd09d15f3 |
children | 0cc1d87cdca1 |
line wrap: on
line diff
--- a/admajax.php Wed Nov 26 20:33:07 2014 +0200 +++ b/admajax.php Wed Nov 26 21:02:36 2014 +0200 @@ -18,6 +18,8 @@ function stValidateRequestCompoData($full, $ctype) { + global $previewTypeList; + $res = TRUE; stChkRequestItemFail("name", $fake, $res, @@ -44,7 +46,7 @@ stChkRequestItemFail("preview_type", $fake, $res, array(CHK_TYPE, VT_INT, "Invalid data."), - array(CHK_RANGE, VT_INT, array(EPREV_NONE, EPREV_AUDIO), "Invalid preview type value.")); + array(CHK_ARRAY, $previewTypeList, "Invalid preview type value.")); stChkRequestItemFail("cpath", $fake, $res, array(CHK_LTEQ, VT_STR, SET_LEN_COMPO_PATH, "Compo file path too long (%1 chars, must be less than %2)."));