mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Merge branch 'the-djmaze:master' into master
This commit is contained in:
commit
9cc94287f9
6 changed files with 41 additions and 11 deletions
|
|
@ -205,7 +205,6 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
|
||||||
const collection = MessageCollectionModel.reviveFromJson(oData.Result, bCached);
|
const collection = MessageCollectionModel.reviveFromJson(oData.Result, bCached);
|
||||||
if (collection) {
|
if (collection) {
|
||||||
error = '';
|
error = '';
|
||||||
let unreadCountChange = false;
|
|
||||||
|
|
||||||
const
|
const
|
||||||
folder = getFolderFromCacheList(collection.folder),
|
folder = getFolderFromCacheList(collection.folder),
|
||||||
|
|
@ -222,7 +221,6 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
|
||||||
|
|
||||||
if (null != folderInfo.unreadEmails) {
|
if (null != folderInfo.unreadEmails) {
|
||||||
if (pInt(folder.unreadEmails()) !== pInt(folderInfo.unreadEmails)) {
|
if (pInt(folder.unreadEmails()) !== pInt(folderInfo.unreadEmails)) {
|
||||||
unreadCountChange = true;
|
|
||||||
MessageFlagsCache.clearFolder(folder.fullName);
|
MessageFlagsCache.clearFolder(folder.fullName);
|
||||||
}
|
}
|
||||||
folder.unreadEmails(folderInfo.unreadEmails);
|
folder.unreadEmails(folderInfo.unreadEmails);
|
||||||
|
|
@ -279,10 +277,6 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
|
||||||
|
|
||||||
MessagelistUserStore(collection);
|
MessagelistUserStore(collection);
|
||||||
MessagelistUserStore.isIncomplete(false);
|
MessagelistUserStore.isIncomplete(false);
|
||||||
|
|
||||||
if (folder && (bCached || unreadCountChange || SettingsUserStore.useThreads())) {
|
|
||||||
rl.app.folderInformation(folder.fullName, collection);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
MessagelistUserStore.count(0);
|
MessagelistUserStore.count(0);
|
||||||
MessagelistUserStore([]);
|
MessagelistUserStore([]);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
em {
|
em {
|
||||||
display: block;
|
display: block;
|
||||||
white-space: pre;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
|
|
|
||||||
|
|
@ -230,14 +230,15 @@ html:not(rl-mobile) {
|
||||||
}
|
}
|
||||||
|
|
||||||
time, .sizeParent {
|
time, .sizeParent {
|
||||||
margin: 0 5px;
|
margin: 0 5px 0 0;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
min-width: 3.5em;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachmentParent {
|
.attachmentParent {
|
||||||
line-height: 1 !important;
|
|
||||||
margin: 0 10px 0 5px;
|
margin: 0 10px 0 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,10 @@ class InstallStep implements IRepairStep
|
||||||
|
|
||||||
\OCA\SnappyMail\Util\SnappyMailHelper::loadApp();
|
\OCA\SnappyMail\Util\SnappyMailHelper::loadApp();
|
||||||
|
|
||||||
|
\SnappyMail\Upgrade::fixPermissions();
|
||||||
|
|
||||||
$app_dir = \dirname(\dirname(__DIR__)) . '/app';
|
$app_dir = \dirname(\dirname(__DIR__)) . '/app';
|
||||||
|
// $app_dir = \rtrim(APP_INDEX_ROOT_PATH, '\\/');
|
||||||
|
|
||||||
// https://github.com/the-djmaze/snappymail/issues/790#issuecomment-1366527884
|
// https://github.com/the-djmaze/snappymail/issues/790#issuecomment-1366527884
|
||||||
if (!\file_exists($app_dir . '/.htaccess') && \file_exists($app_dir . '/_htaccess')) {
|
if (!\file_exists($app_dir . '/.htaccess') && \file_exists($app_dir . '/_htaccess')) {
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,9 @@ abstract class Upgrade
|
||||||
if (!$bResult) {
|
if (!$bResult) {
|
||||||
throw new \Exception('Extract core files failed');
|
throw new \Exception('Extract core files failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static::fixPermissions();
|
||||||
|
|
||||||
\error_log('Update success');
|
\error_log('Update success');
|
||||||
// opcache_reset is a terrible solution
|
// opcache_reset is a terrible solution
|
||||||
// \is_callable('opcache_reset') && \opcache_reset();
|
// \is_callable('opcache_reset') && \opcache_reset();
|
||||||
|
|
@ -219,4 +222,33 @@ abstract class Upgrade
|
||||||
}
|
}
|
||||||
return $bResult;
|
return $bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevents Apache access error due to directories being 0700
|
||||||
|
public static function fixPermissions($mode = 0755) : void
|
||||||
|
{
|
||||||
|
$target = \rtrim(APP_INDEX_ROOT_PATH, '\\/');
|
||||||
|
// Prevent Apache access error due to directories being 0700
|
||||||
|
foreach (\glob("{$target}/snappymail/v/*", \GLOB_ONLYDIR) as $dir) {
|
||||||
|
\chmod($dir, 0755);
|
||||||
|
$iterator = new \RecursiveIteratorIterator(
|
||||||
|
new \RecursiveDirectoryIterator("{$dir}/static", \FilesystemIterator::SKIP_DOTS),
|
||||||
|
\RecursiveIteratorIterator::SELF_FIRST
|
||||||
|
);
|
||||||
|
foreach ($items as $item) {
|
||||||
|
if ($item->isDir()) {
|
||||||
|
\chmod($item, 0755);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$iterator = new \RecursiveIteratorIterator(
|
||||||
|
new \RecursiveDirectoryIterator("{$dir}/themes", \FilesystemIterator::SKIP_DOTS),
|
||||||
|
\RecursiveIteratorIterator::SELF_FIRST
|
||||||
|
);
|
||||||
|
foreach ($items as $item) {
|
||||||
|
if ($item->isDir()) {
|
||||||
|
\chmod($item, 0755);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,11 +140,11 @@
|
||||||
<div class="flagParent fontastic"></div>
|
<div class="flagParent fontastic"></div>
|
||||||
<div class="senderParent actionHandle" data-bind="attr: {'title': senderClearEmailsString}, text: senderEmailsString"></div>
|
<div class="senderParent actionHandle" data-bind="attr: {'title': senderClearEmailsString}, text: senderEmailsString"></div>
|
||||||
<div class="subjectParent actionHandle" data-bind="text: subject"></div>
|
<div class="subjectParent actionHandle" data-bind="text: subject"></div>
|
||||||
|
<div class="threads-len" data-bind="visible: 1 < threadsLen(), text: threadsLen"></div>
|
||||||
<div class="attachmentParent actionHandle">
|
<div class="attachmentParent actionHandle">
|
||||||
<i data-bind="css: attachmentIconClass"></i>
|
<i data-bind="css: attachmentIconClass"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="sizeParent actionHandle" data-bind="text: friendlySize()"></div>
|
<div class="sizeParent actionHandle" data-bind="text: friendlySize()"></div>
|
||||||
<div class="threads-len" data-bind="visible: 1 < threadsLen(), text: threadsLen"></div>
|
|
||||||
<time class="actionHandle" data-bind="attr:{'data-moment-format':$root.timeFormat()}, moment: dateTimeStampInUTC"></time>
|
<time class="actionHandle" data-bind="attr:{'data-moment-format':$root.timeFormat()}, moment: dateTimeStampInUTC"></time>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -160,11 +160,11 @@
|
||||||
<div class="flagParent fontastic"></div>
|
<div class="flagParent fontastic"></div>
|
||||||
<div class="senderParent actionHandle" data-bind="attr: {'title': senderClearEmailsString}, text: senderEmailsString"></div>
|
<div class="senderParent actionHandle" data-bind="attr: {'title': senderClearEmailsString}, text: senderEmailsString"></div>
|
||||||
<div class="subjectParent actionHandle" data-bind="text: subject"></div>
|
<div class="subjectParent actionHandle" data-bind="text: subject"></div>
|
||||||
|
<div class="threads-len" data-bind="visible: 1 < threadsLen(), text: threadsLen"></div>
|
||||||
<div class="attachmentParent actionHandle">
|
<div class="attachmentParent actionHandle">
|
||||||
<i data-bind="css: attachmentIconClass"></i>
|
<i data-bind="css: attachmentIconClass"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="sizeParent actionHandle" data-bind="text: friendlySize()"></div>
|
<div class="sizeParent actionHandle" data-bind="text: friendlySize()"></div>
|
||||||
<div class="threads-len" data-bind="visible: 1 < threadsLen(), text: threadsLen"></div>
|
|
||||||
<time class="actionHandle" data-moment-format="AUTO" data-bind="moment: dateTimeStampInUTC"></time>
|
<time class="actionHandle" data-moment-format="AUTO" data-bind="moment: dateTimeStampInUTC"></time>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue