Merge commit 'origin/fusionax' into account
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 30 Dec 2008 22:33:45 +0000 (23:33 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 30 Dec 2008 22:33:45 +0000 (23:33 +0100)
Conflicts:

classes/user.php

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
htdocs/css/keynote.css
htdocs/css/openweb.css
include/marketing.inc.php
include/user.func.inc.php
modules/marketing.php

index 16febdf..9f33b87 100644 (file)
@@ -247,6 +247,18 @@ th.grayed {
     font-style: italic;
 }
 
+div.titre {
+    color: #000000;
+    background: inherit;
+    font-weight: bold;
+}
+
+span.titre {
+    color: #000000;
+    background: inherit;
+    font-weight: bold;
+}
+
 /*******************************************************************************
     4   Tableau de choix de skins
         [ Styles pour les tableaux de types de ceux des skins ]
index e1654e2..d591728 100644 (file)
@@ -215,6 +215,18 @@ td.action {
 }
 td.action a { padding: 0px 2px; }
 
+div.titre {
+    color: #000000;
+    background: inherit;
+    font-weight: bold;
+}
+
+span.titre {
+    color: #000000;
+    background: inherit;
+    font-weight: bold;
+}
+
 /*******************************************************************************
     4   Tableau de choix de skins
         [ Styles pour les tableaux de types de ceux des skins ]
index 785335a..18a8edc 100644 (file)
@@ -197,7 +197,9 @@ class Marketing
         $res = XDB::query("SELECT  r.date, u.promo, u.nom, u.prenom, r.email, r.bestalias
                              FROM  register_pending AS r
                        INNER JOIN  auth_user_md5    AS u ON u.user_id = r.uid
-                            WHERE  hash!='INSCRIT' AND uid={?} AND TO_DAYS(relance) < TO_DAYS(NOW())", $uid);
+                            WHERE  hash != 'INSCRIT' AND uid = {?} AND
+                                   (TO_DAYS(relance) IS NULL OR TO_DAYS(relance) < TO_DAYS(NOW()))",
+                          $uid);
         if (!list($date, $promo, $nom, $prenom, $email, $alias) = $res->fetchOneRow()) {
             return false;
         }
@@ -219,7 +221,7 @@ class Marketing
         $mymail->send();
         XDB::execute('UPDATE  register_pending
                          SET  hash={?}, password={?}, relance=NOW()
-                       WHERE uid={?}', $hash, $pass_encrypted, $uid);
+                       WHERE  uid={?}', $hash, $pass_encrypted, $uid);
         return "$prenom $nom ($promo)";
     }
 }
index 1f250f9..916378b 100644 (file)
@@ -599,8 +599,10 @@ function set_user_details_addresses($uid, $adrs) {
         $adrid = 0;
     }
     foreach ($adrs as $adr) {
-        add_user_address($uid, $adrid, $adr);
-        ++$adrid;
+        if (!@$adr['remove']) {
+            add_user_address($uid, $adrid, $adr);
+            ++$adrid;
+        }
     }
     require_once 'geoloc.inc.php';
     localize_addresses($uid);
@@ -618,8 +620,10 @@ function set_user_details_pro($uid, $pros)
         $entrid = 0;
     }
     foreach ($pros as $pro) {
-        add_user_pro($uid, $entrid, $pro);
-        ++$entrid;
+        if (!@$pro['remove']) {
+            add_user_pro($uid, $entrid, $pro);
+            ++$entrid;
+        }
     }
 }
 
index f6ac4fb..b620e78 100644 (file)
@@ -346,7 +346,7 @@ class MarketingModule extends PLModule
             $sent  = Array();
             foreach (array_keys($_POST['relance']) as $uid) {
                 if ($tmp = Marketing::relance($uid, $nbdix)) {
-                    $sent[] = $tmp.' a été relancé';
+                    $sent[] = $tmp . ' a été relancé.';
                 }
             }
             $page->assign('sent', $sent);