Merge pull request #857 from MrPetovan/task/fix-admin-addons

[various] Fix *_addon_admin_post parameters
pull/860/head
Tobias Diekershoff 2019-05-15 15:04:35 +02:00 committed by GitHub
commit f6c8476228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -56,15 +56,13 @@ function cookienotice_addon_admin(App $a, &$s)
/** /**
* cookienotice_addon_admin_post * cookienotice_addon_admin_post
* addon_settings_post hook
* handles the post request from the admin panel * handles the post request from the admin panel
* *
* @param App $a * @param App $a
* @param string $b
* *
* @return void * @return void
*/ */
function cookienotice_addon_admin_post(App $a, &$b) function cookienotice_addon_admin_post(App $a)
{ {
if (!is_site_admin()) { if (!is_site_admin()) {
return; return;
@ -73,7 +71,7 @@ function cookienotice_addon_admin_post(App $a, &$b)
if ($_POST['cookienotice-submit']) { if ($_POST['cookienotice-submit']) {
Config::set('cookienotice', 'text', trim(strip_tags($_POST['cookienotice-text']))); Config::set('cookienotice', 'text', trim(strip_tags($_POST['cookienotice-text'])));
Config::set('cookienotice', 'oktext', trim(strip_tags($_POST['cookienotice-oktext']))); Config::set('cookienotice', 'oktext', trim(strip_tags($_POST['cookienotice-oktext'])));
info(L10n::t('cookienotice Settings saved.') . EOL); info(L10n::t('cookienotice Settings saved.'));
} }
} }

View File

@ -42,7 +42,7 @@ function pageheader_addon_admin(App &$a, &$s)
return; return;
} }
function pageheader_addon_admin_post(App $a, &$b) function pageheader_addon_admin_post(App $a)
{ {
if(!is_site_admin()) { if(!is_site_admin()) {
return; return;
@ -52,7 +52,7 @@ function pageheader_addon_admin_post(App $a, &$b)
if (isset($_POST['pageheader-words'])) { if (isset($_POST['pageheader-words'])) {
Config::set('pageheader', 'text', trim(strip_tags($_POST['pageheader-words']))); Config::set('pageheader', 'text', trim(strip_tags($_POST['pageheader-words'])));
} }
info(L10n::t('pageheader Settings saved.') . EOL); info(L10n::t('pageheader Settings saved.'));
} }
} }