* Status: Unsupported
*/
-use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
Hook::register('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
}
-function remote_permissions_uninstall() {
- Hook::unregister('lockview_content', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_content');
- Hook::unregister('addon_settings', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings');
- Hook::unregister('addon_settings_post', 'addon/remote_permissions/remote_permissions.php', 'remote_permissions_settings_post');
-}
-
function remote_permissions_settings(&$a,&$o) {
if(! local_user())
return;
DI::pConfig()->set(local_user(),'remote_perms','show',intval($_POST['remote-perms']));
- info(DI::l10n()->t('Remote Permissions settings updated.') . EOL);
}
function remote_permissions_content($a, $item_copy) {
function remote_permissions_addon_admin_post(&$a){
$choice = (!empty($_POST['remotepermschoice']) ? Strings::escapeTags(trim($_POST['remotepermschoice'])) : '');
- Config::set('remote_perms','global',($choice == 1 ? 1 : 0));
- info(DI::l10n()->t('Settings updated.'). EOL);
+ DI::config()->set('remote_perms','global',($choice == 1 ? 1 : 0));
}