]> git.mjollnir.org Git - s9y.git/commitdiff
Fix Easy installation error(s)
authorgarvinhicking <garvinhicking>
Thu, 13 Oct 2005 13:06:50 +0000 (13:06 +0000)
committergarvinhicking <garvinhicking>
Thu, 13 Oct 2005 13:06:50 +0000 (13:06 +0000)
docs/NEWS
include/functions_installer.inc.php

index 0f90b1c8ba5e7151dc5bc3fd83b981acb77cdd43..cadfb2bf076bfdd6de8079e9d774d23a27808e2d 100644 (file)
--- 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)
 
index e48054b3f9029acc8bd659a931d33a2eb53a4fff..29282924281bf9a2c56d997998cd5d6c80cdea8e 100644 (file)
@@ -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);
         }