如何屏蔽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分享连接输错误密码留下日志?

1 前言 一个问题,一篇文章,一出故事。 我们最近发现有用户因为输入错误的nextcloud分享连接 …

Cloud storage
如何修改nextcloud分享链接密码?

1 前言 一个问题,一篇文章,一出故事。 最近在笔者需要通过更新nextCloud用户分享链接的密码 …

Cloud storage
如何使用API更新netxtCloud的分享链接密码?

1 前言 一个问题,一篇文章,一出故事。 最近在笔者需要通过API去更新nextCloud用户分享链 …