Merge branch 'the-djmaze:master' into master

This commit is contained in:
ner0 2023-02-06 15:35:07 +00:00 committed by GitHub
commit 9cc94287f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 11 deletions

View file

@ -205,7 +205,6 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
const collection = MessageCollectionModel.reviveFromJson(oData.Result, bCached);
if (collection) {
error = '';
let unreadCountChange = false;
const
folder = getFolderFromCacheList(collection.folder),
@ -222,7 +221,6 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
if (null != folderInfo.unreadEmails) {
if (pInt(folder.unreadEmails()) !== pInt(folderInfo.unreadEmails)) {
unreadCountChange = true;
MessageFlagsCache.clearFolder(folder.fullName);
}
folder.unreadEmails(folderInfo.unreadEmails);
@ -279,10 +277,6 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
MessagelistUserStore(collection);
MessagelistUserStore.isIncomplete(false);
if (folder && (bCached || unreadCountChange || SettingsUserStore.useThreads())) {
rl.app.folderInformation(folder.fullName, collection);
}
} else {
MessagelistUserStore.count(0);
MessagelistUserStore([]);

View file

@ -4,7 +4,7 @@
em {
display: block;
white-space: pre;
white-space: pre-wrap;
}
th {

View file

@ -230,14 +230,15 @@ html:not(rl-mobile) {
}
time, .sizeParent {
margin: 0 5px;
margin: 0 5px 0 0;
opacity: 0.7;
font-size: 11px;
white-space: nowrap;
min-width: 3.5em;
text-align: right;
}
.attachmentParent {
line-height: 1 !important;
margin: 0 10px 0 5px;
}

View file

@ -26,7 +26,10 @@ class InstallStep implements IRepairStep
\OCA\SnappyMail\Util\SnappyMailHelper::loadApp();
\SnappyMail\Upgrade::fixPermissions();
$app_dir = \dirname(\dirname(__DIR__)) . '/app';
// $app_dir = \rtrim(APP_INDEX_ROOT_PATH, '\\/');
// https://github.com/the-djmaze/snappymail/issues/790#issuecomment-1366527884
if (!\file_exists($app_dir . '/.htaccess') && \file_exists($app_dir . '/_htaccess')) {

View file

@ -209,6 +209,9 @@ abstract class Upgrade
if (!$bResult) {
throw new \Exception('Extract core files failed');
}
static::fixPermissions();
\error_log('Update success');
// opcache_reset is a terrible solution
// \is_callable('opcache_reset') && \opcache_reset();
@ -219,4 +222,33 @@ abstract class Upgrade
}
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);
}
}
}
}
}

View file

@ -140,11 +140,11 @@
<div class="flagParent fontastic"></div>
<div class="senderParent actionHandle" data-bind="attr: {'title': senderClearEmailsString}, text: senderEmailsString"></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">
<i data-bind="css: attachmentIconClass"></i>
</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>
</div>
</div>
@ -160,11 +160,11 @@
<div class="flagParent fontastic"></div>
<div class="senderParent actionHandle" data-bind="attr: {'title': senderClearEmailsString}, text: senderEmailsString"></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">
<i data-bind="css: attachmentIconClass"></i>
</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>
</div>
</div>