mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-22 19:50:20 +00:00
Replace DI::app() with DI::appHelper()
This commit is contained in:
parent
5f7482d081
commit
84659fc1ad
19 changed files with 21 additions and 21 deletions
|
@ -271,7 +271,7 @@ function advancedcontentfilter_content()
|
|||
'rule_expression' => DI::l10n()->t('Rule Expression'),
|
||||
'cancel' => DI::l10n()->t('Cancel'),
|
||||
],
|
||||
'$current_theme' => DI::app()->getCurrentTheme(),
|
||||
'$current_theme' => DI::appHelper()->getCurrentTheme(),
|
||||
'$rules' => DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()])),
|
||||
'$form_security_token' => BaseModule::getFormSecurityToken()
|
||||
]);
|
||||
|
|
|
@ -98,7 +98,7 @@ function bluesky_install()
|
|||
|
||||
function bluesky_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('bluesky'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('bluesky'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function bluesky_check_item_notification(array &$notification_data)
|
||||
|
|
|
@ -39,7 +39,7 @@ function fancybox_render(array &$b){
|
|||
function ($text) use ($gallery) {
|
||||
// This processes images inlined in posts
|
||||
// Frio / Vier hooks für lightbox are un-hooked in fancybox-config.js. So this works for them, too!
|
||||
//if (!in_array(DI::app()->getCurrentTheme(),['vier','frio']))
|
||||
//if (!in_array(DI::appHelper()->getCurrentTheme(),['vier','frio']))
|
||||
$text = preg_replace(
|
||||
'#<a[^>]*href="([^"]*)"[^>]*>(<img[^>]*src="[^"]*"[^>]*>)</a>#',
|
||||
'<a data-fancybox="' . $gallery . '" href="$1">$2</a>',
|
||||
|
|
|
@ -34,7 +34,7 @@ function geonames_install()
|
|||
|
||||
function geonames_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('geonames'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('geonames'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function geonames_post_hook(array &$item)
|
||||
|
|
|
@ -25,7 +25,7 @@ function gravatar_install() {
|
|||
|
||||
function gravatar_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('gravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('gravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,7 @@ function highlightjs_install()
|
|||
|
||||
function highlightjs_head(string &$str)
|
||||
{
|
||||
if (DI::app()->getCurrentTheme() == 'frio') {
|
||||
if (DI::appHelper()->getCurrentTheme() == 'frio') {
|
||||
$style = 'bootstrap';
|
||||
} else {
|
||||
$style = 'default';
|
||||
|
|
|
@ -55,7 +55,7 @@ function impressum_footer(string &$body)
|
|||
|
||||
function impressum_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('impressum'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('impressum'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function impressum_show(string &$body)
|
||||
|
|
|
@ -44,7 +44,7 @@ function ldapauth_install()
|
|||
|
||||
function ldapauth_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('ldapauth'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('ldapauth'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function ldapauth_hook_authenticate(array &$b)
|
||||
|
|
|
@ -25,7 +25,7 @@ function libravatar_install()
|
|||
|
||||
function libravatar_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('libravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('libravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,7 +36,7 @@ function openstreetmap_install()
|
|||
|
||||
function openstreetmap_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('openstreetmap'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('openstreetmap'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function openstreetmap_alterheader(&$navHtml)
|
||||
|
|
|
@ -24,7 +24,7 @@ function phpmailer_install()
|
|||
|
||||
function phpmailer_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('phpmailer'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('phpmailer'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,7 +50,7 @@ function piwik_install() {
|
|||
|
||||
function piwik_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('piwik'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('piwik'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function piwik_analytics(string &$b)
|
||||
|
|
|
@ -90,7 +90,7 @@ function pnut_connect()
|
|||
|
||||
function pnut_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('pnut'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('pnut'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function pnut_addon_admin(string &$o)
|
||||
|
|
|
@ -28,7 +28,7 @@ function public_server_install()
|
|||
|
||||
function public_server_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('public_server'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('public_server'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function public_server_register_account($b)
|
||||
|
|
|
@ -319,7 +319,7 @@ function pumpio_settings_post(array &$b)
|
|||
|
||||
function pumpio_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('pumpio'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('pumpio'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function pumpio_hook_fork(array &$b)
|
||||
|
|
|
@ -19,7 +19,7 @@ function smileybutton_install()
|
|||
function smileybutton_jot_tool(string &$body)
|
||||
{
|
||||
// Disable if theme is quattro
|
||||
if (DI::app()->getCurrentTheme() == 'quattro') {
|
||||
if (DI::appHelper()->getCurrentTheme() == 'quattro') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ function smileybutton_jot_tool(string &$body)
|
|||
$s .= '</tr></table>';
|
||||
|
||||
//Add css to header
|
||||
$css_file = __DIR__ . '/view/' . DI::app()->getCurrentTheme() . '.css';
|
||||
$css_file = __DIR__ . '/view/' . DI::appHelper()->getCurrentTheme() . '.css';
|
||||
if (!file_exists($css_file)) {
|
||||
$css_file = __DIR__ . '/view/default.css';
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ function smileybutton_jot_tool(string &$body)
|
|||
DI::page()->registerStylesheet($css_file);
|
||||
|
||||
//Get the correct image for the theme
|
||||
$image = 'addon/smileybutton/view/' . DI::app()->getCurrentTheme() . '.png';
|
||||
$image = 'addon/smileybutton/view/' . DI::appHelper()->getCurrentTheme() . '.png';
|
||||
if (!file_exists($image)) {
|
||||
$image = 'addon/smileybutton/view/default.png';
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ function testdrive_install()
|
|||
|
||||
function testdrive_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('testdrive'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('testdrive'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function testdrive_globaldir_update(array &$b)
|
||||
|
|
|
@ -65,7 +65,7 @@ function tumblr_install()
|
|||
|
||||
function tumblr_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('tumblr'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('tumblr'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function tumblr_check_item_notification(array &$notification_data)
|
||||
|
|
|
@ -67,7 +67,7 @@ function twitter_install()
|
|||
|
||||
function twitter_load_config(ConfigFileManager $loader)
|
||||
{
|
||||
DI::app()->getConfigCache()->load($loader->loadAddonConfig('twitter'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('twitter'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
|
||||
}
|
||||
|
||||
function twitter_jot_nets(array &$jotnets_fields)
|
||||
|
|
Loading…
Reference in a new issue