diff options
| author | fisharebest <fisharebest@gmail.com> | 2011-12-08 20:36:46 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2011-12-08 20:36:46 +0000 |
| commit | 10eab7014f9c8ee49d66de8ed936cf9cef888f20 (patch) | |
| tree | a98f5d44d081851a3e4682a32c2c949a4d766b03 | |
| parent | 7f698d9b8a8f261990752d261463ed2fdf4b7689 (diff) | |
| download | webtrees-10eab7014f9c8ee49d66de8ed936cf9cef888f20.tar.gz webtrees-10eab7014f9c8ee49d66de8ed936cf9cef888f20.tar.bz2 webtrees-10eab7014f9c8ee49d66de8ed936cf9cef888f20.zip | |
#899773 - Admin mail config help messages wrong
Remove "simple mail headers" option.
| -rw-r--r-- | admin_pgv_to_wt.php | 1 | ||||
| -rw-r--r-- | help_text.php | 15 | ||||
| -rw-r--r-- | includes/authentication.php | 12 | ||||
| -rw-r--r-- | includes/functions/functions_mail.php | 14 | ||||
| -rw-r--r-- | includes/old_messages.php | 7 | ||||
| -rw-r--r-- | save.php | 1 | ||||
| -rw-r--r-- | setup.php | 16 |
7 files changed, 23 insertions, 43 deletions
diff --git a/admin_pgv_to_wt.php b/admin_pgv_to_wt.php index 371b32a565..af16911851 100644 --- a/admin_pgv_to_wt.php +++ b/admin_pgv_to_wt.php @@ -177,7 +177,6 @@ if (ini_get('output_buffering')) { } // TODO May need to set 'DATA_DIRECTORY' to $INDEX_DIRECTORY when dealing with media?? @set_site_setting('STORE_MESSAGES', $PGV_STORE_MESSAGES); -@set_site_setting('SMTP_SIMPLE_MAIL', $PGV_SIMPLE_MAIL); @set_site_setting('USE_REGISTRATION_MODULE', $USE_REGISTRATION_MODULE); @set_site_setting('REQUIRE_ADMIN_AUTH_REGISTRATION', $REQUIRE_ADMIN_AUTH_REGISTRATION); @set_site_setting('ALLOW_USER_THEMES', $ALLOW_USER_THEMES); diff --git a/help_text.php b/help_text.php index e14d409283..e01a5a65f4 100644 --- a/help_text.php +++ b/help_text.php @@ -1671,13 +1671,15 @@ case 'SMTP_AUTH': break; case 'SMTP_FROM_NAME': - $title=WT_I18N::translate('Sender name'); - $text=WT_I18N::translate('Enter the name to be used in the «From:» field of e-mails originating at this site.<br /><br />For example, if your name is <b>John Smith</b> and you are the site administrator for a site that is known as <b>Jones Genealogy</b>, you could enter something like <b>John Smith</b> or <b>Jones Genealogy</b> or even <b>John Smith, Administrator: Jones Genealogy</b>. You may enter whatever you wish, but HTML is not permitted.'); + $title=WT_I18N::translate('From email address'); + // This text also exists in setup.php + $text=WT_I18N::translate('This is used in the "From:" header when sending mails.'); break; case 'SMTP_HELO': - $title=WT_I18N::translate('Sending domain name'); - $text=WT_I18N::translate('This is the domain part of a valid e-mail address on the SMTP server.<br /><br />For example, if you have an e-mail account such as <b>yourname@abc.xyz.com</b>, you would enter <b>abc.xyz.com</b> here.'); + $title=WT_I18N::translate('Sender email address'); + // This text also exists in setup.php + $text=WT_I18N::translate('This is used in the "Sender:" header when sending mails. It is often the same as the "From:" header.'); break; case 'SMTP_HOST': @@ -1690,11 +1692,6 @@ case 'SMTP_PORT': $text=WT_I18N::translate('The port number to be used for connections to the SMTP server. Generally, this is port <b>25</b>.'); break; -case 'SMTP_SIMPLE_MAIL': - $title=WT_I18N::translate('Use simple mail headers in external mails'); - $text=WT_I18N::translate('In normal mail headers for external mails, the email address as well as the name are used. Some mail systems will not accept this. When set to <b>Yes</b>, only the email address will be used.'); - break; - case 'SMTP_SSL': $title=WT_I18N::translate('Secure connection'); $text=WT_I18N::translate('Transport Layer Security (TLS) and Secure Sockets Layer (SSL) are Internet data encryption protocols.<br /><br />TLS 1.0, 1.1 and 1.2 are standardized developments of SSL 3.0. TLS 1.0 and SSL 3.1 are equivalent. Further work on SSL is now done under the new name, TLS.<br /><br />If your SMTP Server requires the SSL protocol during login, you should select the <b>SSL</b> option. If your SMTP Server requires the TLS protocol during login, you should select the <b>TLS</b> option.'); diff --git a/includes/authentication.php b/includes/authentication.php index a712695962..f295188f61 100644 --- a/includes/authentication.php +++ b/includes/authentication.php @@ -325,11 +325,7 @@ function addMessage($message) { $fromFullName = $message['from']; } else { $fromFullName = getUserFullName($user_id_from); - if (!get_site_setting('SMTP_SIMPLE_MAIL')) { - $from = hex4email($fromFullName, 'UTF-8')." <".getUserEmail($user_id_from).">"; - } else { - $from = getUserEmail($user_id_from); - } + $from = hex4email($fromFullName, 'UTF-8')." <".getUserEmail($user_id_from).">"; $toFullName=getUserFullName($user_id_to); $copy_email = WT_I18N::translate('You sent the following message to a webtrees user:').' '.$toFullName."\r\n\r\n".$copy_email; @@ -393,11 +389,7 @@ function addMessage($message) { $oryginal_email .= $fromFullName."\r\n\r\n".$message['body']; } $toFullName=getUserFullName($user_id_to); - if (!get_site_setting('SMTP_SIMPLE_MAIL')) { - $to = hex4email($toFullName, 'UTF-8'). " <".getUserEmail($user_id_to).">"; - } else { - $to = getUserEmail($user_id_to); - } + $to = hex4email($toFullName, 'UTF-8'). " <".getUserEmail($user_id_to).">"; if (getUserEmail($user_id_to)) { // send the original message if (!webtreesMail($to, $from, $oryginal_subject, $oryginal_email)) { diff --git a/includes/functions/functions_mail.php b/includes/functions/functions_mail.php index ac4717d5b2..b92d64e7b8 100644 --- a/includes/functions/functions_mail.php +++ b/includes/functions/functions_mail.php @@ -139,14 +139,12 @@ function webtreesMail($to, $from, $subject, $message) { $mail_object->SMTPSecure = 'tls'; } $from_name = ''; - if (!get_site_setting('SMTP_SIMPLE_MAIL')) { - preg_match('/<(.*)>/', $to, $matches); - if (isset($matches[1])) $to = $matches[1]; - preg_match('/<(.*)>/', $from, $matches); - if (isset($matches[1])) { - if (($pos = strpos($from, '<')) !== false) $from_name = substr($from, 0, $pos); - $from = $matches[1]; - } + preg_match('/<(.*)>/', $to, $matches); + if (isset($matches[1])) $to = $matches[1]; + preg_match('/<(.*)>/', $from, $matches); + if (isset($matches[1])) { + if (($pos = strpos($from, '<')) !== false) $from_name = substr($from, 0, $pos); + $from = $matches[1]; } $mail_object->SetFrom($from, $from_name); if ((!empty($SMTP_FROM_NAME) && $from!=$SMTP_AUTH_USER) || !empty($from_name)) { diff --git a/includes/old_messages.php b/includes/old_messages.php index 87a6077414..cad3c89c4e 100644 --- a/includes/old_messages.php +++ b/includes/old_messages.php @@ -34,13 +34,20 @@ exit; // MESSAGES DELETED IN WEBTREES-1.2.6 /* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('A pedigree is an enumeration of all ancestors of the starting person. Users who are not logged in see the pedigree of the starting (root) person chosen by the site administrator. Logged in users can select their own starting (root) person.<br /><br />In this context, "All ancestors" means the father and mother, their parents, and so on. The pedigree is displayed graphically; you don\'t have to struggle through pages of text to determine your ancestors.<br /><br />All individuals are displayed in Name boxes on the screen.<br /><ul><li><b>Name boxes on the pedigree</b><br />If the Pedigree page is set to show details, you will see the person\'s name and birth and death dates. You can click on a person\'s name to take you directly to the Individual Information page of that person.<br /><br />When <b>Show details</b> is on there are two icons inside the name box.</li><li><b>Pedigree icon inside the Name box</b><br />When the option <b>Show Details</b> is on, you see a Pedigree icon in the Name box. Depending on the site settings, you have to hover over the icon or click on it. When you click on or hover over this icon, a small sub-menu appears.<br /><br />The items <b>Pedigree Tree</b> and <b>Descendancy Chart</b> are similar to those items in the main menu, but the difference is that the starting person is now the individual of mentioned in the Name box. You also see <b>Family with Spouse</b>. Underneath that you see the name of the spouse followed by the names of the children. All names are clickable.</li><li><b>Magnifying glass inside the Name box</b><br />Depending on the site settings, you have to hover over the icon or click on it. This magnifies the Name box so that more details will be displayed. You will see more dates and events. Names are clickable.</li><li><b>Arrows</b><br />On the left or right of the leftmost or rightmost Name boxes you may see arrows. When you click on these arrows the screen display will shift in the direction of the arrow.</li></ul>'); +/* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('Enter the name to be used in the «From:» field of e-mails originating at this site.<br /><br />For example, if your name is <b>John Smith</b> and you are the site administrator for a site that is known as <b>Jones Genealogy</b>, you could enter something like <b>John Smith</b> or <b>Jones Genealogy</b> or even <b>John Smith, Administrator: Jones Genealogy</b>. You may enter whatever you wish, but HTML is not permitted.'); +/* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('In normal mail headers for external mails, the email address as well as the name are used. Some mail systems will not accept this. When set to <b>Yes</b>, only the email address will be used.'); /* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('On this chart you can display one or more persons along a timeline. You can, for example, visualize the status of two or more persons at a certain moment.<br /><br />If you click the <b>Time Line</b> link on an other page you will already see one person on the Time Line. If you clicked the <b>Time Line</b> menu item in a page header, you have to supply the starting person\'s ID.'); +/* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('Sender name'); +/* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('Sending domain name'); /* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('Show living names'); /* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('Show slideshow controls?'); /* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('Should the names of living people be shown to visitors?'); /* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('The Ancestry page is very similar to the <a href="?help=pedigree.php">Pedigree Tree</a>, but with more details and alternate <a href="?help=chart_style">Chart style</a> displays.<br /><br />Each ancestry is shown with a unique number, calculated according to the <i>Sosa-Stradonitz</i> system:<div style="padding-left:30px;"><b>Even</b> numbers for men (child*2)<br /><b>Odd</b> numbers for women (husband+1) except for <b>1</b></div><br />Example:<br /><div style="padding-left:30px;">The root person is <b>1</b>, regardless of gender.<br /><b>1</b>\'s father is <b>2</b> (<b>1</b> * 2), mother is <b>3</b> (<b>2</b> + 1).<br /><b>2</b>\'s father is <b>4</b> (<b>2</b> * 2), mother is <b>5</b> (<b>4</b> + 1).<br /><b>3</b>\'s father is <b>6</b> (<b>3</b> * 2), mother is <b>7</b> (<b>6</b> + 1).<br /><b>7</b>\'s father is <b>14</b> (<b>7</b> * 2), mother is <b>15</b> (<b>14</b> +1).</div><br />etc.'); /* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('The Hourglass chart will show the ancestors and descendants of the selected root person on the same chart. This chart is a mix between the Descendancy chart and the Pedigree chart.<br /><br />The root person is centered in the middle of the page with his descendants listed to the left and his ancestors listed to the right. In this view, each generation is lined up across the page starting with the earliest generation and ending with the latest.<br /><br />If there is a downwards arrow on the screen under the root person, clicking on it will display a list of the root person\'s close family members that you can use the navigate down the chart. Selecting a name from this list will reload the chart with the selected person as the new root person.'); /* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('This chart is very similar to the Hourglass chart. It will show the ancestors and descendants of the selected root person on the same chart. It will also show the descendants of the root person in the same Hourglass format.<br /><br />The root person is centered in the middle of the page with his descendants listed to the left and his ancestors listed to the right. In this view, each generation is lined up across the page starting with the earliest generation and ending with the latest.<br /><br />Each descendant of the root person will become the root person of an additional hourglass chart, printed on the same page. This process repeats until the specified number of descendant generations have been printed.'); +/* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('This is the domain part of a valid e-mail address on the SMTP server.<br /><br />For example, if you have an e-mail account such as <b>yourname@abc.xyz.com</b>, you would enter <b>abc.xyz.com</b> here.'); +/* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('Use simple mail headers in external mails'); +/* I18N: This message is deleted in webtrees-1.2.6 */ WT_I18N::translate('Use simple mail headers'); // MESSAGES DELETED IN WEBTREES-1.2.5 @@ -85,7 +85,6 @@ case 'site_setting': case 'REQUIRE_ADMIN_AUTH_REGISTRATION': case 'ALLOW_USER_THEMES': case 'ALLOW_CHANGE_GEDCOM': - case 'SMTP_SIMPLE_MAIL': case 'SMTP_AUTH': $value=(int)$value; break; @@ -422,7 +422,6 @@ if (empty($_POST['smtpport' ])) $_POST['smtpport' ]='25'; if (empty($_POST['smtpusepw' ])) $_POST['smtpusepw' ]=1; if (empty($_POST['smtpuser' ])) $_POST['smtpuser' ]=''; if (empty($_POST['smtppass' ])) $_POST['smtppass' ]=''; -if (empty($_POST['smtpsmpl' ])) $_POST['smtpsmpl' ]=0; if (empty($_POST['smtpsecure'])) $_POST['smtpsecure']='none'; if (empty($_POST['smtpfrom' ])) $_POST['smtpfrom' ]='webmaster@localhost'; if (empty($_POST['smtpsender'])) $_POST['smtpsender']=$_POST['smtpfrom']; @@ -471,7 +470,7 @@ if (empty($_POST['wtname']) || empty($_POST['wtuser']) || strlen($_POST['wtpass' '<fieldset><legend>', WT_I18N::translate('SMTP mail server'), '</legend>', '<table border="0"><tr><td>', WT_I18N::translate('Messages'), '</td><td>', - '<select name="smtpuse" onchange="document.config.smtpserv.disabled=(this.value!=\'external\');document.config.smtpport.disabled=(this.value!=\'external\');document.config.smtpusepw.disabled=(this.value!=\'external\');document.config.smtpuser.disabled=(this.value!=\'external\');document.config.smtppass.disabled=(this.value!=\'external\');document.config.smtpsmpl.disabled=(this.value!=\'external\');document.config.smtpsecure.disabled=(this.value!=\'external\');document.config.smtpfrom.disabled=(this.value!=\'external\');document.config.smtpsender.disabled=(this.value!=\'external\');">', + '<select name="smtpuse" onchange="document.config.smtpserv.disabled=(this.value!=\'external\');document.config.smtpport.disabled=(this.value!=\'external\');document.config.smtpusepw.disabled=(this.value!=\'external\');document.config.smtpuser.disabled=(this.value!=\'external\');document.config.smtppass.disabled=(this.value!=\'external\');document.config.smtpsecure.disabled=(this.value!=\'external\');document.config.smtpfrom.disabled=(this.value!=\'external\');document.config.smtpsender.disabled=(this.value!=\'external\');">', '<option value="internal" ', $_POST['smtpuse']=='internal' ? 'selected="selected"' : '', '>', WT_I18N::translate('Use PHP mail to send messages'), '</option>', @@ -511,16 +510,6 @@ if (empty($_POST['wtname']) || empty($_POST['wtuser']) || strlen($_POST['wtpass' '<input type="password" name="smtppass" value="', htmlspecialchars($_POST['smtppass']), '"', $_POST['smtpuse']=='exernal' ? '' : 'disabled', ' /></td><td>', ' ', '</td></tr><tr><td>', - WT_I18N::translate('Use simple mail headers'), '</td><td>', - '<select name="smtpsmpl"', $_POST['smtpuse']=='exernal' ? '' : 'disabled', '>', - '<option value="yes" ', - $_POST['smtpsmpl'] ? 'selected="selected"' : '', - '>', WT_I18N::translate('yes'), '</option>', - '<option value="no" ', - !$_POST['smtpsmpl'] ? 'selected="selected"' : '', - '>', WT_I18N::translate('no'), '</option>', - '</select></td><td>', - '</td></tr><tr><td>', WT_I18N::translate('Security'), '</td><td>', '<select name="smtpsecure"', $_POST['smtpuse']=='exernal' ? '' : 'disabled', '>', '<option value="none" ', @@ -1009,11 +998,10 @@ try { "('SMTP_AUTH_USER', ?),". "('SMTP_AUTH_PASS', ?),". "('SMTP_SSL', ?),". - "('SMTP_SIMPLE_MAIL', ?),". "('SMTP_FROM_NAME', ?)" )->execute(array( $_POST['smtpuse'], $_POST['smtpserv'], $_POST['smtpsender'], $_POST['smtpport'], $_POST['smtpusepw'], - $_POST['smtpuser'], $_POST['smtppass'], $_POST['smtpsecure'], $_POST['smtpsmpl'], $_POST['smtpfrom'] + $_POST['smtpuser'], $_POST['smtppass'], $_POST['smtpsecure'], $_POST['smtpfrom'] )); echo |
