Compare commits

...

12 Commits
1.7.4 ... 1.7.6

Author SHA1 Message Date
FreeScout
3e5900b1e0 Merge branch 'master' of github.com:freescout-helpdesk/freescout into dist 2021-05-14 11:20:54 -07:00
FreeScout
f579c43b29 v1.7.6 2021-05-14 11:19:56 -07:00
FreeScout
f2fee6779d thread.attachments_list_append hook 2021-05-14 10:42:54 -07:00
FreeScout
4abb7ecc46 Improved createZipArchive() function 2021-05-14 10:37:16 -07:00
FreeScout
7e8fa56bf5 Add link to remind license keys 2021-05-11 07:13:25 -07:00
FreeScout
ce02ba86db Merge branch 'master' of github.com:freescout-helpdesk/freescout into dist 2021-05-11 02:46:23 -07:00
FreeScout
7fcb585268 v1.7.5 2021-05-11 02:45:24 -07:00
FreeScout
e143280c6c getFileContents() function for Attachment 2021-05-11 02:42:52 -07:00
FreeScout
f82d36afb0 Improve no_activations_left message 2021-05-09 10:33:37 -07:00
FreeScout
e14d899ac4 Fix createExtended Thread method 2021-04-30 10:30:03 -07:00
FreeScout
6a16cbabd2 Fix search in PostgreSQL - closes #1174 2021-04-29 01:39:31 -07:00
FreeScout
e52711d592 Process incoming email even if imap_mime_header_decode fails - closes #351 2021-04-29 00:38:21 -07:00
11 changed files with 48 additions and 35 deletions

View File

@@ -353,4 +353,9 @@ class Attachment extends Model
return $new_attachment;
}
public function getFileContents()
{
return $this->getDisk()->get($this->getStorageFilePath());
}
}

View File

@@ -2333,8 +2333,8 @@ class ConversationsController extends Controller
$query_conversations->where(function ($query) use ($like, $filters, $q) {
$query->where('conversations.subject', 'like', $like)
->orWhere('conversations.customer_email', 'like', $like)
->orWhere('conversations.number', $q)
->orWhere('conversations.id', $q)
->orWhere('conversations.number', (int)$q)
->orWhere('conversations.id', (int)$q)
->orWhere('threads.body', 'like', $like)
->orWhere('threads.from', 'like', $like)
->orWhere('threads.to', 'like', $like)

View File

@@ -585,7 +585,7 @@ class ModulesController extends Controller
$msg = __('License key has been revoked');
break;
case 'no_activations_left':
$msg = __('No activations left for this license key');
$msg = __('No activations left for this license key').' ('.__('Use Deactivate License button to transfer license key from another domain').')';
break;
case 'expired':
$msg = __('License key has expired');

View File

@@ -675,36 +675,39 @@ class Helper
* Create zip archive.
* Source example: public/files/*
* File name example: test.zip.
* storage_path without app/
*/
public static function createZipArchive($source, $file_name, $folder = '')
public static function createZipArchive($source, $file_name, $folder = '', $storage_file_path = '')
{
if (!$source || !$file_name) {
return false;
}
$files = glob($source);
//$dest_folder = storage_path().DIRECTORY_SEPARATOR.'app/zipper';
// if (!file_exists($dest_folder)) {
// $mkdir_result = File::makeDirectory($dest_folder, 0755);
// if (!$mkdir_result) {
// return false;
// }
// }
$storage_path = 'app/zipper'.DIRECTORY_SEPARATOR.$file_name;
$dest_path = storage_path().DIRECTORY_SEPARATOR.$storage_path;
if (!$storage_file_path) {
$storage_file_path = 'zipper'.DIRECTORY_SEPARATOR.$file_name;
} else {
// if (!self::getPrivateStorage()->exists($storage_path)) {
// self::getPrivateStorage()->makeDirectory($storage_path);
// }
}
$dest_path = storage_path().DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.$storage_file_path;
// If file exists it has to be deleted, otherwise Zipper will add file to the existing archive
// By some reason \Storage not finding $storage_path file
// todo: use \Storage
if (\File::exists($dest_path)) {
\File::delete($dest_path);
if (self::getPrivateStorage()->exists($storage_file_path)) {
self::getPrivateStorage()->delete($storage_file_path);
}
\Chumper\Zipper\Facades\Zipper::make($dest_path)->folder($folder)->add($files)->close();
return $dest_path;
}
public static function getPrivateStorage()
{
return \Storage::disk('private');
}
public static function formatException($e)
{
return 'Error: '.$e->getMessage().'; File: '.$e->getFile().' ('.$e->getLine().')';

View File

@@ -959,7 +959,7 @@ class Thread extends Model
$content = null;
$uploaded_file = null;
if (get_class($attachment) == 'Illuminate\Http\UploadedFile') {
if (is_object($attachment) && get_class($attachment) == 'Illuminate\Http\UploadedFile') {
$uploaded_file = $attachment;
$attachment = [];

View File

@@ -12,7 +12,7 @@ return [
| or any other location as required by the application or its packages.
*/
'version' => '1.7.4',
'version' => '1.7.6',
/*
|--------------------------------------------------------------------------

View File

@@ -520,6 +520,14 @@ class Message
$personalParts = imap_mime_header_decode($address->personal);
if (!is_array($personalParts)) {
$p = new \stdClass();
$p->text = $address->personal;
$personalParts = [
$p
];
}
$address->personal = '';
foreach ($personalParts as $p) {
//$address->personal .= $p->text;

View File

@@ -443,11 +443,17 @@ a.navbar-brand:hover img {
/*.navbar-nav.navbar-right > li > .dropdown-menu {
margin-top: -8px;
}*/
.section-heading-right {
display: block;
}
@media (min-width: 768px) {
.navbar-nav > li > a.dropdown-toggle-icon {
padding-top: 14px;
padding-bottom: 14px;
}
.section-heading-right {
float: right;
}
}
@media (max-width:767px) {
.navbar-brand-with-text img + span {

View File

@@ -274,20 +274,7 @@
@action('thread.meta', $thread, $loop, $threads, $conversation, $mailbox)
@if ($thread->has_attachments)
<div class="thread-attachments">
<i class="glyphicon glyphicon-paperclip"></i>
<ul>
@foreach ($thread->attachments as $attachment)
<li>
<a href="{{ $attachment->url() }}" class="break-words" target="_blank">{{ $attachment->file_name }}</a>
<span class="text-help">({{ $attachment->getSizeName() }})</span>
<a href="{{ $attachment->url() }}" download><i class="glyphicon glyphicon-download-alt small"></i></a>
</li>
@endforeach
</ul>
</div>
@endif
@include('conversations/partials/thread_attachments')
</div>
</div>
<div class="dropdown thread-options">

View File

@@ -9,6 +9,7 @@
<a href="{{ $attachment->url() }}" download><i class="glyphicon glyphicon-download-alt small"></i></a>
</li>
@endforeach
@action('thread.attachments_list_append', $thread, $conversation, $mailbox)
</ul>
</div>
@endif

View File

@@ -15,7 +15,10 @@
<div class="section-heading" id="installed">
{{ __('Installed Modules') }}
<a href="#" data-trigger="modal" data-modal-body="#deactivate_license_modal" data-modal-size="sm" data-modal-no-footer="true" data-modal-title="{{ __('Deactivate License') }}" data-modal-on-show="deactivateLicenseModal" class="small pull-right">{{ __('Deactivate License') }}</a>
<span class="section-heading-right">
<a href="#" data-trigger="modal" data-modal-body="#deactivate_license_modal" data-modal-size="sm" data-modal-no-footer="true" data-modal-title="{{ __('Deactivate License') }}" data-modal-on-show="deactivateLicenseModal" class="small">{{ __('Deactivate License') }}</a> |
<a href="https://freescout.net/remind-license-keys/" target="_blank" class="small">{{ __('Remind License Keys') }}</a>
</span>
</div>
@if ($updates_available)