Mercurial > hg > fapweb
changeset 261:b9a40d930bb6
Use CHK_LTEQ instead of CHK_ISLT.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 24 Nov 2013 02:54:44 +0200 |
parents | 6a1f1f2f2141 |
children | 96258f449a3d |
files | admajax.php msite.inc.php |
diffstat | 2 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/admajax.php Sun Nov 24 02:23:22 2013 +0200 +++ b/admajax.php Sun Nov 24 02:54:44 2013 +0200 @@ -14,10 +14,10 @@ { if (!stChkRequestItem("name", $fake, array(CHK_ISGT, VT_STR, 0, "Compo name too short"), - array(CHK_ISLT, VT_STR, SET_LEN_COMPO_NAME, "Compo name too long.")) || + array(CHK_LTEQ, VT_STR, SET_LEN_COMPO_NAME, "Compo name too long.")) || !stChkRequestItem("description", $fake, array(CHK_ISGT, VT_STR, 10, "Compo description too short"), - array(CHK_ISLT, VT_STR, SET_LEN_COMPO_DESC, "Compo description too long."))) + array(CHK_LTEQ, VT_STR, SET_LEN_COMPO_DESC, "Compo description too long."))) return FALSE; if (!$full) @@ -41,19 +41,19 @@ return stChkRequestItem("name", $fake, array(CHK_ISGT, VT_STR, 0, "Entry name too short."), - array(CHK_ISLT, VT_STR, SET_LEN_ENTRY_NAME, "Entry name too long.") + array(CHK_LTEQ, VT_STR, SET_LEN_ENTRY_NAME, "Entry name too long.") ) && stChkRequestItem("author", $fake, array(CHK_ISGT, VT_STR, 0, "Author name not set."), - array(CHK_ISLT, VT_STR, SET_LEN_ENTRY_AUTHOR, "Entry author too long.") + array(CHK_LTEQ, VT_STR, SET_LEN_ENTRY_AUTHOR, "Entry author too long.") ) && stChkRequestItem("filename", $fake, array(CHK_TYPE, VT_TEXT, "Invalid data."), - array(CHK_ISLT, VT_STR, SET_LEN_ENTRY_FILENAME, "Entry filename too long.") + array(CHK_LTEQ, VT_STR, SET_LEN_ENTRY_FILENAME, "Entry filename too long.") ) && stChkRequestItem("info", $fake, array(CHK_TYPE, VT_TEXT, "Invalid data."), - array(CHK_ISLT, VT_STR, SET_LEN_ENTRY_INFO, "Entry info too long.") + array(CHK_LTEQ, VT_STR, SET_LEN_ENTRY_INFO, "Entry info too long.") ) && stChkRequestItem("compo_id", $compo_id, array(CHK_TYPE, VT_INT, "Invalid compo ID.") @@ -66,15 +66,15 @@ return stChkRequestItem("text", $fake, array(CHK_ISGT, VT_STR, 0, "News text too short."), - array(CHK_ISLT, VT_STR, SET_LEN_NEWS_TEXT, "News text too long.") + array(CHK_LTEQ, VT_STR, SET_LEN_NEWS_TEXT, "News text too long.") ) && stChkRequestItem("author", $fake, array(CHK_ISGT, VT_STR, 0, "News author name too short."), - array(CHK_ISLT, VT_STR, SET_LEN_NEWS_AUTHOR, "News author name too long.") + array(CHK_LTEQ, VT_STR, SET_LEN_NEWS_AUTHOR, "News author name too long.") ) && stChkRequestItem("title", $fake, array(CHK_ISGT, VT_STR, 0, "News title too short."), - array(CHK_ISLT, VT_STR, SET_LEN_NEWS_TITLE, "News title too long.") + array(CHK_LTEQ, VT_STR, SET_LEN_NEWS_TITLE, "News title too long.") ); }
--- a/msite.inc.php Sun Nov 24 02:23:22 2013 +0200 +++ b/msite.inc.php Sun Nov 24 02:54:44 2013 +0200 @@ -216,15 +216,15 @@ { if (!stChkRequestItem("name", $fake, array(CHK_ISGT, VT_STR, 0, "Handle / name not given."), - array(CHK_ISLT, VT_STR, SET_LEN_USERNAME, "Handle / name is too long, should be less than ".SET_LEN_USERNAME." characters.") + array(CHK_LTEQ, VT_STR, SET_LEN_USERNAME, "Handle / name is too long, should be less than ".SET_LEN_USERNAME." characters.") )) return FALSE; if (!stChkRequestItem("groups", $fake, - array(CHK_ISLT, VT_STR, SET_LEN_GROUPS, "Groups are too long, should be less than ".SET_LEN_GROUPS." characters.") + array(CHK_LTEQ, VT_STR, SET_LEN_GROUPS, "Groups are too long, should be less than ".SET_LEN_GROUPS." characters.") )) return FALSE; if (!stChkRequestItem("oneliner", $fake, - array(CHK_ISLT, VT_STR, SET_LEN_ONELINER, "Oneliner is too long, should be less than ".SET_LEN_ONELINER." characters.") + array(CHK_LTEQ, VT_STR, SET_LEN_ONELINER, "Oneliner is too long, should be less than ".SET_LEN_ONELINER." characters.") )) return FALSE; $email = stGetRequestItem("email");