[whups] [patch]Default priority & states problem

=?big5?b?sWmofaTl?= david at tmv.gov.tw
Wed Dec 8 18:11:11 PST 2004


Hi there:
I noted that default priorities & states write to conf.php via
admin/setup/config.php were formatted as ISO8859-1.Once i saved these variables
in Chinese.Thus when create default priorities & states in "Edit Types" ,these
setting were loaded with ISO8859-1 from conf.php and writed to sql backend.

Here are what i patched:

--- ./admin/setup/config.php.orig        Thu Dec  9 10:03:57 2004
+++ ./admin/setup/config.php        Thu Dec  9 09:25:23 2004
@@ -66,7 +66,7 @@
     }
     if ($fp = @fopen($path . '/conf.php', 'w')) {
         /* Can write, so output to file. */
-        fwrite($fp, String::convertCharset($php, NLS::getCharset(),
'iso-8859-1'));
+        fwrite($fp, String::convertCharset($php, NLS::getCharset(),
$GLOBALS['conf']['sql']['charset']));
         fclose($fp);
         $notification->push(sprintf(_("Successfully wrote %s"), $path .
'/conf.php'), 'horde.success');
     } else {




--- ./framework/Horde/Horde/Config.php.orig        Tue Oct 19 08:45:27 2004
+++ ./framework/Horde/Horde/Config.php        Thu Dec  9 10:02:18 2004
@@ -654,7 +654,7 @@
             }
         }
         if (is_string($ptr)) {
-            return String::convertCharset($ptr, 'iso-8859-1');
+            return String::convertCharset($ptr,
$GLOBALS['conf']['sql']['charset']);
         } else {
             return $ptr;
         }




More information about the whups mailing list