Better RFC compliance for the email combobox.
authorStéphane Jacob <jacou@melix.net>
Tue, 22 Jul 2008 09:38:02 +0000 (11:38 +0200)
committerStéphane Jacob <jacou@melix.net>
Tue, 22 Jul 2008 09:38:02 +0000 (11:38 +0200)
modules/email.php
modules/profile/general.inc.php
modules/profile/jobs.inc.php
templates/include/emails.combobox.tpl

index 32b8692..a4fb239 100644 (file)
@@ -240,7 +240,7 @@ class EmailModule extends PLModule
             print_r(Env::v('emails_rewrite'));
             if (Env::v('emailop') == "ajouter" && Env::has('email')) {
                 $new_email = Env::v('email');
-                if ($new_email == "new@new.new") {
+                if ($new_email == "new@example.org") {
                     $new_email = Env::v('email_new');
                 }
                 $retour = $redirect->add_email($new_email);
index 335a854..3c9d271 100644 (file)
@@ -123,7 +123,7 @@ class ProfileEmailDirectory implements ProfileSetting
         $success = true;
         if (!is_null($value)) {
             $email_stripped = strtolower(trim($value));
-            if ((!isvalid_email($email_stripped)) && ($email_stripped) && ($p->values['email_directory'] == "new@new.new")) {
+            if ((!isvalid_email($email_stripped)) && ($email_stripped) && ($p->values['email_directory'] == "new@example.org")) {
                 $page->assign('email_error', '1');
                 $page->assign('email_directory_error', $email_stripped);
                 $page->trigError('Adresse Email invalide');
@@ -359,7 +359,7 @@ class ProfileGeneral extends ProfilePage
                          $this->values['synchro_ax'], S::v('uid'));
         }
         if ($this->changed['email_directory']) {
-            $new_email = ($this->values['email_directory'] == "new@new.new") ?
+            $new_email = ($this->values['email_directory'] == "new@example.org") ?
                 $this->values['email_directory_new'] : $this->values['email_directory'];
             if ($new_email == "") {
                 $new_email = NULL;
index 652181d..33a3b09 100644 (file)
@@ -49,7 +49,7 @@ class ProfileJob extends ProfileGeoloc
             $chk =& $this->$obj;
             foreach ($fields as $field) {
                 if ($field == "email_new") {
-                    if ($job['email'] == "new@new.new") {
+                    if ($job['email'] == "new@example.org") {
                         $job['email'] = $job[$field];
                     }
                     continue;
@@ -112,7 +112,7 @@ class ProfileJob extends ProfileGeoloc
                      S::i('uid'));
         $i = 0;
         foreach ($value as $jobid=>&$job) {
-            if ($job['email'] == "new@new.new") {
+            if ($job['email'] == "new@example.org") {
                 $job['email'] = $job['email_new'];
             }
             XDB::execute("INSERT INTO  entreprises (uid, entrid, entreprise, secteur, ss_secteur,
index b53b494..c5cce09 100644 (file)
@@ -71,7 +71,7 @@
         </optgroup>
       {/if}
       <optgroup label="Autres choix">
-        <option value="new@new.new" {if $error}selected="selected"{/if}>Utiliser une autre adresse email</option>
+        <option value="new@example.org" {if $error}selected="selected"{/if}>Utiliser une autre adresse email</option>
         <option value="" {if (($val eq '') && (!$error))}selected="selected"{/if}>{if
         $name neq "email"}Ne pas mettre d'adresse email{else}&nbsp;{/if}</option>
       </optgroup>
@@ -94,7 +94,7 @@
       $(function() {
         $("select#combobox").change(function() {
           $(".new").hide();
-          if ($("select#combobox").val() == "new@new.new") {
+          if ($("select#combobox").val() == "new@example.org") {
             $(".new").show();
           }
         }).change();