diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-07-02 20:57:06 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-07-02 20:57:06 -0700 |
commit | 9369e521bbe45c5be3e5342d14b0670c85f78a31 (patch) | |
tree | cc217667bd5138a3133633cc8a52883dfb80da82 /mod/pconfig.php | |
parent | f6fae2ebd9b514e4c50057b487777e853a64d04d (diff) | |
download | volse-hubzilla-9369e521bbe45c5be3e5342d14b0670c85f78a31.tar.gz volse-hubzilla-9369e521bbe45c5be3e5342d14b0670c85f78a31.tar.bz2 volse-hubzilla-9369e521bbe45c5be3e5342d14b0670c85f78a31.zip |
a bit of cleanup and explanatory text on mod/pconfig
Diffstat (limited to 'mod/pconfig.php')
-rwxr-xr-x | mod/pconfig.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/mod/pconfig.php b/mod/pconfig.php index d6719792b..e0ceb5d22 100755 --- a/mod/pconfig.php +++ b/mod/pconfig.php @@ -24,7 +24,7 @@ function pconfig_post(&$a) { $v = trim($_POST['v']); if(in_array(argv(2),disallowed_pconfig())) { - notice( t('This setting requires special processing and has been blocked.') . EOL); + notice( t('This setting requires special processing and editing has been blocked.') . EOL); return; } @@ -45,18 +45,27 @@ function pconfig_content(&$a) { return login(); } + $content = '<h3>' . t('Configuration Editor') . '</h3>'; + $content .= '<div class="descriptive-paragraph">' . 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.') . '</div>' . EOL . EOL; + if(argc() == 3) { - $content = '<a href="pconfig">pconfig[' . local_channel() . ']</a>' . EOL; + $content .= '<a href="pconfig">pconfig[' . local_channel() . ']</a>' . EOL; $content .= '<a href="pconfig/' . escape_tags(argv(1)) . '">pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . ']</a>' . EOL . EOL; $content .= '<a href="pconfig/' . escape_tags(argv(1)) . '/' . escape_tags(argv(2)) . '" >pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . '][' . escape_tags(argv(2)) . ']</a> = ' . get_pconfig(local_channel(),escape_tags(argv(1)),escape_tags(argv(2))) . EOL; - $content .= pconfig_form(escape_tags(argv(1)),escape_tags(argv(2))); + + if(in_array(argv(2),disallowed_pconfig())) { + notice( t('This setting requires special processing and editing has been blocked.') . EOL); + return $content; + } + else + $content .= pconfig_form(escape_tags(argv(1)),escape_tags(argv(2))); } if(argc() == 2) { - $content = '<a href="pconfig">pconfig[' . local_channel() . ']</a>' . EOL; + $content .= '<a href="pconfig">pconfig[' . local_channel() . ']</a>' . EOL; load_pconfig(local_channel(),escape_tags(argv(1))); foreach($a->config[local_channel()][escape_tags(argv(1))] as $k => $x) { $content .= '<a href="pconfig/' . escape_tags(argv(1)) . '/' . $k . '" >pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . '][' . $k . ']</a> = ' . escape_tags($x) . EOL; @@ -65,8 +74,6 @@ function pconfig_content(&$a) { if(argc() == 1) { - $content = ''; - $r = q("select * from pconfig where uid = " . local_channel()); if($r) { foreach($r as $rr) { |