improve posting to mod pconfig via ajax
This commit is contained in:
parent
25a74f3664
commit
ae875734e2
@ -21,6 +21,7 @@ class Pconfig extends \Zotlabs\Web\Controller {
|
|||||||
$cat = trim(escape_tags($_POST['cat']));
|
$cat = trim(escape_tags($_POST['cat']));
|
||||||
$k = trim(escape_tags($_POST['k']));
|
$k = trim(escape_tags($_POST['k']));
|
||||||
$v = trim($_POST['v']);
|
$v = trim($_POST['v']);
|
||||||
|
$aj = intval($_POST['aj']);
|
||||||
|
|
||||||
if(in_array(argv(2),$this->disallowed_pconfig())) {
|
if(in_array(argv(2),$this->disallowed_pconfig())) {
|
||||||
notice( t('This setting requires special processing and editing has been blocked.') . EOL);
|
notice( t('This setting requires special processing and editing has been blocked.') . EOL);
|
||||||
@ -34,6 +35,9 @@ class Pconfig extends \Zotlabs\Web\Controller {
|
|||||||
set_pconfig(local_channel(),$cat,$k,$v);
|
set_pconfig(local_channel(),$cat,$k,$v);
|
||||||
build_sync_packet();
|
build_sync_packet();
|
||||||
|
|
||||||
|
if($aj)
|
||||||
|
killme();
|
||||||
|
else
|
||||||
goaway(z_root() . '/pconfig/' . $cat . '/' . $k);
|
goaway(z_root() . '/pconfig/' . $cat . '/' . $k);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user