Permalink
Browse files

fix for 6178

  • Loading branch information...
toyomoyo
toyomoyo committed Aug 1, 2006
1 parent 8e9f9be commit 2492b3085976e58c489196e332103bd272bacd7b
Showing with 10 additions and 9 deletions.
  1. +10 −9 lib/setup.php
View
@@ -180,16 +180,17 @@
raise_memory_limit('64M'); // We should never NEED this much but just in case...
-/// Try to get unicodedb status from DB
-/// (this is the only one transaction executed before "set names")
- $utftmp = get_config('', 'unicodedb');
- if ($utftmp !== false) { //Only if the record exists
- $CFG->unicodedb = $utftmp->value;
- }
-/// If $CFG->unicodedb is not set, calculate it because we need
-/// to know to "set names" properly.
+/// If $CFG->unicodedb is not set, get it from database or calculate it because we need
+/// to know it to "set names" properly.
+/// (this is the only database interaction before "set names")
if (!isset($CFG->unicodedb)) {
- $CFG->unicodedb = setup_is_unicodedb();
+ $utftmp = get_config('', 'unicodedb');
+ if ($utftmp !== false) { //Only if the record exists
+ $CFG->unicodedb = $utftmp->value;
+ } else {
+ $CFG->unicodedb = setup_is_unicodedb();
+ set_config('unicodedb', $CFG->unicodedb);
+ }
}
/// Set the client/server and connection to utf8 if necessary
if ($CFG->unicodedb) {

0 comments on commit 2492b30

Please sign in to comment.