Mercurial > hg > fapweb
diff admajax.php @ 451:772a2138861b
No need for this function.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 06 Dec 2013 16:52:24 +0200 |
parents | c7cc689071aa |
children | f2a0da566e30 |
line wrap: on
line diff
--- a/admajax.php Fri Dec 06 16:44:56 2013 +0200 +++ b/admajax.php Fri Dec 06 16:52:24 2013 +0200 @@ -79,19 +79,6 @@ } -function stValidateRequestDisplaySlideData() -{ - return - stChkRequestItem("title", $fake, - array(CHK_GTEQ, VT_STR, 1, "Slide title too short."), - array(CHK_LTEQ, VT_STR, SET_LEN_DISP_SLIDE_TITLE, "Slide title too long.") - ) && - stChkRequestItem("text", $fake, - array(CHK_LTEQ, VT_STR, SET_LEN_DISP_SLIDE_TEXT, "Slide content too long.") - ); -} - - function stGetCompoData($id, $item, $prefix) { return @@ -680,7 +667,13 @@ case "updateDisplaySlide": if (stChkRequestItem("id", $slide_id, array(CHK_TYPE, VT_INT, "Invalid data.")) && - stValidateRequestDisplaySlideData()) + stChkRequestItem("title", $fake, + array(CHK_GTEQ, VT_STR, 1, "Slide title too short."), + array(CHK_LTEQ, VT_STR, SET_LEN_DISP_SLIDE_TITLE, "Slide title too long.") + ) && + stChkRequestItem("text", $fake, + array(CHK_LTEQ, VT_STR, SET_LEN_DISP_SLIDE_TEXT, "Slide content too long.") + )) { $sql = stPrepareSQLUpdate("displaySlides", "WHERE id=".$slide_id,