#419, cacher certaines validations
[platal.git] / modules / marketing.php
index 1046574..68541b0 100644 (file)
@@ -122,9 +122,9 @@ class MarketingModule extends PLModule
 
         if ($action == 'relforce') {
             require_once('marketing.inc.php');
-            mark_send_mail($uid, $value, Post::get('from'), Post::get('to'),
-                           Post::get('title'), Post::get('message'));
-            $page->trig("Mail envoyé");
+            mark_send_mail($uid, $value, Post::v('from'), Post::v('to'),
+                           Post::v('title'), Post::v('message'));
+            $page->trig("Mail envoyé");
         }
 
         if ($action == 'insrel') {
@@ -139,7 +139,7 @@ class MarketingModule extends PLModule
                 "INSERT INTO register_marketing
                          SET uid = {?}, sender = {?}, email = {?},
                              date = NOW(), type = {?}",
-                $uid, Session::get('uid'), Post::get('email'), Post::get('type')); 
+                $uid, S::v('uid'), Post::v('email'), Post::v('type')); 
         }
 
         $res = XDB::iterator(
@@ -163,7 +163,7 @@ class MarketingModule extends PLModule
         $page->changeTpl('marketing/promo.tpl');
 
         if (is_null($promo)) {
-            $promo = Session::getInt('promo');
+            $promo = S::v('promo');
         }
         $page->assign('promo', $promo);
 
@@ -197,7 +197,7 @@ class MarketingModule extends PLModule
             if (Post::has('valide')) {
                 require_once('xorg.misc.inc.php');
 
-                $email = trim(Post::get('mail'));
+                $email = trim(Post::v('mail'));
                 $res   = XDB::query('SELECT COUNT(*) FROM register_marketing
                                                 WHERE uid={?} AND email={?}', $uid, $email);
 
@@ -210,10 +210,10 @@ class MarketingModule extends PLModule
                     XDB::execute(
                             "INSERT INTO  register_marketing (uid,sender,email,date,last,nb,type,hash)
                                   VALUES  ({?}, {?}, {?}, NOW(), 0, 0, {?}, '')",
-                            $uid, Session::getInt('uid'), $email, Post::get('origine'));
+                            $uid, S::v('uid'), $email, Post::v('origine'));
                     require_once('validations.inc.php');
-                    $req = new MarkReq(Session::getInt('uid'), $uid, $email,
-                                       Post::get('origine')=='user');
+                    $req = new MarkReq(S::v('uid'), $uid, $email,
+                                       Post::v('origine')=='user');
                     $req->submit();
                 }
             }
@@ -271,7 +271,7 @@ class MarketingModule extends PLModule
             $sent  = Array();
             foreach (array_keys($_POST['relance']) as $uid) {
                 if ($tmp = relance($uid, $nbdix)) {
-                    $sent[] = $tmp.' a été relancé';
+                    $sent[] = $tmp.' a été relancé';
                 }
             }
             $page->assign('sent', $sent);