Converts the test_email smarty plugin to hruid.
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Sun, 24 Aug 2008 18:32:02 +0000 (20:32 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Sun, 24 Aug 2008 18:32:02 +0000 (20:32 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
plugins/function.test_email.php
templates/admin/utilisateurs.tpl

index ebdce6e..932c998 100644 (file)
 
 function smarty_function_test_email($params, &$smarty) {
     $label = isset($params['title']) ? $params['title'] : 'Envoyer un email de test';
-    $token = "'" . S::v('xsrf_token') . (isset($params['forlife']) ? "', " : "'");
-    $forlife = isset($params['forlife']) ? "'" . $params['forlife'] . "'" : '';
+    $token = "'" . S::v('xsrf_token') . (isset($params['hruid']) ? "', " : "'");
+    $hruid = isset($params['hruid']) ? "'" . $params['hruid'] . "'" : '';
     return '<div class="center">'
          . '  <div id="mail_sent" style="position: absolute;"></div><br />'
-         . '  <form action="emails/test" method="get" onsubmit="return sendTestEmail(' . $token . $forlife . ')">'
+         . '  <form action="emails/test" method="get" onsubmit="return sendTestEmail(' . $token . $hruid . ')">'
          . '    <input type="hidden" name="token" value="' . S::v('xsrf_token') . '" />'
          . '    <div><input type="submit" name="send" value="' . $label . '" /></div>'
          . '  </form>'
index 67fdaa9..924ed8f 100644 (file)
@@ -375,7 +375,7 @@ Pour ceci changer ses permissions en 'disabled'.
 </form>
 
 {javascript name="ajax"}
-{test_email forlife=$user->forlifeEmail()}
+{test_email hruid=$user->login()}
 
 <form id="fwds" method="post" action="admin/user#fwds">
   {xsrf_token_field}