Merge branch 'fix/Some_fixes_on_comments' into 'master'
Some fixes on comments Fix #205 See merge request !161
This commit is contained in:
parent
7c1b3b163d
commit
8f6a31737d
@ -34,7 +34,11 @@ class NotificationService {
|
||||
$_SESSION['mail_sent'] = [];
|
||||
}
|
||||
|
||||
if ($poll->receiveNewVotes) {
|
||||
$isVoteAndCanSendIt = ($type == self::UPDATE_VOTE || $type == self::ADD_VOTE) && $poll->receiveNewVotes;
|
||||
$isCommentAndCanSendIt = $type == self::ADD_COMMENT && $poll->receiveNewComments;
|
||||
$isOtherType = $type != self::UPDATE_VOTE && $type != self::ADD_VOTE && $type != self::ADD_COMMENT;
|
||||
|
||||
if ($isVoteAndCanSendIt || $isCommentAndCanSendIt || $isOtherType) {
|
||||
|
||||
if (self::isParticipation($type)) {
|
||||
$translationString = 'Poll\'s participation: %s';
|
||||
|
@ -28,6 +28,7 @@ class Utils {
|
||||
$dirname = dirname($_SERVER['SCRIPT_NAME']);
|
||||
$dirname = $dirname === '\\' ? '/' : $dirname . '/';
|
||||
$dirname = str_replace('/admin', '', $dirname);
|
||||
$dirname = str_replace('/action', '', $dirname);
|
||||
$server_name = (defined('APP_URL') ? APP_URL : $_SERVER['SERVER_NAME']) . $port . $dirname;
|
||||
|
||||
return $scheme . '://' . preg_replace('#//+#', '/', $server_name);
|
||||
|
Loading…
Reference in New Issue
Block a user