Shows a confirmation message when the profile is modified (Closes #970).
[platal.git] / modules / profile / page.inc.php
index 433947e..3b0c9ca 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -253,7 +253,6 @@ abstract class ProfilePage implements PlWizardPage
             register_watch_op(S::i('uid'), WATCH_FICHE);
         }
         global $platal;
-        $log =& $_SESSION['log'];
         S::logger()->log('profil', $platal->pl_self(1));
     }
 
@@ -301,7 +300,7 @@ abstract class ProfilePage implements PlWizardPage
         $page->assign('errors', $this->errors);
     }
 
-    public function process()
+    public function process(&$global_success)
     {
         $global_success = true;
         $this->fetchData();
@@ -324,9 +323,14 @@ abstract class ProfilePage implements PlWizardPage
             return Post::has('next_page') ? PlWizard::NEXT_PAGE : PlWizard::CURRENT_PAGE;
         }
         Platal::page()->trigError("Certains champs n'ont pas pu être validés, merci de corriger les informations "
-                                . "de ton profil et de revalider ta demande");
+                                . "de ton profil et de revalider ta demande.");
         return PlWizard::CURRENT_PAGE;
     }
+
+    public function success()
+    {
+        return 'Ton profil a bien été mis à jour.';
+    }
 }
 
 require_once dirname(__FILE__) . '/general.inc.php';