Nextcloud25 Call to undefined method OC_App::registerPersonal() #96

https://github.com/pierre-alain-b/rainloop-nextcloud/issues/285
This commit is contained in:
the-djmaze 2022-10-11 10:53:15 +02:00
parent 258f7fb1ad
commit e7a54e69d1
4 changed files with 20 additions and 18 deletions

View file

@ -10,6 +10,4 @@
$app = new OCA\SnappyMail\AppInfo\Application(); $app = new OCA\SnappyMail\AppInfo\Application();
$app->registerNavigation(); $app->registerNavigation();
$app->registerPersonalSettings();
$app->getContainer()->query('SnappyMailHelper')->registerHooks(); $app->getContainer()->query('SnappyMailHelper')->registerHooks();

View file

@ -6,24 +6,24 @@
<description>Simple, modern and fast web-based email client. After enabling in Nextcloud, go to Nextcloud admin panel, "Additionnal settings" and you will see a "SnappyMail webmail" section. There, click on the link to go to the SnappyMail admin panel. The default user/password is admin/12345. This version is based on SnappyMail 2.6.0 (2021-07).</description> <description>Simple, modern and fast web-based email client. After enabling in Nextcloud, go to Nextcloud admin panel, "Additionnal settings" and you will see a "SnappyMail webmail" section. There, click on the link to go to the SnappyMail admin panel. The default user/password is admin/12345. This version is based on SnappyMail 2.6.0 (2021-07).</description>
<version>2.18.5</version> <version>2.18.5</version>
<licence>agpl</licence> <licence>agpl</licence>
<author>SnappyMail Team, Nextgen-Networks, Tab Fitts, Nathan Kinkade, Pierre-Alain Bandinelli</author> <author>SnappyMail, RainLoop Team, Nextgen-Networks, Tab Fitts, Nathan Kinkade, Pierre-Alain Bandinelli</author>
<namespace>SnappyMail</namespace> <namespace>SnappyMail</namespace>
<documentation> <documentation>
<user>https://github.com/pierre-alain-b/snappymail-nextcloud/blob/master/README.md</user> <user>https://github.com/the-djmaze/snappymail/blob/master/integrations/nextcloud/snappymail/README.md</user>
<website>https://snappymail.eu/</website> <website>https://snappymail.eu/</website>
</documentation> </documentation>
<category>social</category> <category>social</category>
<category>tools</category> <category>tools</category>
<category>integration</category> <category>integration</category>
<screenshot>https://raw.githubusercontent.com/pierre-alain-b/snappymail-nextcloud/master/screenshots/2016.10.20-screenshot.jpg</screenshot> <screenshot>https://raw.githubusercontent.com/pierre-alain-b/snappymail-nextcloud/master/screenshots/2016.10.20-screenshot.jpg</screenshot>
<website>https://github.com/pierre-alain-b/snappymail-nextcloud</website> <website>https://github.com/the-djmaze/snappymail</website>
<bugs>https://github.com/pierre-alain-b/snappymail-nextcloud/issues</bugs> <bugs>https://github.com/the-djmaze/snappymail/issues/96</bugs>
<dependencies> <dependencies>
<php min-version="7.4" /> <php min-version="7.4" />
<owncloud min-version="6" max-version="9.2" /> <nextcloud min-version="20" max-version="24" />
<nextcloud min-version="20" max-version="22" />
</dependencies> </dependencies>
<settings> <settings>
<admin>OCA\SnappyMail\Settings\AdminSettings</admin> <admin>OCA\SnappyMail\Settings\AdminSettings</admin>
<personal>OCA\SnappyMail\Settings\PersonalSettings</personal>
</settings> </settings>
</info> </info>

View file

@ -71,9 +71,4 @@ class Application extends App {
}); });
} }
public function registerPersonalSettings() {
\OCP\App::registerPersonal('snappymail', 'templates/personal');
} }
}

View file

@ -3,8 +3,10 @@ namespace OCA\SnappyMail\Settings;
use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig; use OCP\IConfig;
use OCP\Settings\ISettings;
class PersonalSettings { class PersonalSettings implements ISettings
{
private $config; private $config;
public function __construct(IConfig $config) { public function __construct(IConfig $config) {
@ -28,5 +30,12 @@ class PersonalSettings {
return new TemplateResponse('snappymail', 'personal_settings', $parameters, ''); return new TemplateResponse('snappymail', 'personal_settings', $parameters, '');
} }
public function getSection() {
return 'additional';
} }
public function getPriority() {
return 50;
}
}