Last active
August 29, 2015 14:16
-
-
Save Jaybus2/8e5957692a927e04f966 to your computer and use it in GitHub Desktop.
OpenDocMan patch for 1.3.2 fixes email body length issues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ur opendocman-1.3.2/add.php opendocman-1.3.2.rev/add.php | |
--- opendocman-1.3.2/add.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/add.php 2015-02-25 17:43:34.000000000 -0500 | |
@@ -414,14 +414,14 @@ | |
// Build email for general notices | |
$mail_subject = msg('addpage_new_file_added'); | |
- $mail_body2 = msg('email_a_new_file_has_been_added') . "\n\n"; | |
- $mail_body2.=msg('label_filename') . ': ' . $file_obj->getName() . "\n\n"; | |
- $mail_body2.=msg('label_status') . ': ' . msg('addpage_new') . "\n\n"; | |
- $mail_body2.=msg('date') . ': ' . $date . "\n\n"; | |
- $mail_body2.=msg('addpage_uploader') . ': ' . $full_name . "\n\n"; | |
- $mail_body2.=msg('email_thank_you') . ',' . "\n\n"; | |
- $mail_body2.=msg('email_automated_document_messenger') . "\n\n"; | |
- $mail_body2.=$GLOBALS['CONFIG']['base_url'] . "\n\n"; | |
+ $mail_body2 = msg('email_a_new_file_has_been_added') . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('label_filename') . ': ' . $file_obj->getName() . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('label_status') . ': ' . msg('addpage_new') . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('date') . ': ' . $date . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('addpage_uploader') . ': ' . $full_name . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('email_thank_you') . ',' . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('email_automated_document_messenger') . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=$GLOBALS['CONFIG']['base_url'] . PHP_EOL . PHP_EOL; | |
$email_obj = new Email(); | |
$email_obj->setFullName($full_name); | |
diff -ur opendocman-1.3.2/check_exp.php opendocman-1.3.2.rev/check_exp.php | |
--- opendocman-1.3.2/check_exp.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/check_exp.php 2015-02-25 17:45:02.000000000 -0500 | |
@@ -124,9 +124,9 @@ | |
$mail_from= $full_name.' <'.$user_obj->getEmailAddress().'>'; | |
$mail_headers = "From: $mail_from"; | |
$mail_subject=msg('email_subject_review_status'); | |
- $mail_greeting=msg('email_greeting') . ":\n\r\t" . msg('email_i_would_like_to_inform'); | |
+ $mail_greeting=msg('email_greeting') . ":". PHP_EOL . "\t" . msg('email_i_would_like_to_inform'); | |
$mail_body = msg('email_was_declined_for_publishing_at') . ' ' .$time.' on '.$date.' ' . msg('email_because_you_did_not_revise') . ' ' . $GLOBALS['CONFIG']['revision_expiration'] . ' '. msg('days'); | |
- $mail_salute="\n\r\n\r" . msg('email_salute') . ",\n\r$full_name"; | |
+ $mail_salute=PHP_EOL . PHP_EOL . msg('email_salute') . ",". PHP_EOL . $full_name"; | |
foreach($data_result as $row) { | |
$file_obj = new FileData($row['id'], $pdo); | |
$user_obj = new User($file_obj->getOwner(), $pdo); | |
diff -ur opendocman-1.3.2/check-in.php opendocman-1.3.2.rev/check-in.php | |
--- opendocman-1.3.2/check-in.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/check-in.php 2015-02-25 17:45:58.000000000 -0500 | |
@@ -286,14 +286,14 @@ | |
// Build email for general notices | |
$mail_subject = msg('checkinpage_file_was_checked_in'); | |
- $mail_body2 = msg('checkinpage_file_was_checked_in') . "\n\n"; | |
- $mail_body2.=msg('label_filename') . ': ' . $file_obj->getName() . "\n\n"; | |
- $mail_body2.=msg('label_status') . ': ' . msg('addpage_new') . "\n\n"; | |
- $mail_body2.=msg('date') . ': ' . $date . "\n\n"; | |
- $mail_body2.=msg('addpage_uploader') . ': ' . $full_name . "\n\n"; | |
- $mail_body2.=msg('email_thank_you') . ',' . "\n\n"; | |
- $mail_body2.=msg('email_automated_document_messenger') . "\n\n"; | |
- $mail_body2.=$GLOBALS['CONFIG']['base_url'] . "\n\n"; | |
+ $mail_body2 = msg('checkinpage_file_was_checked_in') . PHP_EOL; | |
+ $mail_body2.=msg('label_filename') . ': ' . $file_obj->getName() . PHP_EOL; | |
+ $mail_body2.=msg('label_status') . ': ' . msg('addpage_new') . PHP_EOL; | |
+ $mail_body2.=msg('date') . ': ' . $date . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('addpage_uploader') . ': ' . $full_name . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('email_thank_you') . ',' . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('email_automated_document_messenger') . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=$GLOBALS['CONFIG']['base_url'] . PHP_EOL . PHP_EOL; | |
$email_obj = new Email(); | |
$email_obj->setFullName($full_name); | |
diff -ur opendocman-1.3.2/Email_class.php opendocman-1.3.2.rev/Email_class.php | |
--- opendocman-1.3.2/Email_class.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/Email_class.php 2015-02-25 17:46:50.000000000 -0500 | |
@@ -114,8 +114,8 @@ | |
private function setHeaders() | |
{ | |
if(isset($this->from)) { | |
- $mail_headers = "From: {$this->getFrom()}" . "\r\n"; | |
- $mail_headers .="Content-Type: text/plain; charset=UTF-8" . "\r\n"; | |
+ $mail_headers = "From: {$this->getFrom()}" . PHP_EOL; | |
+ $mail_headers .="Content-Type: text/plain; charset=UTF-8" . PHP_EOL; | |
$this->headers = $mail_headers; | |
} | |
} | |
diff -ur opendocman-1.3.2/file_ops.php opendocman-1.3.2.rev/file_ops.php | |
--- opendocman-1.3.2/file_ops.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/file_ops.php 2015-02-25 17:47:40.000000000 -0500 | |
@@ -38,8 +38,8 @@ | |
$flag = 0; | |
if(isset($_GET['submit']) && $_GET['submit'] == 'view_checkedout') | |
{ | |
- echo "\n" . '<form name="table" action="' . $_SERVER['PHP_SELF'] . '" method="POST">'; | |
- echo "\n" . '<input name="submit" type="hidden" value="Clear Status">'; | |
+ echo PHP_EOL . '<form name="table" action="' . $_SERVER['PHP_SELF'] . '" method="POST">'; | |
+ echo PHP_EOL . '<input name="submit" type="hidden" value="Clear Status">'; | |
draw_header(msg('label_checked_out_files'), $last_message); | |
$file_id_array = $user_obj->getCheckedOutFiles(); | |
@@ -49,8 +49,8 @@ | |
$list_status = list_files($file_id_array, $user_perm_obj, $GLOBALS['CONFIG']['dataDir'], true, true); | |
if($list_status != -1 ) | |
{ | |
- echo "\n" . '<BR><div class="buttons"><button class="positive" type="submit" name="submit" value="Clear Status">' . msg('button_clear_status') . '</button></div><br />'; | |
- echo "\n" . '</form>'; | |
+ echo PHP_EOL . '<BR><div class="buttons"><button class="positive" type="submit" name="submit" value="Clear Status">' . msg('button_clear_status') . '</button></div><br />'; | |
+ echo PHP_EOL . '</form>'; | |
} | |
draw_footer(); | |
} | |
diff -ur opendocman-1.3.2/forgot_password.php opendocman-1.3.2.rev/forgot_password.php | |
--- opendocman-1.3.2/forgot_password.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/forgot_password.php 2015-02-25 17:48:34.000000000 -0500 | |
@@ -224,12 +224,12 @@ | |
// generate the link | |
$resetLink = $GLOBALS['CONFIG']['base_url'] . '/forgot_password.php?username=' . $username . '&code=' . $reset_code; | |
- $mail_headers = "From: " . $GLOBALS['CONFIG']['site_mail'] . "\r\n"; | |
- $mail_headers .= "Content-Type: text/plain; charset=UTF-8" . "\r\n"; | |
- $mail_body = msg('email_someone_has_requested_password')."\n\n"; | |
- $mail_body .= $resetLink . "\n\n"; | |
- $mail_body .= msg('email_thank_you') . "\n\n"; | |
- $mail_body .= msg('area_admin') . "\n\n"; | |
+ $mail_headers = "From: " . $GLOBALS['CONFIG']['site_mail'] . PHP_EOL; | |
+ $mail_headers .= "Content-Type: text/plain; charset=UTF-8" . PHP_EOL; | |
+ $mail_body = msg('email_someone_has_requested_password').PHP_EOL . PHP_EOL; | |
+ $mail_body .= $resetLink . PHP_EOL . PHP_EOL; | |
+ $mail_body .= msg('email_thank_you') . PHP_EOL . PHP_EOL; | |
+ $mail_body .= msg('area_admin') . PHP_EOL . PHP_EOL; | |
// send the email | |
if ($GLOBALS['CONFIG']['demo'] == 'False') | |
diff -ur opendocman-1.3.2/functions.php opendocman-1.3.2.rev/functions.php | |
--- opendocman-1.3.2/functions.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/functions.php 2015-02-25 17:42:01.000000000 -0500 | |
@@ -287,7 +287,7 @@ | |
// print_r($fileid_array);exit; | |
if(sizeof($fileid_array)==0 || !isset($fileid_array[0])) | |
{ | |
- echo'<img src="images/exclamation.gif">' . msg('message_no_files_found') . "\n"; | |
+ echo'<img src="images/exclamation.gif">' . msg('message_no_files_found') . PHP_EOL; | |
return -1; | |
} | |
@@ -445,27 +445,27 @@ | |
{ | |
case 'author': | |
<?php | |
- echo("\tcategory_option_msg = '".msg('category_option_author')."';\n"); | |
+ echo("\tcategory_option_msg = '".msg('category_option_author')."';".PHP_EOL); | |
?> | |
break; | |
case 'department': | |
<?php | |
- echo("\tcategory_option_msg = '".msg('category_option_department')."';\n"); | |
+ echo("\tcategory_option_msg = '".msg('category_option_department')."';".PHP_EOL); | |
?> | |
break; | |
case 'category': | |
<?php | |
- echo("\tcategory_option_msg = '".msg('category_option_category')."';\n"); | |
+ echo("\tcategory_option_msg = '".msg('category_option_category')."';".PHP_EOL); | |
?> | |
break; | |
default : | |
<?php | |
- echo("\tcategory_option_msg = '".msg('label_empty')."';\n"); | |
+ echo("\tcategory_option_msg = '".msg('label_empty')."';".PHP_EOL); | |
?> | |
break; | |
} | |
<?php | |
- echo("\toptions_array[0] = new Option('".msg('outpage_choose')."' + category_option_msg);\n"); | |
+ echo("\toptions_array[0] = new Option('".msg('outpage_choose')."' + category_option_msg);".PHP_EOL); | |
?> | |
options_array[0].id= 0; | |
options_array[0].value = 'choose_an_author'; | |
@@ -485,11 +485,11 @@ | |
exit(); | |
order_array = new Array(); | |
<?php | |
- echo("\torder_array[0] = new Array(\"".msg('outpage_ascending')."\", 0, \"asc\");\n"); | |
- echo("\torder_array[1] = new Array(\"".msg('outpage_descending')."\", 0, \"desc\");\n"); | |
- echo("\toptions_array = document.forms['browser_sort'].elements['category_item_order'].options;\n"); | |
+ echo("\torder_array[0] = new Array(\"".msg('outpage_ascending')."\", 0, \"asc\");".PHP_EOL); | |
+ echo("\torder_array[1] = new Array(\"".msg('outpage_descending')."\", 0, \"desc\");".PHP_EOL); | |
+ echo("\toptions_array = document.forms['browser_sort'].elements['category_item_order'].options;".PHP_EOL); | |
- echo("\toptions_array[0] = new Option('".msg('outpage_choose_an_order')."');\n"); | |
+ echo("\toptions_array[0] = new Option('".msg('outpage_choose_an_order')."');".PHP_EOL); | |
?> | |
options_array[0].id= 0; | |
options_array[0].value = 'choose_an_order'; | |
@@ -522,12 +522,12 @@ | |
$result = $stmt->fetchAll(); | |
$index = 0; | |
- echo("author_array = new Array();\n"); | |
+ echo("author_array = new Array();".PHP_EOL); | |
foreach($result as $row) { | |
$last_name = $row['last_name']; | |
$first_name = $row['first_name']; | |
$id = $row['id']; | |
- echo("\tauthor_array[$index] = new Array(\"$last_name $first_name\", $id);\n"); | |
+ echo("\tauthor_array[$index] = new Array(\"$last_name $first_name\", $id);".PHP_EOL); | |
$index++; | |
} | |
@@ -546,11 +546,11 @@ | |
$result = $stmt->fetchAll(); | |
$index = 0; | |
- echo("department_array = new Array();\n"); | |
+ echo("department_array = new Array();".PHP_EOL); | |
foreach($result as $row) { | |
$dept = $row['name']; | |
$id = $row['id']; | |
- echo("\tdepartment_array[$index] = new Array(\"$dept\", $id);\n"); | |
+ echo("\tdepartment_array[$index] = new Array(\"$dept\", $id);".PHP_EOL); | |
$index++; | |
} | |
@@ -569,16 +569,16 @@ | |
$result = $stmt->fetchAll(); | |
$index = 0; | |
- echo("category_array = new Array();\n"); | |
+ echo("category_array = new Array();".PHP_EOL); | |
foreach($result as $row) { | |
$category = $row['name']; | |
$id = $row['id']; | |
- echo("\tcategory_array[$index] = new Array(\"$category\", $id);\n"); | |
+ echo("\tcategory_array[$index] = new Array(\"$category\", $id);".PHP_EOL); | |
$index++; | |
} | |
udf_functions_java_array(); | |
/////////////////////////////////////////////////////////////////////// | |
- echo '</script>'."\n"; | |
+ echo '</script>'.PHP_EOL; | |
?> | |
<form name="browser_sort"> | |
<table name="browser" border="0" cellspacing="1"> | |
@@ -655,7 +655,7 @@ | |
$userperm_obj = new UserPermission($_SESSION['uid'], $pdo); | |
if(!$userperm_obj->user_obj->isAdmin() && $userperm_obj->getAuthority($file_id, $obj) < $permittable_right) | |
{ | |
- echo msg('error').': '.msg('message_unable_to_find_file') . "\n"; | |
+ echo msg('error').': '.msg('message_unable_to_find_file') . PHP_EOL; | |
echo ' ' . msg('message_please_email') . ' <a href="mailto:' . $GLOBALS['CONFIG']['site_mail'] . '">' . msg('area_admin') . '</a>'; | |
exit(); | |
} | |
diff -ur opendocman-1.3.2/index.php opendocman-1.3.2.rev/index.php | |
--- opendocman-1.3.2/index.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/index.php 2015-02-26 08:54:21.306000117 -0500 | |
@@ -128,8 +128,6 @@ | |
{ | |
// register the user's ID | |
$id = $result[0]['id']; | |
- $username = $result['username']; | |
- $password = $result['password']; | |
// initiate a session | |
$_SESSION['uid'] = $id; | |
diff -ur opendocman-1.3.2/signup.php opendocman-1.3.2.rev/signup.php | |
--- opendocman-1.3.2/signup.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/signup.php 2015-02-25 17:49:14.000000000 -0500 | |
@@ -91,7 +91,7 @@ | |
echo msg ('message_account_created') . ' ' . $_POST['username'].'<br />'; | |
if($GLOBALS['CONFIG']['authen'] == 'mysql') | |
{ | |
- echo msg('message_account_created_password') . ': '.$_REQUEST['password']."\n\n"; | |
+ echo msg('message_account_created_password') . ': '.$_REQUEST['password'].PHP_EOL . PHP_EOL; | |
echo '<br><a href="' . $GLOBALS['CONFIG']['base_url'] . '">' . msg('login'). '</a>'; | |
exit; | |
} | |
diff -ur opendocman-1.3.2/toBePublished.php opendocman-1.3.2.rev/toBePublished.php | |
--- opendocman-1.3.2/toBePublished.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/toBePublished.php 2015-02-25 17:35:51.000000000 -0500 | |
@@ -117,20 +117,20 @@ | |
$subject = isset($_POST['subject']) ? $_POST['subject'] : ''; | |
$checkbox = isset($_POST['checkbox']) ? $_POST['checkbox'] : ''; | |
- $mail_break = '--------------------------------------------------'."\n"; | |
+ $mail_break = '--------------------------------------------------'.PHP_EOL; | |
$reviewer_comments = "To=$to;Subject=$subject;Comments=$comments;"; | |
$user_obj = new user($_SESSION['uid'], $pdo); | |
$date = date('Y-m-d H:i:s T'); //locale insensitive | |
$get_full_name = $user_obj->getFullName(); | |
$full_name = $get_full_name[0].' '.$get_full_name[1]; | |
$mail_from= $full_name.' <'.$user_obj->getEmailAddress().'>'; | |
- $mail_headers = "From: $mail_from"."\r\n"; | |
- $mail_headers .="Content-Type: text/plain; charset=UTF-8"."\r\n"; | |
+ $mail_headers = "From: $mail_from".PHP_EOL; | |
+ $mail_headers .="Content-Type: text/plain; charset=UTF-8".PHP_EOL; | |
$mail_subject= (!empty($_REQUEST['subject']) ? stripslashes($_REQUEST['subject']) : msg('email_subject_review_status')); | |
- $mail_greeting=msg('email_greeting'). ":\n\r\t" . msg('email_i_would_like_to_inform'); | |
- $mail_body = $comments . "\n\n"; | |
- $mail_body .= msg('email_was_declined_for_publishing_at') . ' ' .$date. ' ' . msg('email_for_the_following_reasons') . ':'."\n\n".$mail_break.$_REQUEST['comments']."\n".$mail_break; | |
- $mail_salute="\n\r\n\r" . msg('email_salute') . ",\n\r$full_name"; | |
+ $mail_greeting=msg('email_greeting'). ":" . PHP_EOL . "\t" . msg('email_i_would_like_to_inform'); | |
+ $mail_body = $comments . PHP_EOL . PHP_EOL; | |
+ $mail_body .= msg('email_was_declined_for_publishing_at') . ' ' .$date. ' ' . msg('email_for_the_following_reasons') . ':'. PHP_EOL . PHP_EOL .$mail_break.$_REQUEST['comments']. PHP_EOL .$mail_break; | |
+ $mail_salute=PHP_EOL . PHP_EOL . msg('email_salute') . ",". PHP_EOL .$full_name"; | |
if($user_obj->isAdmin()) | |
{ | |
@@ -157,15 +157,15 @@ | |
{ | |
// Lets unset this now so the new array will just be user_id's | |
$_POST['send_to_users'] = array_slice($_POST['send_to_users'], 1); | |
- $mail_body1 = $comments . "\n\n"; | |
- $mail_body1.=msg('email_was_rejected_from_repository') . "\n\n"; | |
- $mail_body1.=msg('label_filename') . ': ' . $file_obj->getName() . "\n\n"; | |
- $mail_body1.=msg('label_status') . ': ' . msg('message_authorized') . "\n\n"; | |
- $mail_body1.=msg('date') . ': ' . $date . "\n\n"; | |
- $mail_body1.=msg('label_reviewer') . ': ' . $full_name . "\n\n"; | |
- $mail_body1.=msg('email_thank_you') . ',' . "\n\n"; | |
- $mail_body1.=msg('email_automated_document_messenger') . "\n\n"; | |
- $mail_body1.=$GLOBALS['CONFIG']['base_url'] . "\n\n"; | |
+ $mail_body1 = $comments . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('email_was_rejected_from_repository') . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('label_filename') . ': ' . $file_obj->getName() . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('label_status') . ': ' . msg('message_authorized') . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('date') . ': ' . $date . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('label_reviewer') . ': ' . $full_name . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('email_thank_you') . ',' . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('email_automated_document_messenger') . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=$GLOBALS['CONFIG']['base_url'] . PHP_EOL . PHP_EOL; | |
if ($GLOBALS['CONFIG']['demo'] == 'False') { | |
mail($mail_to, $mail_subject . ' ' . $file_obj->getName(), ($mail_greeting . $file_obj->getName() . ' ' . $mail_body1 . $mail_salute), $mail_headers); | |
@@ -177,15 +177,15 @@ | |
AccessLog::addLogEntry($fileid, 'R', $pdo); | |
// Set up rejected email message to sent out | |
$mail_subject = (!empty($_REQUEST['subject']) ? stripslashes($_REQUEST['subject']) : msg('email_a_new_file_has_been_rejected')); | |
- $mail_body = $comments . "\n\n"; | |
- $mail_body.=msg('email_a_new_file_has_been_rejected')."\n\n"; | |
- $mail_body.=msg('label_filename'). ': ' .$file_obj->getName() . "\n\n"; | |
- $mail_body.=msg('label_status').': ' .msg('message_rejected'). "\n\n"; | |
- $mail_body.=msg('date'). ': ' .$date. "\n\n"; | |
- $mail_body.=msg('label_reviewer'). ': ' .$full_name. "\n\n"; | |
- $mail_body.=msg('email_thank_you'). ','. "\n\n"; | |
- $mail_body.=msg('email_automated_document_messenger'). "\n\n"; | |
- $mail_body.=$GLOBALS['CONFIG']['base_url'] . "\n\n"; | |
+ $mail_body = $comments . PHP_EOL . PHP_EOL; | |
+ $mail_body.=msg('email_a_new_file_has_been_rejected').PHP_EOL . PHP_EOL; | |
+ $mail_body.=msg('label_filename'). ': ' .$file_obj->getName() . PHP_EOL . PHP_EOL; | |
+ $mail_body.=msg('label_status').': ' .msg('message_rejected'). PHP_EOL . PHP_EOL; | |
+ $mail_body.=msg('date'). ': ' .$date. PHP_EOL . PHP_EOL; | |
+ $mail_body.=msg('label_reviewer'). ': ' .$full_name. PHP_EOL . PHP_EOL; | |
+ $mail_body.=msg('email_thank_you'). ','. PHP_EOL . PHP_EOL; | |
+ $mail_body.=msg('email_automated_document_messenger'). PHP_EOL . PHP_EOL; | |
+ $mail_body.=$GLOBALS['CONFIG']['base_url'] . PHP_EOL . PHP_EOL; | |
if(isset($_POST['send_to_all'])) | |
{ | |
@@ -219,8 +219,8 @@ | |
$full_name = $get_full_name[0].' '.$get_full_name[1]; | |
$mail_subject = (!empty($_REQUEST['subject']) ? stripslashes($_REQUEST['subject']) : msg('email_subject_review_status')); | |
$mail_from= $full_name.' <'.$user_obj->getEmailAddress().'>'; | |
- $mail_headers = "From: $mail_from"."\r\n"; | |
- $mail_headers .="Content-Type: text/plain; charset=UTF-8"."\r\n"; | |
+ $mail_headers = "From: ".$mail_from.PHP_EOL.PHP_EOL; | |
+ $mail_headers .="Content-Type: text/plain; charset=UTF-8".PHP_EOL . PHP_EOL; | |
if($user_obj->isAdmin()) | |
{ | |
@@ -249,15 +249,15 @@ | |
{ | |
// Lets unset this now so the new array will just be user_id's | |
$_POST['send_to_users'] = array_slice($_POST['send_to_users'], 1); | |
- $mail_body1 = $comments . "\n\n"; | |
- $mail_body1.=msg('email_your_file_has_been_authorized') . "\n\n"; | |
- $mail_body1.=msg('label_filename') . ': ' . $file_obj->getName() . "\n\n"; | |
- $mail_body1.=msg('label_status') . ': ' . msg('message_authorized') . "\n\n"; | |
- $mail_body1.=msg('date') . ': ' . $date . "\n\n"; | |
- $mail_body1.=msg('label_reviewer') . ': ' . $full_name . "\n\n"; | |
- $mail_body1.=msg('email_thank_you') . ',' . "\n\n"; | |
- $mail_body1.=msg('email_automated_document_messenger') . "\n\n"; | |
- $mail_body1.=$GLOBALS['CONFIG']['base_url'] . "\n\n"; | |
+ $mail_body1 = $comments . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('email_your_file_has_been_authorized') . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('label_filename') . ': ' . $file_obj->getName() . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('label_status') . ': ' . msg('message_authorized') . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('date') . ': ' . $date . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('label_reviewer') . ': ' . $full_name . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('email_thank_you') . ',' . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=msg('email_automated_document_messenger') . PHP_EOL . PHP_EOL; | |
+ $mail_body1.=$GLOBALS['CONFIG']['base_url'] . PHP_EOL . PHP_EOL; | |
if ($GLOBALS['CONFIG']['demo'] == 'False') | |
{ | |
mail($mail_to, $mail_subject . " " . $file_obj->getName(), $mail_body1, $mail_headers); | |
@@ -270,15 +270,15 @@ | |
// Build email for general notices | |
$mail_subject = (!empty($_REQUEST['subject']) ? stripslashes($_REQUEST['subject']) : $file_obj->getName().' ' .msg('email_added_to_repository')); | |
- $mail_body2=$comments . "\n\n"; | |
- $mail_body2.=msg('email_a_new_file_has_been_added'). "\n\n"; | |
- $mail_body2.=msg('label_filename'). ': ' . $file_obj->getName() . "\n\n"; | |
- $mail_body2.=msg('label_status'). ': New'. "\n\n"; | |
- $mail_body2.=msg('date'). ': ' . $date . "\n\n"; | |
- $mail_body2.=msg('label_reviewer'). ': ' . $full_name . "\n\n"; | |
- $mail_body2.=msg('email_thank_you'). ','. "\n\n"; | |
- $mail_body2.=msg('email_automated_document_messenger'). "\n\n"; | |
- $mail_body2.=$GLOBALS['CONFIG']['base_url'] . "\n\n"; | |
+ $mail_body2=$comments . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('email_a_new_file_has_been_added'). PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('label_filename'). ': ' . $file_obj->getName() . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('label_status'). ': New'. PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('date'). ': ' . $date . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('label_reviewer'). ': ' . $full_name . PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('email_thank_you'). ','. PHP_EOL . PHP_EOL; | |
+ $mail_body2.=msg('email_automated_document_messenger'). PHP_EOL . PHP_EOL; | |
+ $mail_body2.=$GLOBALS['CONFIG']['base_url'] . PHP_EOL . PHP_EOL; | |
if(isset($_POST['send_to_all'])) | |
{ | |
diff -ur opendocman-1.3.2/udf_functions.php opendocman-1.3.2.rev/udf_functions.php | |
--- opendocman-1.3.2/udf_functions.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/udf_functions.php 2015-02-25 17:50:37.000000000 -0500 | |
@@ -539,9 +539,9 @@ | |
foreach($result as $row) { | |
if ( $row[1] == 1 || $row[1] == 2 || $row[1] == 3 ) | |
{ | |
- echo "case '".$row[2]."':\n"; | |
- echo " info_Array = ".$row[0]."_array;\n"; | |
- echo " break;\n"; | |
+ echo "case '".$row[2]."':".PHP_EOL; | |
+ echo " info_Array = ".$row[0]."_array;".PHP_EOL; | |
+ echo " break;".PHP_EOL; | |
} | |
} | |
} | |
@@ -563,10 +563,10 @@ | |
$stmt->execute(array()); | |
$sub_result = $stmt->fetchAll(); | |
- echo $row[0] . "_array = new Array();\n"; | |
+ echo $row[0] . "_array = new Array();".PHP_EOL; | |
$index = 0; | |
foreach($sub_result as $sub_row) { | |
- echo "\t" . $row[0] . "_array[" . $index . "] = new Array(\"" . $sub_row[1] . "\", " . $sub_row[0] . ");\n"; | |
+ echo "\t" . $row[0] . "_array[" . $index . "] = new Array(\"" . $sub_row[1] . "\", " . $sub_row[0] . ");".PHP_EOL; | |
$index++; | |
} | |
} | |
diff -ur opendocman-1.3.2/user.php opendocman-1.3.2.rev/user.php | |
--- opendocman-1.3.2/user.php 2015-02-16 10:37:10.000000000 -0500 | |
+++ opendocman-1.3.2.rev/user.php 2015-02-25 17:25:04.000000000 -0500 | |
@@ -168,20 +168,22 @@ | |
$get_full_name = $new_user_obj->getFullName(); | |
$new_user_full_name = $get_full_name[0] . ' ' . $get_full_name[1]; | |
$mail_from = $full_name . ' <' . $user_obj->getEmailAddress() . '>'; | |
- $mail_headers = "From: $mail_from" . "\r\n"; | |
- $mail_headers .= "Content-Type: text/plain; charset=UTF-8" . "\r\n"; | |
+ $mail_headers = "From: $mail_from" . PHP_EOL; | |
+ $mail_headers .= "Content-Type: text/plain; charset=UTF-8" . PHP_EOL; | |
$mail_subject = msg('message_account_created_add_user'); | |
- $mail_greeting = $new_user_full_name . ":\n\r\t" . msg('email_i_would_like_to_inform'); | |
- $mail_body = msg('email_your_account_created') . ' ' . $date . '. ' . msg('email_you_can_now_login') . ':' . "\n\r"; | |
- $mail_body .= $GLOBALS['CONFIG']['base_url'] . "\n\n"; | |
- $mail_body .= msg('username') . ': ' . $new_user_obj->getName() . "\n\n"; | |
+ $mail_greeting = $new_user_full_name . ":" . PHP_EOL . msg('email_i_would_like_to_inform'); | |
+ $mail_body = msg('email_your_account_created') . ' ' . $date . '. ' . msg('email_you_can_now_login') . ':' . PHP_EOL . PHP_EOL; | |
+ $mail_body .= $GLOBALS['CONFIG']['base_url'] . PHP_EOL . PHP_EOL; | |
+ $mail_body .= msg('username') . ': ' . $new_user_obj->getName() . PHP_EOL . PHP_EOL; | |
if ($GLOBALS['CONFIG']['authen'] == 'mysql') { | |
- $mail_body .= msg('password') . ': ' . $_POST['password'] . "\n\n"; | |
+ $mail_body .= msg('password') . ': ' . $_POST['password'] . PHP_EOL . PHP_EOL; | |
} | |
- $mail_salute = "\n\r" . msg('email_salute') . ",\n\r$full_name"; | |
+ $mail_salute = msg('email_salute') . ",". PHP_EOL . $full_name; | |
$mail_to = $new_user_obj->getEmailAddress(); | |
+ $mail_flags = "-f".$user_obj->getEmailAddress(); | |
if ($GLOBALS['CONFIG']['demo'] == 'False') { | |
- mail($mail_to, $mail_subject, ($mail_greeting . ' ' . $mail_body . $mail_salute), $mail_headers); | |
+ mail($mail_to, $mail_subject, ($mail_greeting . ' ' . $mail_body . $mail_salute), $mail_headers, | |
+ $mail_flags); | |
} | |
$last_message = urlencode(msg('message_user_successfully_added')); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment