mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Replace Addon class with AddonHelper
This commit is contained in:
parent
45d3a6fb74
commit
48ff761bdb
2 changed files with 6 additions and 4 deletions
|
@ -6,7 +6,6 @@
|
||||||
* Author: Klaus Weidenbach <http://friendica.dszdw.net/profile/klaus>
|
* Author: Klaus Weidenbach <http://friendica.dszdw.net/profile/klaus>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
|
@ -71,7 +70,9 @@ function libravatar_addon_admin(string &$o)
|
||||||
'pagan' => DI::l10n()->t('retro adventure game character'),
|
'pagan' => DI::l10n()->t('retro adventure game character'),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (Addon::isEnabled('gravatar')) {
|
$addonHelper = DI::addonHelper();
|
||||||
|
|
||||||
|
if ($addonHelper->isAddonEnabled('gravatar')) {
|
||||||
$o = '<h5>' .DI::l10n()->t('Information') .'</h5><p>' .DI::l10n()->t('Gravatar addon is installed. Please disable the Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'</p><br><br>';
|
$o = '<h5>' .DI::l10n()->t('Information') .'</h5><p>' .DI::l10n()->t('Gravatar addon is installed. Please disable the Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'</p><br><br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
use Friendica\Content\Text\BBCode;
|
use Friendica\Content\Text\BBCode;
|
||||||
use Friendica\Content\Text\HTML;
|
use Friendica\Content\Text\HTML;
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Protocol;
|
use Friendica\Core\Protocol;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
|
@ -627,7 +626,9 @@ function pumpio_action(int $uid, string $uri, string $action, string $content =
|
||||||
|
|
||||||
function pumpio_sync()
|
function pumpio_sync()
|
||||||
{
|
{
|
||||||
if (!Addon::isEnabled('pumpio')) {
|
$addonHelper = DI::addonHelper();
|
||||||
|
|
||||||
|
if (!$addonHelper->isAddonEnabled('pumpio')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue