Removes issues once a profile has been validated.
authorStéphane Jacob <sj@m4x.org>
Fri, 15 Oct 2010 13:47:26 +0000 (15:47 +0200)
committerStéphane Jacob <sj@m4x.org>
Fri, 15 Oct 2010 13:47:26 +0000 (15:47 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/profile/page.inc.php

index aad3b96..252b3a6 100644 (file)
@@ -394,6 +394,16 @@ abstract class ProfilePage implements PlWizardPage
                 }
                 $this->markChange();
             }
+            // XXX: removes this code once all merge related issues have been fixed.
+            static $issues = array(0 => array('name', 'promo', 'phone', 'education'), 1 => array('address'), 2 => array('job'));
+            if (isset($issues[Post::i('valid_page')])) {
+                foreach ($issue as $issues[Post::i('valid_page')]) {
+                    XDB::execute("UPDATE  profile_merge_issues
+                                     SET  issues = REPLACE(issues, {?}, '')
+                                   WHERE  pid = {?}",
+                                 $issue, $this->pid());
+                }
+            }
             return Post::has('next_page') ? PlWizard::NEXT_PAGE : PlWizard::CURRENT_PAGE;
         }
         $text = "Certains champs n'ont pas pu être validés, merci de corriger les informations "