Skip to content

Commit

Permalink
Merge pull request #4372 from RestyaPlatform/v1.7.1
Browse files Browse the repository at this point in the history
Restyaboard Latest version v1.7.1 file changes added
  • Loading branch information
rrjanbiah authored Feb 8, 2022
2 parents 9c34b6b + eedc7a1 commit fd98cd0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
5 changes: 1 addition & 4 deletions client/js/commonUtility.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ $dc.ready(function() {
if (!$('.dropdown').is(e.target) && $('.dropdown').has(e.target).length === 0 && $('.open').has(e.target).length === 0) {
$('.dropdown').removeClass('open');
}
if (!$('.js-open-dropdown .js-change-visibility').is(e.target) &&
$('.js-open-dropdown .js-change-visibility').has(e.target).length === 0 &&
$('.open').has(e.target).length === 0
) {
if ($('.js-open-dropdown .js-change-visibility').has(e.target).length === 0 && !$('.js-open-dropdown .js-change-visibility').is(e.target) && $('.open').has(e.target).length === 0 ) {
$('.js-open-dropdown').removeClass('open');
}
});
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/about_us.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="about-block col-xs-pull-0 col-xs-push-0">
<h1><a title="<%- SITE_NAME %>" href="javascript:void(0);"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %> ]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a> </h1>
<small class="show text-center">v 1.7.1 (2022-02-05)</small>
<small class="show text-center">v 1.7.1 (2022-02-08)</small>
<h3><%- i18next.t("Technologies and Components") %></h3>
<ul class="list-unstyled">
<li>Restya platform <a class="text-primary" target="_blank" title="http://restya.com/?utm_source=Restyaboard - <%- SITE_NAME %>&utm_medium=web&utm_campaign=about_us" href="http://restya.com/">http://restya.com/ </a></li>
Expand Down
37 changes: 18 additions & 19 deletions server/php/libs/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,12 @@ function executeQuery($qry, $arr = array())
*
* @param string $template Email template name
* @param array $replaceContent Email content replace array
* @param string $to To email address
* @param string $toMail To email address
* @param string $replyToMail Reply to email address
*
* @return void
*/
function sendMail($template, $replaceContent, $to, $replyToMail = '')
function sendMail($template, $replaceContent, $toMail, $replyToMail = '')
{
global $r_debug, $db_lnk, $_server_domain_url;
if (file_exists(SITE_URL_FOR_SHELL)) {
Expand Down Expand Up @@ -614,15 +614,15 @@ function sendMail($template, $replaceContent, $to, $replyToMail = '')
$headers.= "X-Auto-Response-Suppress: All" . PHP_EOL;
if (is_plugin_enabled('r_sparkpost')) {
require_once PLUGIN_PATH . DS . 'SparkPost' . DS . 'functions.php';
$result = SparkPostMail($to, $subject, $message, $headers, DEFAULT_FROM_EMAIL_ADDRESS);
$result = SparkPostMail($toMail, $subject, $message, $headers, DEFAULT_FROM_EMAIL_ADDRESS);
} else {
$result = mail($to, $subject, $message, $headers, '-f' . DEFAULT_FROM_EMAIL_ADDRESS);
$result = mail($toMail, $subject, $message, $headers, '-f' . DEFAULT_FROM_EMAIL_ADDRESS);
}
if (R_DEBUG) {
if (!$result) {
$compose_string = 'F, ' . $from_email . ', ' . $to . ', ' . $subject;
$compose_string = 'F, ' . $from_email . ', ' . $toMail . ', ' . $subject;
} else {
$compose_string = 'S, ' . $from_email . ', ' . $to . ', ' . $subject;
$compose_string = 'S, ' . $from_email . ', ' . $toMail . ', ' . $subject;
}
error_log($compose_string, 3, CACHE_PATH . DS . 'mail.log');
}
Expand Down Expand Up @@ -4317,11 +4317,11 @@ function __l($text)
*
* @return mail
*/
function sendMailNotification($notification_type)
function sendMailNotification($notificationType)
{
global $r_debug, $db_lnk, $_server_domain_url;
$qry_val_arr = array(
$notification_type
$notificationType
);
$card_activity_types = array(
'edit_card_desc',
Expand Down Expand Up @@ -4402,6 +4402,7 @@ function sendMailNotification($notification_type)
$i = 0;
$tmp_card_id = '';
while ($activity = pg_fetch_assoc($activities_result)) {
$replyToMail = '';
if (!empty($activity['profile_picture_path'])) {
$hash = md5(SECURITYSALT . 'User' . $activity['user_id'] . 'png' . 'small_thumb');
$profile_picture_path = $_server_domain_url . '/img/small_thumb/User/' . $activity['user_id'] . '.' . $hash . '.png';
Expand Down Expand Up @@ -4475,8 +4476,6 @@ function sendMailNotification($notification_type)
$mail_to = 'mailto:' . $board_email . '?subject=RE:' . $card['name'];
if (empty($tmp_card_id) || $tmp_card_id == $activity['card_id']) {
$replyToMail = $board_email;
} else {
$replyToMail = '';
}
$tmp_card_id = $activity['card_id'];
$reply_to = '<div style="margin:5px 0px 0px 43px;"><a href="' . $mail_to . '" target="_blank">Reply via email</a></div>' . "\n";
Expand Down Expand Up @@ -4573,6 +4572,7 @@ function sendMailNotification($notification_type)
$i = 0;
$tmp_card_id = '';
while ($activity = pg_fetch_assoc($activities_result)) {
$replyToMail = '';
if (!empty($activity['profile_picture_path'])) {
$hash = md5(SECURITYSALT . 'User' . $activity['user_id'] . 'png' . 'small_thumb');
$profile_picture_path = $_server_domain_url . '/img/small_thumb/User/' . $activity['user_id'] . '.' . $hash . '.png';
Expand Down Expand Up @@ -4646,8 +4646,6 @@ function sendMailNotification($notification_type)
$mail_to = 'mailto:' . $board_email . '?subject=RE:' . $card['name'];
if (empty($tmp_card_id) || $tmp_card_id == $activity['card_id']) {
$replyToMail = $board_email;
} else {
$replyToMail = '';
}
$tmp_card_id = $activity['card_id'];
$reply_to = '<div style="margin:5px 0px 0px 43px;"><a href="' . $mail_to . '" target="_blank">Reply via email</a></div>' . "\n";
Expand Down Expand Up @@ -4744,6 +4742,7 @@ function sendMailNotification($notification_type)
$i = 0;
$tmp_card_id = '';
while ($activity = pg_fetch_assoc($activities_result)) {
$replyToMail = '';
if (!empty($activity['profile_picture_path'])) {
$hash = md5(SECURITYSALT . 'User' . $activity['user_id'] . 'png' . 'small_thumb');
$profile_picture_path = $_server_domain_url . '/img/small_thumb/User/' . $activity['user_id'] . '.' . $hash . '.png';
Expand Down Expand Up @@ -4817,8 +4816,6 @@ function sendMailNotification($notification_type)
$mail_to = 'mailto:' . $board_email . '?subject=RE:' . $card['name'];
if (empty($tmp_card_id) || $tmp_card_id == $activity['card_id']) {
$replyToMail = $board_email;
} else {
$replyToMail = '';
}
$tmp_card_id = $activity['card_id'];
$reply_to = '<div style="margin:5px 0px 0px 43px;"><a href="' . $mail_to . '" target="_blank">Reply via email</a></div>' . "\n";
Expand Down Expand Up @@ -4938,11 +4935,13 @@ function sendMailNotification($notification_type)
}
$main_content.= $mail_content;
pg_query_params($db_lnk, 'UPDATE users SET last_email_notified_activity_id = $1 WHERE id = $2', $qry_arr);
$emailFindReplace['##CONTENT##'] = $main_content;
$emailFindReplace['##NAME##'] = $user['full_name'];
$emailFindReplace['##NOTIFICATION_COUNT##'] = $notification_count;
$emailFindReplace['##SINCE##'] = strftime("%I:%M %p ( %B %e, %Y)");
$emailFindReplace['##USER_ID##'] = $user['id'];
$emailFindReplace = array(
'##CONTENT##' => $main_content,
'##NAME##' => $user['full_name'],
'##NOTIFICATION_COUNT##' => $notification_count,
'##SINCE##' => strftime("%I:%M %p ( %B %e, %Y)"),
'##USER_ID##' => $user['id'],
);
sendMail('email_notification', $emailFindReplace, $user['email'], $replyToMail);
}
}
Expand Down

0 comments on commit fd98cd0

Please sign in to comment.