From 143a7d73284099c5387557b05aa67cb1470427c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 8 Jun 2015 17:13:23 +0200 Subject: [PATCH] Use rfc6761 example.com domain instead of domain.com in examples Fix #2988 --- htdocs/core/class/CMailFile.class.php | 4 ++-- htdocs/core/class/conf.class.php | 2 +- htdocs/core/lib/admin.lib.php | 10 +++++----- htdocs/core/lib/functions.lib.php | 6 +++--- htdocs/core/lib/functions2.lib.php | 6 +++--- htdocs/core/modules/mailings/example.modules.php | 2 +- htdocs/core/modules/modMailmanSpip.class.php | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 6e41384dbce..1aadc47b79e 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -37,7 +37,7 @@ class CMailFile { var $subject; // Topic: Subject of email - var $addr_from; // From: Label and EMail of sender (must include '<>'). For example '' or 'John Doe ' or '') + var $addr_from; // From: Label and EMail of sender (must include '<>'). For example '' or 'John Doe ' or '') // Sender: Who send the email ("Sender" has sent emails on behalf of "From"). // Use it when the "From" is an email of a domain that is a SPF protected domain, and sending smtp server is not this domain. In such case, use for Sender an email of the protected domain. // Return-Path: Email where to send bounds. @@ -387,7 +387,7 @@ class CMailFile // If Windows, sendmail_from must be defined if (isset($_SERVER["WINDIR"])) { - if (empty($this->addr_from)) $this->addr_from = 'robot@mydomain.com'; + if (empty($this->addr_from)) $this->addr_from = 'robot@example.com'; @ini_set('sendmail_from',$this->getValidAddress($this->addr_from,2)); } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 6370062a6a9..13d2881563f 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -404,7 +404,7 @@ class Conf $this->css = "/theme/".$this->theme."/style.css.php"; // conf->email_from = email pour envoi par dolibarr des mails automatiques - $this->email_from = "robot@domain.com"; + $this->email_from = "robot@example.com"; if (! empty($this->global->MAIN_MAIL_EMAIL_FROM)) $this->email_from = $this->global->MAIN_MAIL_EMAIL_FROM; // conf->notification->email_from = email pour envoi par Dolibarr des notifications diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 3a35c961905..05204885c9c 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1084,18 +1084,18 @@ function form_constantes($tableau,$strictw3c=0) if ($const == 'ADHERENT_MAILMAN_URL') { print '. '.$langs->trans("Example").': '.img_down().'
'; - //print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&subscribees=%EMAIL%&send_welcome_msg_to_this_batch=1'; + //print 'http://lists.exampe.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&subscribees=%EMAIL%&send_welcome_msg_to_this_batch=1'; print ''; } if ($const == 'ADHERENT_MAILMAN_UNSUB_URL') { print '. '.$langs->trans("Example").': '.img_down().'
'; print ''; - //print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%'; + //print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%'; } if ($const == 'ADHERENT_MAILMAN_LISTS') { @@ -1106,7 +1106,7 @@ function form_constantes($tableau,$strictw3c=0) print 'TYPE:Type1:mymailmanlist1,TYPE:Type2:mymailmanlist2
'; if ($conf->categorie->enabled) print 'CATEG:Categ1:mymailmanlist1,CATEG:Categ2:mymailmanlist2
'; print ''; - //print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%'; + //print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%'; } print "\n"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b1869491a34..35b6e8565c4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1645,7 +1645,7 @@ function dol_print_address($address, $htmlid, $mode, $id) /** * Return true if email syntax is ok * - * @param string $address email (Ex: "toto@titi.com", "John Do ") + * @param string $address email (Ex: "toto@examle.com", "John Do ") * @param int $acceptsupervisorkey If 1, the special string '__SUPERVISOREMAIL__' is also accepted as valid * @return boolean true if email syntax is OK, false if KO or empty string */ @@ -4127,8 +4127,8 @@ function dol_textishtml($msg,$option=0) elseif (preg_match('/<(br|div|font|li|span|strong|table)>/i',$msg)) return true; elseif (preg_match('/<(br|div|font|li|span|strong|table)\s+[^<>\/]*>/i',$msg)) return true; elseif (preg_match('/<(br|div|font|li|span|strong|table)\s+[^<>\/]*\/>/i',$msg)) return true; - elseif (preg_match('/]*src[^<>]*>/i',$msg)) return true; // must accept - elseif (preg_match('/]*href[^<>]*>/i',$msg)) return true; // must accept + elseif (preg_match('/]*src[^<>]*>/i',$msg)) return true; // must accept + elseif (preg_match('/]*href[^<>]*>/i',$msg)) return true; // must accept elseif (preg_match('//i',$msg)) return true; elseif (preg_match('/&[A-Z0-9]{1,6};/i',$msg)) return true; // Html entities names (http://www.w3schools.com/tags/ref_entities.asp) elseif (preg_match('/&#[0-9]{2,3};/i',$msg)) return true; // Html entities numbers (http://www.w3schools.com/tags/ref_entities.asp) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index e06577cf8f5..14e62754c5e 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -394,9 +394,9 @@ function dol_print_object_info($object) /** * Return an email formatted to include a tracking id - * For example myemail@mydomain.com becom myemail+trackingid@mydomain.com + * For example myemail@example.com becom myemail+trackingid@example.com * - * @param string $email Email address (Ex: "toto@titi.com", "John Do ") + * @param string $email Email address (Ex: "toto@example.com", "John Do ") * @param string $trackingid Tracking id (Ex: thi123 for thirdparty with id 123) * @return boolean True if domain email is OK, False if KO */ @@ -409,7 +409,7 @@ function dolAddEmailTrackId($email, $trackingid) /** * Return true if email has a domain name that can't be resolved * - * @param string $mail Email address (Ex: "toto@titi.com", "John Do ") + * @param string $mail Email address (Ex: "toto@example.com", "John Do ") * @return boolean True if domain email is OK, False if KO */ function isValidMailDomain($mail) diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index 428285fb20b..f0f8b99e3c5 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -69,7 +69,7 @@ class mailing_example extends MailingTargets // ... // $target[n]=array('email'=>'email_n','name'=>'name_n','firstname'=>'firstname_n', 'other'=>'other_n'); - // Example: $target[0]=array('email'=>'myemail@mydomain.com', 'name'=>'Doe', 'firstname'=>'John', 'other'=>'Other information'); + // Example: $target[0]=array('email'=>'myemail@example.com', 'name'=>'Doe', 'firstname'=>'John', 'other'=>'Other information'); // ----- Your code end here ----- diff --git a/htdocs/core/modules/modMailmanSpip.class.php b/htdocs/core/modules/modMailmanSpip.class.php index 95a3ecd03c4..1b5bbab61c6 100644 --- a/htdocs/core/modules/modMailmanSpip.class.php +++ b/htdocs/core/modules/modMailmanSpip.class.php @@ -66,8 +66,8 @@ class modMailmanSpip extends DolibarrModules // Constants $this->const = array(); - $this->const[1] = array("ADHERENT_MAILMAN_UNSUB_URL","chaine","http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%","Url de désinscription aux listes mailman"); - $this->const[2] = array("ADHERENT_MAILMAN_URL","chaine","http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%","Url pour les inscriptions mailman"); + $this->const[1] = array("ADHERENT_MAILMAN_UNSUB_URL","chaine","http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%","Url de désinscription aux listes mailman"); + $this->const[2] = array("ADHERENT_MAILMAN_URL","chaine","http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%","Url pour les inscriptions mailman"); $this->const[3] = array("ADHERENT_MAILMAN_LISTS","chaine","","Mailing-list to subscribe new members to"); // Boxes