Update of /cvsroot/dynapi/dynapi3x/test/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22767
Modified Files:
editTest.php saveTest.php
Log Message:
Increased max length for test code
Index: editTest.php
===================================================================
RCS file: /cvsroot/dynapi/dynapi3x/test/scripts/editTest.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** editTest.php 15 Aug 2005 23:18:16 -0000 1.1
--- editTest.php 23 Aug 2005 23:00:18 -0000 1.2
***************
*** 25,29 ****
<br/>
! <b>Test code:</b> max length <code>10KB</code>
<br/>
<textarea name="test_code" cols="64" rows="15"><?=htmlspecialchars($test_code)?></textarea>
--- 25,29 ----
<br/>
! <b>Test code:</b> max length <code>16KB</code>
<br/>
<textarea name="test_code" cols="64" rows="15"><?=htmlspecialchars($test_code)?></textarea>
Index: saveTest.php
===================================================================
RCS file: /cvsroot/dynapi/dynapi3x/test/scripts/saveTest.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** saveTest.php 15 Aug 2005 23:18:16 -0000 1.1
--- saveTest.php 23 Aug 2005 23:00:18 -0000 1.2
***************
*** 15,20 ****
$name = $_REQUEST["name"];
! $expected_result = $_REQUEST["expected_result"];
! $test_code = $_REQUEST["test_code"];
if ($name == "") {
--- 15,20 ----
$name = $_REQUEST["name"];
! $expected_result = stripslashes($_REQUEST["expected_result"]);
! $test_code = stripslashes($_REQUEST["test_code"]);
if ($name == "") {
***************
*** 31,36 ****
die("<p>Test code is required (<a href=\"javascript:history.back()\">back</a>).</p>\n");
}
! if (strlen($test_code) > (1024 * 10)) {
! die("<p>Test code too long, max length = 10KB (<a href=\"javascript:history.back()\">back</a>).</p>\n");
}
--- 31,36 ----
die("<p>Test code is required (<a href=\"javascript:history.back()\">back</a>).</p>\n");
}
! if (strlen($test_code) > (1024 * 16)) {
! die("<p>Test code too long, max length = 16KB (<a href=\"javascript:history.back()\">back</a>).</p>\n");
}
***************
*** 42,45 ****
--- 42,46 ----
}
+
$code_filename = "../" . $name . ".html";
$result_filename = "../" . $name . ".txt";
|