From 457b980de370e3b763a93932aed3d750b9ec1d09 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 20 Dec 2013 19:58:27 +0100 Subject: [PATCH] public server: save the settings --- public_server/public_server.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/public_server/public_server.php b/public_server/public_server.php index 27e219f6..8dacc916 100644 --- a/public_server/public_server.php +++ b/public_server/public_server.php @@ -144,6 +144,19 @@ function public_server_login($a,$b) { function public_server_plugin_admin_post ( &$a ) { check_form_security_token_redirectOnErr('/admin/plugins/publicserver', 'publicserver'); + $expiredays = (( x($_POST, 'expiredays') ) ? notags(trim($_POST['expiredays'] )) : ''); + $expireposts = (( x($_POST, 'expireposts') ) ? notags(trim($_POST['expireposts'] )) : ''); + $nologin = (( x($_POST, 'nologin') ) ? notags(trim($_POST['nologin'] )) : ''); + $flagusers = (( x($_POST, 'flagusers') ) ? notags(trim($_POST['flagusers'] )) : ''); + $flagposts = (( x($_POST, 'flagposts') ) ? notags(trim($_POST['flagposts'] )) : ''); + $flagpostsexpire = (( x($_POST, 'flagpostsexpire') ) ? notags(trim($_POST['flagpostsexpire'] )) : ''); + set_config( 'public_server','expiredays',$expiredays ); + set_config( 'public_server','expireposts',$expireposts ); + set_config( 'public_server','nologin',$nologin ); + set_config( 'public_server','flagusers',$flagusers); + set_config( 'public_server','flagposts',$flagposts ); + set_config( 'public_server','flagpostsexpire',$flagpostsexpire ); + info( t('Settings saved').EOL ); } function public_server_plugin_admin ( &$a, &$o) { $token = get_form_security_token("publicserver"); -- 2.39.5