mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-12 11:28:49 +00:00
renaming and moving from security to Model/Item and BaseModule
This commit is contained in:
parent
e7f4dc8454
commit
0bb8fdfde2
5 changed files with 15 additions and 11 deletions
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
|
@ -104,7 +105,7 @@ function gravatar_addon_admin (&$a, &$o) {
|
|||
}
|
||||
|
||||
// output Gravatar settings
|
||||
$o .= '<input type="hidden" name="form_security_token" value="' .Security::get_form_security_token("gravatarsave") .'">';
|
||||
$o .= '<input type="hidden" name="form_security_token" value="' . BaseModule::getFormSecurityToken("gravatarsave") .'">';
|
||||
$o .= replace_macros( $t, [
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$default_avatar' => ['avatar', L10n::t('Default avatar image'), $default_avatar, L10n::t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars],
|
||||
|
@ -116,7 +117,7 @@ function gravatar_addon_admin (&$a, &$o) {
|
|||
* Save admin settings
|
||||
*/
|
||||
function gravatar_addon_admin_post (&$a) {
|
||||
Security::check_form_security_token('gravatarsave');
|
||||
BaseModule::checkFormSecurityToken('gravatarsave');
|
||||
|
||||
$default_avatar = ((x($_POST, 'avatar')) ? notags(trim($_POST['avatar'])) : 'identicon');
|
||||
$rating = ((x($_POST, 'rating')) ? notags(trim($_POST['rating'])) : 'g');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue