marketing : litte bugfix, and bestalias rather than forlife
authorRaphael Marichez <falco@m4x.org>
Fri, 17 Dec 2004 21:23:44 +0000 (21:23 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:26:44 +0000 (23:26 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-107

include/select_user.inc.php
templates/marketing/utilisateurs_form.tpl

index 0bcc6bb..6ce6e3c 100644 (file)
@@ -36,14 +36,14 @@ if (!Env::has("xmat") || !Env::has("submit")) {
        $chaine2 = strtok(" -'");
         $chaine  = ( strlen($chaine2) > strlen($chaine1) ) ? $chaine2 : $chaine1;
 
-        $rq = strlen(Env::get("promoR")==4 ? "AND promo=".Env::getInt("promoR") : "";
+        $rq = strlen(Env::get("promoR")==4 ? "AND promo=".Env::getInt("promoR") : "");
 
        $where = "prenom LIKE '%$prenom%' AND nom LIKE '%$chaine%' $rq ORDER BY promo,nom";
     }
 
     $sql = "SELECT  matricule,matricule_ax,promo,nom,prenom,comment,appli,flags,last_known_email,deces,user_id
               FROM  auth_user_md5
-             WHERE  perms IN ('admin','user') AND deces=0 AND $where";
+             WHERE  perms NOT IN ('admin','user') AND deces=0 AND $where";
 
     new_admin_page('marketing/utilisateurs_select.tpl');
     $page->mysql_assign($sql, 'nonins');
index 6bf9eb4..abe9a6d 100644 (file)
@@ -67,7 +67,7 @@ calcul&eacute; &agrave; partir de ces donn
       </td>
       <td>
         <input type="text" size="40" maxlength="60" name="from"
-        value="{$smarty.request.from|default:"`$smarty.session.forlife`@polytechnique.org"}" />
+        value="{$smarty.request.from|default:"`$smarty.session.bestalias`@polytechnique.org"}" />
       </td>
     </tr>
     <tr>