From f1e5238a31a445f842a08f3f0dfde07ef52dcae1 Mon Sep 17 00:00:00 2001
From: Vincent Untz
Date: Tue, 11 Nov 2003 21:11:31 +0000
Subject: [PATCH] don't initialize the textarea with useless spaces, and get
the POST
2003-11-11 Vincent Untz
* foundation.gnome.org/membership/application.wml: don't initialize
the textarea with useless spaces, and get the POST variables ASAP.
---
ChangeLog | 5 ++
.../membership/application.wml | 57 +++++++++----------
2 files changed, 33 insertions(+), 29 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index abefe50..0a5895e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-11-11 Vincent Untz
+
+ * foundation.gnome.org/membership/application.wml: don't initialize
+ the textarea with useless spaces, and get the POST variables ASAP.
+
2003-11-11 Vincent Untz
* foundation.gnome.org/membership/application.wml: obfuscate a bit the
diff --git a/foundation.gnome.org/membership/application.wml b/foundation.gnome.org/membership/application.wml
index e6c9eeb..8c2b18d 100644
--- a/foundation.gnome.org/membership/application.wml
+++ b/foundation.gnome.org/membership/application.wml
@@ -13,37 +13,44 @@
$bad_elements = array();
$errors = array();
- if ($_POST['submit']) {
+ $submit = $_POST['submit'];
+ $name = $_POST['name'];
+ $email = $_POST['email'];
+ $summary = $_POST['summary'];
+ $details = $_POST['details'];
+ $contacts = $_POST['contacts'];
+ $comments = $_POST['comments'];
+ $ircnick = $_POST['ircnick'];
+ $cvsuser = $_POST['cvsuser'];
+ $previousmember = $_POST['previousmember'];
+
+ if ($submit) {
/* remove the slashes */
- $name = stripslashes($_POST['name']);
- $email = stripslashes($_POST['email']);
- $summary = stripslashes($_POST['summary']);
- $details = stripslashes($_POST['details']);
- $contacts = stripslashes($_POST['contacts']);
- $comments = stripslashes($_POST['comments']);
+ $name = trim(stripslashes($name));
+ $email = trim(stripslashes($email));
+ $summary = trim(stripslashes($summary));
+ $details = trim(stripslashes($details));
+ $contacts = trim(stripslashes($contacts));
+ $comments = trim(stripslashes($comments));
- $ircnick = $_POST['ircnick'];
- $cvsuser = $_POST['cvsuser'];
- $previousmember = $_POST['previousmember'];
-
- if (!$name || trim($name) == "") {
+ if (!$name || $name == "") {
$bad_elements[] = "name";
$errors[] = "Please enter your name.";
}
- if (!$email || !ereg("^[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+\.[a-zA-Z]+$", trim($email))) {
+ if (!$email || !ereg("^[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+\.[a-zA-Z]+$", $email)) {
$bad_elements[] = "email";
$errors[] = "Please enter an email address we can use to contact you.";
}
$obfuscated_email = preg_replace("/@/", " AT ", $email);
- if (!$summary || trim($summary) == "") {
+ if (!$summary || $summary == "") {
$bad_elements[] = "summary";
$errors[] = "Please enter a list of areas of GNOME to which you have made a non-trivial contribution.";
- } else if (!$details || trim($details) == "") {
+ } else if (!$details || $details == "") {
$bad_elements[] = "details";
$errors[] = "Please enter a more detailed description of your contributions.";
}
- if (!$contacts || trim($contacts) == "") {
+ if (!$contacts || $contacts == "") {
$bad_elements[] = "contacts";
$errors[] = "Please enter a list of individuals who can confirm your contributions or indicate us how the membership committee can verify your contributions.";
}
@@ -111,7 +118,7 @@
}
}
- if (! $_POST['submit'] || count($bad_elements) != 0) { ?>
+ if (! $submit || count($bad_elements) != 0) { ?>
To apply for membership in the GNOME Foundation, please complete the
@@ -204,9 +211,7 @@
For example, "Documentation, gnomecal, Debian packaging.":
-
+
Please provide a more detailed description of your contributions to
@@ -218,9 +223,7 @@
for Debian.":
-
+
Please list individuals (frequently, but not necessarily, project
@@ -234,9 +237,7 @@
maintainer); packaging logs at http://www.debian.org/packages/gnome/":
-
+
Other Comments
@@ -245,9 +246,7 @@
believe the committee should consider while reviewing your application:
-
+