Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e5900b1e0 | ||
|
|
f579c43b29 | ||
|
|
f2fee6779d | ||
|
|
4abb7ecc46 | ||
|
|
7e8fa56bf5 | ||
|
|
ce02ba86db | ||
|
|
7fcb585268 | ||
|
|
e143280c6c | ||
|
|
f82d36afb0 | ||
|
|
e14d899ac4 | ||
|
|
6a16cbabd2 | ||
|
|
e52711d592 |
@@ -353,4 +353,9 @@ class Attachment extends Model
|
||||
|
||||
return $new_attachment;
|
||||
}
|
||||
|
||||
public function getFileContents()
|
||||
{
|
||||
return $this->getDisk()->get($this->getStorageFilePath());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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().')';
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
@@ -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',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -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;
|
||||
|
||||
6
public/css/style.css
vendored
6
public/css/style.css
vendored
@@ -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 {
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user