如何屏蔽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
如何部署基于Nginx部署NextCloud?

1 前言 一个问题,一篇文章,一出故事。 以往使用LAMP环境部署的NextCloud已经工作良久, …

Cloud storage
如何修复NextCloud通讯录图片损坏问题?

1 前言 一个问题,一篇文章,一出故事。 笔者最近需要测试升级NextCloud,发现通讯录显示损坏 …

Cloud storage
如何迁移NextCloud数据目录?

1 前言 一个问题,一篇文章,一出故事。 笔者需要迁移NextCloud的默认数据目录“/var/w …