disallowed_pconfig())) {
notice(t('This setting requires special processing and editing has been blocked.') . EOL);
return;
}
if (strpos($k, 'password') !== false) {
$v = obscurify($v);
}
set_pconfig(local_channel(), $cat, $k, $v);
Libsync::build_sync_packet();
if ($aj) {
killme();
}
goaway(z_root() . '/pconfig/' . $cat . '/' . $k);
}
public function get()
{
if (!local_channel()) {
return login();
}
$content = '
' . t('Configuration Editor') . '
';
$content .= '' . t('Warning: Changing some settings could render your channel inoperable. Please leave this page unless you are comfortable with and knowledgeable about how to correctly use this feature.') . '
' . EOL . EOL;
if (argc() == 3) {
$content .= 'pconfig[' . local_channel() . ']' . EOL;
$content .= 'pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . ']' . EOL . EOL;
$content .= 'pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . '][' . escape_tags(argv(2)) . '] = ' . get_pconfig(local_channel(), escape_tags(argv(1)), escape_tags(argv(2))) . EOL;
if (in_array(argv(2), $this->disallowed_pconfig())) {
notice(t('This setting requires special processing and editing has been blocked.') . EOL);
return $content;
} else {
$content .= $this->pconfig_form(escape_tags(argv(1)), escape_tags(argv(2)));
}
}
if (argc() == 2) {
$content .= 'pconfig[' . local_channel() . ']' . EOL;
load_pconfig(local_channel(), escape_tags(argv(1)));
if (App::$config[local_channel()][escape_tags(argv(1))]) {
foreach (App::$config[local_channel()][escape_tags(argv(1))] as $k => $x) {
$content .= 'pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . '][' . $k . '] = ' . escape_tags($x) . EOL;
}
}
}
if (argc() == 1) {
$r = q("select * from pconfig where uid = " . local_channel());
if ($r) {
foreach ($r as $rr) {
$content .= 'pconfig[' . local_channel() . '][' . escape_tags($rr['cat']) . '][' . escape_tags($rr['k']) . '] = ' . escape_tags($rr['v']) . EOL;
}
}
}
return $content;
}
public function pconfig_form($cat, $k)
{
$o = '';
return $o;
}
public function disallowed_pconfig()
{
return array(
'permissions_role'
);
}
}