Skip to content

Commit af2daa8

Browse files
authored
Add helpful info for diagnosting UTF8 issues (#37)
Signed by Shawn Bulen, [email protected]
1 parent 2eb2b0a commit af2daa8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

smfinfo.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @copyright 2019 Simple Machines
99
* @license http://www.simplemachines.org/about/smf/license.php BSD
1010
*
11-
* @version 2.0.15
11+
* @version 2.0.16
1212
*/
1313

1414
// If SSI.php is in the same place as this file, and SMF isn't defined, this is being run standalone.
@@ -79,6 +79,12 @@ function load_txt_strings()
7979
$txt['support_versions_current'] = 'Current SMF Info version';
8080
$txt['support_versions_forum'] = 'Your SMF Info version';
8181
$txt['previousCharacterSet'] = 'Previous character set';
82+
$txt['db_type'] = 'DB type';
83+
$txt['db_prefix'] = 'DB prefix';
84+
$txt['language'] = 'Language';
85+
$txt['db_mb4'] = 'DB true multibyte support';
86+
$txt['db_character_set'] = 'DB character set';
87+
$txt['global_character_set'] = 'Global character set';
8288

8389
// PHP Specific Info
8490
$txt['relevant_info'] = 'Relevant PHP Settings';
@@ -155,6 +161,12 @@ function load_txt_strings()
155161
// what is in the $txt keys/brackets above
156162
// Makes for easy adding of extra info, or deleting
157163
$context['smfinfo'] = array (
164+
'db_type' => !empty($db_type) ? $db_type : '<i>' . $txt['empty'] . '</i>',
165+
'db_prefix' => !empty($db_prefix) ? $db_prefix : '<i>' . $txt['empty'] . '</i>',
166+
'language' => !empty($language) ? $language : '<i>' . $txt['empty'] . '</i>',
167+
'db_mb4' => !empty($db_mb4) ? $db_mb4 : '<i>' . $txt['empty'] . '</i>',
168+
'db_character_set' => !empty($db_character_set) ? $db_character_set : '<i>' . $txt['empty'] . '</i>',
169+
'global_character_set' => !empty($modSettings['global_character_set']) ? $modSettings['global_character_set'] : '<i>' . $txt['empty'] . '</i>',
158170
'db_last_error' => !empty($db_last_error) ? date(DATE_RFC822, $db_last_error) : $txt['none'],
159171
'auto_fix_db' => get_smf_setting('autoFixDatabase', 'on'),
160172
'db_persist' => get_smf_setting('db_persist', 'off'),

0 commit comments

Comments
 (0)