Mercurial > hg > fapweb
diff admajax.php @ 1034:8fecb417e6a9
Reintroduce per-entry preview_type.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 20 Nov 2015 07:28:53 +0200 |
parents | 9fffc9e7e1b6 |
children | b67fa444099e |
line wrap: on
line diff
--- a/admajax.php Fri Nov 20 07:20:39 2015 +0200 +++ b/admajax.php Fri Nov 20 07:28:53 2015 +0200 @@ -87,6 +87,13 @@ stChkRequestItemFail("info", $fake, $res, array(CHK_TYPE, VT_TEXT, "Invalid data."), array(CHK_LTEQ, VT_STR, SET_LEN_ENTRY_INFO, "Entry info text too long (%1 chars, must be less than %2).")); + + if ($full) + { + 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.")); + } break; case COMPO_POINTS: @@ -1594,6 +1601,7 @@ "compo_id" => $id, "info" => "", "notes" => "", + "preview_type" => 0, "flags" => 0, "evalue" => "", "utime" => 0,