Commit e2b256dc authored by Dries's avatar Dries

- Patch #18719 by Jose: reworked the 'request new password' functionality.

parent 45c5344f
......@@ -2,6 +2,8 @@ Drupal x.x.x, xxxx-xx-xx (Development version)
------------------------
- added free tagging support (folksonomies).
- added a site-wide contact form.
- reworked the 'request new password' functionality.
- profiles:
* added a block to display author information along with posts.
* added support for private profile fields.
......
......@@ -705,6 +705,7 @@ CREATE TABLE users (
signature varchar(255) NOT NULL default '',
created int(11) NOT NULL default '0',
changed int(11) NOT NULL default '0',
login int(11) NOT NULL default '0',
status tinyint(4) NOT NULL default '0',
timezone varchar(8) default NULL,
language varchar(12) NOT NULL default '',
......
......@@ -702,6 +702,7 @@ CREATE TABLE users (
signature varchar(255) NOT NULL default '',
created integer NOT NULL default '0',
changed integer NOT NULL default '0',
login integer NOT NULL default '0',
status smallint NOT NULL default '0',
timezone varchar(8) default NULL,
language varchar(12) NOT NULL default '',
......
......@@ -109,7 +109,7 @@
"2005-04-10" => "update_130",
"2005-04-11" => "update_131",
"2005-04-14" => "update_132",
"2005-04-20" => "update_133"
"2005-04-24" => "update_133"
);
function update_32() {
......@@ -2407,14 +2407,24 @@ function update_132() {
}
function update_133() {
$ret[] = update_sql("CREATE TABLE contact (
$ret[] = update_sql("CREATE TABLE {contact} (
subject varchar(255) NOT NULL default '',
recipients longtext NOT NULL default '',
reply longtext NOT NULL default ''
)");
if ($GLOBALS['db_type'] == 'mysql') {
$ret[] = update_sql("ALTER TABLE {users} ADD login int(11) NOT NULL default '0'");
}
elseif ($GLOBALS['db_type'] == 'pgsql') {
$ret[] = update_sql("ALTER TABLE {users} ADD login integer");
$ret[] = update_sql("ALTER TABLE {users} ALTER COLUMN login SET NOT NULL");
$ret[] = update_sql("ALTER TABLE {users} ALTER COLUMN login SET DEFAULT '0'");
}
return $ret;
}
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);
......
......@@ -224,7 +224,7 @@ function contact_mail_page() {
if (isset($_POST['edit'])) {
$edit = $_POST['edit'];
}
if ($edit) {
// Validate the fields:
if (!$edit['name']) {
......@@ -236,11 +236,11 @@ function contact_mail_page() {
if (!$edit['message']) {
form_set_error('message', t('You must enter a message.'));
}
if (!form_get_errors()) {
// Prepare the sender:
$from = $edit['mail'];
// Compose the body:
$message[] = t("%name sent a message using the contact form at %form:", array('%name' => $edit['name'], '%form' => url($_GET['q'], NULL, NULL, TRUE)));
$message[] = $edit['message'];
......@@ -282,7 +282,7 @@ function contact_mail_page() {
$edit['name'] = $user->name;
$edit['mail'] = $user->mail;
}
$result = db_query('SELECT subject FROM contact ORDER BY subject');
while ($subject = db_fetch_object($result)) {
$subjects[$subject->subject] = $subject->subject;
......
......@@ -224,7 +224,7 @@ function contact_mail_page() {
if (isset($_POST['edit'])) {
$edit = $_POST['edit'];
}
if ($edit) {
// Validate the fields:
if (!$edit['name']) {
......@@ -236,11 +236,11 @@ function contact_mail_page() {
if (!$edit['message']) {
form_set_error('message', t('You must enter a message.'));
}
if (!form_get_errors()) {
// Prepare the sender:
$from = $edit['mail'];
// Compose the body:
$message[] = t("%name sent a message using the contact form at %form:", array('%name' => $edit['name'], '%form' => url($_GET['q'], NULL, NULL, TRUE)));
$message[] = $edit['message'];
......@@ -282,7 +282,7 @@ function contact_mail_page() {
$edit['name'] = $user->name;
$edit['mail'] = $user->mail;
}
$result = db_query('SELECT subject FROM contact ORDER BY subject');
while ($subject = db_fetch_object($result)) {
$subjects[$subject->subject] = $subject->subject;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment