#688: Use nom_usage if available in emails/send
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 23 Jun 2007 08:28:14 +0000 (08:28 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 23 Jun 2007 08:28:14 +0000 (08:28 +0000)
 ChangeLog                            |    3 +++
 include/validations/aliases.inc.php  |    2 +-
 include/validations/nomusage.inc.php |    2 +-
 include/xorg/session.inc.php         |    2 +-
 templates/emails/send.tpl            |    2 +-
 5 files changed, 7 insertions(+), 4 deletions(-)

git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1864 839d8a87-29fc-0310-9880-83ba4fa771e5

ChangeLog
include/validations/aliases.inc.php
include/validations/nomusage.inc.php
include/xorg/session.inc.php
templates/emails/send.tpl

index 6c93e97..3ebad65 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@ Bug/Wish:
         - #674: MiniWiki xhtml validation                                  -FRU
         - #678: PlUpload filename detection                                -FRU
 
+    * Emails:
+        - #688: From name in the sending form                              -FRU
+
     * Profile:
         - Fix GoogleMaps links                                             -FRU
         - #663: Link to Xnet's map from the "My groups" page               -FRU
index 2e8c948..c89e48d 100644 (file)
@@ -115,7 +115,7 @@ class AliasReq extends Validate
     public function commit ()
     {
         XDB::execute("UPDATE auth_user_quick SET emails_alias_pub = {?} WHERE user_id = {?}",
-                     $this->public, $this->uid)) {
+                     $this->public, $this->uid);
 
         if ($this->old) {
             return XDB::execute('UPDATE virtual SET alias={?} WHERE alias={?}',
index fd24c7d..cdfa4ee 100644 (file)
@@ -89,7 +89,7 @@ class UsageReq extends Validate
             if ($this->oldalias) {
                 $res .= "\n\n  Les alias {$this->oldalias}@{$globals->mail->domain} et @{$globals->mail->domain2} ont été supprimés.";
             }
-            if ($nom_usage) {
+            if ($this->nom_usage) {
                 $res .= "\n\n  Les alias {$this->alias}@{$globals->mail->domain} et @{$globals->mail->domain2} sont maintenant à ta disposition !";
             }
             return $res;
index f3582ce..d98f08e 100644 (file)
@@ -239,7 +239,7 @@ function try_cookie()
 function start_connexion ($uid, $identified)
 {
     $res  = XDB::query("
-        SELECT  u.user_id AS uid, prenom, nom, perms, promo, matricule, password, FIND_IN_SET('femme', u.flags) AS femme,
+        SELECT  u.user_id AS uid, prenom, nom, nom_usage, perms, promo, matricule, password, FIND_IN_SET('femme', u.flags) AS femme,
                 UNIX_TIMESTAMP(s.start) AS lastlogin, s.host, a.alias AS forlife, a2.alias AS bestalias,
                 q.core_mail_fmt AS mail_fmt, UNIX_TIMESTAMP(q.banana_last) AS banana_last, q.watch_last, q.core_rss_hash,
                 FIND_IN_SET('watch', u.flags) AS watch_account, q.last_version
index f5f2646..4165d11 100644 (file)
         <input type='text' name='from' size='60' value='{if $smarty.request.from}
 {$smarty.request.from}
 {else}
-"{$smarty.session.prenom} {$smarty.session.nom}" &lt;{$smarty.session.bestalias}@{#globals.mail.domain#}&gt;
+"{$smarty.session.prenom} {$smarty.session.nom_usage|default:$smarty.session.nom}" &lt;{$smarty.session.bestalias}@{#globals.mail.domain#}&gt;
 {/if}' />
       </td>
     </tr>