Update of /cvsroot/curl/curl-www/feedback
In directory labb:/tmp/cvs-serv27053
Modified Files:
add.cgi feedback.pm
Log Message:
1 - show only preview button to force review before submit
2 - force a title before the submit button appears
3 - reject postings with more than 2 URLs
Index: add.cgi
===================================================================
RCS file: /cvsroot/curl/curl-www/feedback/add.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- add.cgi 31 Mar 2005 08:27:45 -0000 1.1
+++ add.cgi 1 Feb 2006 12:11:17 -0000 1.2
@@ -30,6 +30,18 @@
$cleanemail = $email;
$cleanidea = &cleantext($idea, 1);
+my @ahref = split("a href", $cleanidea);
+my $ahrefnum = scalar(@ahref) -1;
+
+if($ahrefnum > 2) {
+ &Top();
+ &Header("URL flood");
+ print "<p> You're not allowed to include that many URLs. Please trim your",
+ " message and re-submit.";
+ &Footer;
+ exit;
+}
+
if($preview ne "") {
Top();
# This is a preview-only!
Index: feedback.pm
===================================================================
RCS file: /cvsroot/curl/curl-www/feedback/feedback.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- feedback.pm 20 Jan 2006 22:16:10 -0000 1.3
+++ feedback.pm 1 Feb 2006 12:11:17 -0000 1.4
@@ -88,6 +88,10 @@
sub ShowInput {
+ if($preview && $title) {
+ $submitbutton="<input type=submit value=\"submit\" name=\"submit\">";
+ }
+
print <<EOD
<form action="add.cgi" method="post">
<center>
@@ -101,7 +105,7 @@
<tr><td colspan=2>Suggestion</td></tr>
<tr><td colspan=2>
<textarea name=idea rows=10 cols=60 wrap=virtual>$idea</textarea></td></tr>
-<tr><td><input type=submit value="submit" name=submit><input type=submit value="preview" name=preview></td>
+<tr><td>$submitbutton<input type=submit value="preview" name=preview></td>
<td align=right><input type=submit value="cancel" name=cancel></td></tr>
</table>
</td></tr></table>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.