如何屏蔽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

没有评论

发表回复

Bash
如何自动根据职位设置NextCloud用户配额?

1 前言 一个问题,一篇文章,一出故事。 今天更新一个自动根据AD中的职位(title)设置Next …

Cloud storage
如何备份Nextcloud的启用应用列表?

1 前言 一个问题,一篇文章,一出故事。 笔者今天需要手动更新NextCloud,于是想到手动备份N …

Cloud storage
如何配置Nextcloud集成Keycloak?

1 前言 一个问题,一篇文章,一出故事。 本章将在Nextcloud应用中使用Keycloak作为身 …