summaryrefslogtreecommitdiff
path: root/lib/plugins/config/settings/config.class.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-11-10 16:22:34 +0100
committerAndreas Gohr <andi@splitbrain.org>2012-11-10 16:22:34 +0100
commit7e29378446eeb33892837048b31b4180e26ccd1f (patch)
treed59b7add4a6b1dbb04107ae36b0264833fc3d6d6 /lib/plugins/config/settings/config.class.php
parent23e8f02b8aa3a74fed70f1a496bdb5423908133a (diff)
downloadrpg-7e29378446eeb33892837048b31b4180e26ccd1f.tar.gz
rpg-7e29378446eeb33892837048b31b4180e26ccd1f.tar.bz2
partial revert of 23e8f02b8aa3a74fed70f1a496bdb5423908133a
okay. I can't read. we already had a multiline config. It's the default. So I reverted my change, except for making use of formText/cleanText for proper line ending handling and I added made focused textareas a bit larger.
Diffstat (limited to 'lib/plugins/config/settings/config.class.php')
-rw-r--r--lib/plugins/config/settings/config.class.php29
1 files changed, 1 insertions, 28 deletions
diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php
index 9f98231e3..e6d085bcb 100644
--- a/lib/plugins/config/settings/config.class.php
+++ b/lib/plugins/config/settings/config.class.php
@@ -409,7 +409,7 @@ if (!class_exists('setting')) {
}
$key = htmlspecialchars($this->_key);
- $value = htmlspecialchars($value);
+ $value = formText($value);
$label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
$input = '<textarea rows="3" cols="40" id="config___'.$key.'" name="config['.$key.']" class="edit" '.$disable.'>'.$value.'</textarea>';
@@ -494,33 +494,6 @@ if (!class_exists('setting_string')) {
}
}
-if (!class_exists('setting_text')) {
- class setting_text extends setting {
- function html(&$plugin, $echo=false) {
- $value = '';
- $disable = '';
-
- if ($this->is_protected()) {
- $value = $this->_protected;
- $disable = 'disabled="disabled"';
- } else {
- if ($echo && $this->_error) {
- $value = $this->_input;
- } else {
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- }
- }
-
- $key = htmlspecialchars($this->_key);
- $value = formText($value);
-
- $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
- $input = '<textarea id="config___'.$key.'" name="config['.$key.']" class="edit" '.$disable.'>'.$value.'</textarea>';
- return array($label,$input);
- }
- }
-}
-
if (!class_exists('setting_password')) {
class setting_password extends setting_string {