aboutsummaryrefslogtreecommitdiffstats
path: root/password.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-01-31 23:38:48 +0000
committerrub <rub@piwigo.org>2006-01-31 23:38:48 +0000
commit81bdfbf7b410192591e72619c8f1aaed28c7bfee (patch)
tree769d3a3cba3690d68f52a35f808588258a487206 /password.php
parenta4d50dabf8d6a9edc8922689c65d40a9ba8e661c (diff)
[NBM] Step 1: Create new include files with current notification/mail fonctions (with improvement)
git-svn-id: http://piwigo.org/svn/trunk@1018 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--password.php36
1 files changed, 3 insertions, 33 deletions
diff --git a/password.php b/password.php
index 9e0ad4029..87a568f3c 100644
--- a/password.php
+++ b/password.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
// | file : $RCSfile$
@@ -31,37 +31,7 @@
define('PHPWG_ROOT_PATH','./');
include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-/**
- * sends an email, using PhpWebGallery specific informations
- */
-function pwg_mail($to, $from, $infos = '')
-{
- global $conf;
-
- $headers = 'From: <'.$from.'>'."\n";
- $headers.= 'Reply-To: '.$from."\n";
-
- $options = '-f '.$from;
-
- $subject = l10n('password updated');
-
- $content = $infos;
- $content.= "\n\n-- \nPhpWebGallery ".PHPWG_VERSION;
-
- if ($conf['mail_options'])
- {
- return mail($to, $subject, $content, $headers, $options);
- }
- else
- {
- return mail($to, $subject, $content, $headers);
- }
-}
+include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
// +-----------------------------------------------------------------------+
// | send a new password |
@@ -118,7 +88,7 @@ SELECT '.$conf['user_fields']['id'].' AS id
."\n".l10n('Password').': '.$new_password
;
- if (pwg_mail($row['email'], $mail_webmaster, $infos))
+ if (pwg_mail($row['email'], $mail_webmaster, l10n('password updated'), $infos))
{
$data =
array(