如何屏蔽NextCloud不受支持提示?

Cloud storage

1 前言

一个问题,一篇文章,一出故事。
笔者升级NextCloud到25.0.4版本后,发现官方推送如下消息,

This community release of Nextcloud is unsupported and push notifications are limited.
这个 Nextcloud 的社区版本不受支持,推送通知功能受限。
This community release of Nextcloud is unsupported and instant notifications are unavailable.
Nextcloud 的这个社区版本不受支持,即时通知不可用。

笔者非常不喜欢以上消息,于是想着屏蔽。
另外,如果你没有NextCloud环境部署,可以参阅以下链接,

如何部署CentOS 8.x nextCloud?

2 最佳实践

2.1 修改登录页面的提示

2.1.1 修改配置文件

vim /var/www/nextcloud/core/Controller/LoginController.php

可见如下配置,

                $loginMessages = $this->session->get('loginMessages');
                if (!$this->manager->isFairUseOfFreePushService()) {
                        if (!is_array($loginMessages)) {
                                $loginMessages = [[], []];
                        }
                        $loginMessages[1][] = $this->l10n->t('This community release of Nextcloud is unsupported and push notifications are limited.');
                }

然后注解以下行,

//$loginMessages[1][] = $this->l10n->t('This community release of Nextcloud is unsupported and push notifications are limited.');

2.1.2 确认配置

https://nextcloud.cmdschool.org

2.2 修改个人页面的提示

2.2.1 修改配置文件

vim /var/www/nextcloud/apps/settings/templates/settings/personal/personal.info.php

注解掉如下代码段,

<!--
<?php if (!$_['isFairUseOfFreePushService']) : ?>
        <div class="section">
                <div class="warning">
                        <?php p($l->t('This community release of Nextcloud is unsupported and instant notifications are unavailable.')); ?>
                </div>
        </div>
<?php endif; ?>
-->

2.2.2 确认配置

https://nextcloud.cmdschool.org/index.php/settings/user

参阅文档
==================
https://help.nextcloud.com/t/hide-disable-community-warning/135199/5

没有评论

发表回复

Cloud storage
如何用命令别名缩写NextCloud的OCC命令?

1 前言 一个问题,一篇文章,一出故事。 NextCloud的occ命令是NextCloud提供的非 …

Cloud storage
如何解决NextCloud OCC命令内存限制错误?

1 前言 一个问题,一篇文章,一出故事。 笔者最近升级NextCloud执行如下OCC命令 sudo …

Cloud storage
如何解决Nextcloud升级Time-out?

1 前言 一个问题,一篇文章,一出故事。 笔者最近升级NextCloud发现如下提示, Step 3 …