From c3c677872e493274d97aa69d3467908351d2df69 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 13 Oct 2005 13:06:50 +0000 Subject: [PATCH] Fix Easy installation error(s) --- docs/NEWS | 4 ++++ include/functions_installer.inc.php | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/docs/NEWS b/docs/NEWS index 0f90b1c..cadfb2b 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,10 @@ Version 0.9-beta2 () ------------------------------------------------------------------------ + * Fix "easy installation" leading to an error with language charsets. + Thanks to Heddesheimer from the forums for spotting this! + (garvinhicking) + * Improve Spamblock plugin to allow configuring author/url filters straight from the "Comments" interface. (garvinhicking) diff --git a/include/functions_installer.inc.php b/include/functions_installer.inc.php index e48054b..2928292 100644 --- a/include/functions_installer.inc.php +++ b/include/functions_installer.inc.php @@ -794,6 +794,17 @@ function serendipity_updateConfiguration() { } else { $authorid = $serendipity['authorid']; } + + if (is_array($_POST[$item['var']])) { + // Arrays not allowed. Use first index value. + list($a_key, $a_val) = each($_POST[$item['var']]); + $_POST[$item['var']] = $a_key; + + // If it still is an array, munge it all together. + if (is_array($_POST[$item['var']])) { + $_POST[$item['var']] = @implode(',', $_POST[$item['var']]); + } + } serendipity_set_config_var($item['var'], $_POST[$item['var']], $authorid); } -- 2.39.5