-
☆ A M B ☆
- 24,524 Posts
I’ve added database character set and collation character set to the System Info report.
In the file manager/actions/sysinfo.static.php at line 68 I inserted two more <tr>...</tr> blocks:
<tr>
<td><?php echo $_lang['database_charset']?></td>
<td> </td>
<td><strong><?php
$sql1 = "show variables like 'character_set_database'";
$res = $modx->db->query($sql1);
$charset = $modx->db->getRow($res, 'num');
echo $charset[1];
?></strong></td>
</tr>
<tr>
<td><?php echo $_lang['database_collation']?></td>
<td> </td>
<td><strong><?php
$sql2 = "show variables like 'collation_database'";
$res = $modx->db->query($sql2);
$collation = $modx->db->getRow($res, 'num');
echo $collation[1];
?></strong></td>
</tr>
[/code
I added the two fields to the $_lang array in the lang files. I have attached the modified files in a zipped archive. Rename your original sysinfo.static.php to keep it, and upload the modified one. Do the same to your manager/includes/lang folder.
Good one thats Needed, This will prevent headache’s when users are not so sure about their db collation.
-
☆ A M B ☆
- 24,524 Posts
That’s what I had in mind. I have a client with an extensive terminology database in several languages, and it’s all messed up. Turns out their database is set to DEC-8, of all things. Took me quite a while to figure that one out, and thought I’d share the fruits of my labors.
Thanks for the share Susan, what is DEC-8 anyway?, is it missspell of UTF-8?
BTW conguratulation for the site update, have seen the signature of yours saying that sites coming soon or something like that nearly for a year i guess?
-
☆ A M B ☆
- 24,524 Posts
This is nice. Good thinking.