Skip to content

Commit

Permalink
Merge branch 'master' of github.com:freescout-helpdesk/freescout into…
Browse files Browse the repository at this point in the history
… dist
  • Loading branch information
freescout-helpdesk committed Apr 9, 2024
2 parents c15278d + aec78d1 commit ad76e2d
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 89 deletions.
12 changes: 12 additions & 0 deletions app/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1537,5 +1537,17 @@ public static function findCustomersBySocialProfile($type, $value, $exclude_chan
return $customers;
}
}

/**
* Get dummy customer.
*/
public static function getDummyCustomer()
{
$customer = new self();
$customer->first_name = __('Customer');
$customer->last_name = '';

return $customer;
}
}

6 changes: 3 additions & 3 deletions app/Http/Controllers/MailboxesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ public function ajax(Request $request)

if (count($imap_folders)) {
$response = $this->interateFolders($response, $imap_folders);
$response['folders'] = array_unique($response['folders']);
}

if (count($response['folders'])) {
Expand Down Expand Up @@ -837,9 +838,8 @@ public function interateFolders($response, $imap_folders, $subfolder = false) {
// Old library.
if (!empty($imap_folder->fullName)) {
$response['folders'][] = $imap_folder->fullName;
}
// New library.
if (!empty($imap_folder->full_name)) {
} elseif (!empty($imap_folder->full_name)) {
// New library.
$response['folders'][] = $imap_folder->full_name;
}
}
Expand Down
7 changes: 6 additions & 1 deletion app/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,12 @@ public function getCreatedBy()
return \App\User::getDeletedUser();
}
} else {
return $this->created_by_customer;
// In some cases the created_by_customer can be empty.
if ($this->created_by_customer) {
return $this->created_by_customer;
} else {
return \App\Customer::getDummyCustomer();
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
| or any other location as required by the application or its packages.
*/

'version' => '1.8.131',
'version' => '1.8.132',

/*
|--------------------------------------------------------------------------
Expand Down
7 changes: 5 additions & 2 deletions overrides/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,11 @@ protected static function removeIEConditional($string)
{
// https://github.com/freescout-helpdesk/freescout/issues/3894
return preg_replace(
'#<!--\[if [^>]+\]>(.*?)<!\[endif\]-->#si', // probably should generalize for all strings
'$1',
// This change caused: https://github.com/freescout-helpdesk/freescout/issues/3907#issuecomment-2043126228
// '#<!--\[if [^>]+\]>(.*?)<!\[endif\]-->#si', // probably should generalize for all strings
// '$1',
'#<!--\[if [^>]+\]>.*?<!\[endif\]-->#si', // probably should generalize for all strings
'',
$string
);
}
Expand Down
6 changes: 3 additions & 3 deletions overrides/symfony/http-foundation/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -1891,11 +1891,11 @@ protected function prepareBaseUrl()
{
$filename = basename($this->server->get('SCRIPT_FILENAME'));

if (basename($this->server->get('SCRIPT_NAME')) === $filename) {
if (basename((string)$this->server->get('SCRIPT_NAME')) === $filename) {
$baseUrl = $this->server->get('SCRIPT_NAME');
} elseif (basename($this->server->get('PHP_SELF')) === $filename) {
} elseif (basename((string)$this->server->get('PHP_SELF')) === $filename) {
$baseUrl = $this->server->get('PHP_SELF');
} elseif (basename($this->server->get('ORIG_SCRIPT_NAME')) === $filename) {
} elseif (basename((string)$this->server->get('ORIG_SCRIPT_NAME')) === $filename) {
$baseUrl = $this->server->get('ORIG_SCRIPT_NAME'); // 1and1 shared hosting compatibility
} else {
// Backtrack up the script_filename to find the portion matching
Expand Down
156 changes: 78 additions & 78 deletions resources/lang/ru.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/views/emails/user/notification.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<td height="10" bgcolor="{{ $conversation->getStatusColor() }}" style="color:#ffffff; font-family:Arial, 'Helvetica Neue', Helvetica, Tahoma, sans-serif; line-height:12px; font-size:12px; margin-top: 3px;border-radius: 2px; {{--@if ($conversation->status == App\Conversation::STATUS_PENDING)border: 1px solid #ccc; color: #727d87;@endif--}}">{{ strtoupper($conversation->getStatusName()) }}</td>
</tr>
</table>
@if ($conversation->user_id)
@if ($conversation->user_id && $conversation->user)
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="font-family:Arial, 'Helvetica Neue', Helvetica, Tahoma, sans-serif; color:#B5B9BD; line-height:16px; font-size:12px; padding-top: 8px;text-align:right;">
Expand Down

0 comments on commit ad76e2d

Please sign in to comment.