Hook::register('footer' , __FILE__, 'qcomment_footer');
}
-function qcomment_footer(App $a, string &$body)
+function qcomment_footer(string &$body)
{
DI::page()->registerFooterScript('addon/qcomment/qcomment.js');
}
-function qcomment_addon_settings(App &$a, array &$data)
+function qcomment_addon_settings(array &$data)
{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
- $words = DI::pConfig()->get(local_user(), 'qcomment', 'words', DI::l10n()->t(':-)') . "\n" . DI::l10n()->t(':-(') . "\n" . DI::l10n()->t('lol'));
+ $words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'qcomment', 'words', DI::l10n()->t(':-)') . "\n" . DI::l10n()->t(':-(') . "\n" . DI::l10n()->t('lol'));
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/qcomment/');
$html = Renderer::replaceMacros($t, [
];
}
-function qcomment_addon_settings_post(App $a, array &$body)
+function qcomment_addon_settings_post(array &$b)
{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
if (isset($_POST['qcomment-words'])) {
- DI::pConfig()->set(local_user(), 'qcomment', 'words', XML::escape($_POST['qcomment-words']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'qcomment', 'words', XML::escape($_POST['qcomment-words']));
}
}