summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-10-08 22:40:37 +0200
committerGitHub <noreply@github.com>2020-10-08 22:40:37 +0200
commit0dbb99a81bc39cee97f6644faef5bec24881b69c (patch)
tree80ec2f25d80c1e33034f274049234a9dc2b3d588
parentb2dedbcc13982dac51e15432c75cd98856520e2b (diff)
parent9c8e8007f98ad45f59101a75c9b8037f48b504dc (diff)
downloadnextcloud-server-0dbb99a81bc39cee97f6644faef5bec24881b69c.tar.gz
nextcloud-server-0dbb99a81bc39cee97f6644faef5bec24881b69c.zip
Merge pull request #23161 from nextcloud/enh/noid/setup-checks2
Remove setup check for php mail
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php6
-rw-r--r--apps/settings/tests/Controller/CheckSetupControllerTest.php40
-rw-r--r--core/js/setupchecks.js12
3 files changed, 0 insertions, 58 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 6d237e04c1c..5c7bb4a85ef 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -522,10 +522,6 @@ Raw output
return [];
}
- protected function isPHPMailerUsed(): bool {
- return $this->config->getSystemValue('mail_smtpmode', 'smtp') === 'php';
- }
-
protected function hasOpcacheLoaded(): bool {
return extension_loaded('Zend OPcache');
}
@@ -722,8 +718,6 @@ Raw output
'missingColumns' => $this->hasMissingColumns(),
'isSqliteUsed' => $this->isSqliteUsed(),
'databaseConversionDocumentation' => $this->urlGenerator->linkToDocs('admin-db-conversion'),
- 'isPHPMailerUsed' => $this->isPHPMailerUsed(),
- 'mailSettingsDocumentation' => $this->urlGenerator->getAbsoluteURL('index.php/settings/admin'),
'isMemoryLimitSufficient' => $this->memoryInfo->isMemoryLimitSufficient(),
'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(),
'recommendedPHPModules' => $this->hasRecommendedPHPModules(),
diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php
index c3071de2f8e..13bb54c7cea 100644
--- a/apps/settings/tests/Controller/CheckSetupControllerTest.php
+++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php
@@ -479,10 +479,6 @@ class CheckSetupControllerTest extends TestCase {
'relativeTime' => '2 hours ago',
'backgroundJobsUrl' => 'https://example.org',
]);
- $this->checkSetupController
- ->expects($this->once())
- ->method('isPHPMailerUsed')
- ->willReturn(false);
$this->checker
->expects($this->once())
->method('hasPassedCheck')
@@ -588,8 +584,6 @@ class CheckSetupControllerTest extends TestCase {
'databaseConversionDocumentation' => 'http://docs.example.org/server/go.php?to=admin-db-conversion',
'missingIndexes' => [],
'missingColumns' => [],
- 'isPHPMailerUsed' => false,
- 'mailSettingsDocumentation' => 'https://server/index.php/settings/admin',
'isMemoryLimitSufficient' => true,
'appDirsWithDifferentOwner' => [],
'recommendedPHPModules' => [],
@@ -605,40 +599,6 @@ class CheckSetupControllerTest extends TestCase {
$this->assertEquals($expected, $this->checkSetupController->check());
}
- public function testIsPHPMailerUsed() {
- $checkSetupController = $this->getMockBuilder(CheckSetupController::class)
- ->setConstructorArgs([
- 'settings',
- $this->request,
- $this->config,
- $this->clientService,
- $this->urlGenerator,
- $this->l10n,
- $this->checker,
- $this->logger,
- $this->dispatcher,
- $this->db,
- $this->lockingProvider,
- $this->dateTimeFormatter,
- $this->memoryInfo,
- $this->secureRandom,
- $this->iniGetWrapper,
- ])
- ->setMethods(null)->getMock();
-
- $this->config->expects($this->at(0))
- ->method('getSystemValue')
- ->with('mail_smtpmode', 'smtp')
- ->willReturn('php');
- $this->config->expects($this->at(1))
- ->method('getSystemValue')
- ->with('mail_smtpmode', 'smtp')
- ->willReturn('not-php');
-
- $this->assertTrue($this->invokePrivate($checkSetupController, 'isPHPMailerUsed'));
- $this->assertFalse($this->invokePrivate($checkSetupController, 'isPHPMailerUsed'));
- }
-
public function testGetCurlVersion() {
$checkSetupController = $this->getMockBuilder(CheckSetupController::class)
->setConstructorArgs([
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index 4773a201535..c8ca1afe511 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -417,18 +417,6 @@
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
})
}
- if (data.isPHPMailerUsed) {
- messages.push({
- msg: t(
- 'core',
- 'Use of the the built in php mailer is no longer supported. <a target="_blank" rel="noreferrer noopener" href="{docLink}">Please update your email server settings ↗<a/>.',
- {
- docLink: data.mailSettingsDocumentation,
- }
- ),
- type: OC.SetupChecks.MESSAGE_TYPE_WARNING
- });
- }
if (!data.isMemoryLimitSufficient) {
messages.push({
msg: t(