Issue Details (XML | Word | Printable)

Key: MODX-733
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Phize
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
MODx CMF

Multi-byte characters are garbled in 'Site' > 'Search'

Created: 07/May/09 05:08 AM   Updated: 30/Jun/09 11:12 AM
Component/s: Core Distribution
Affects Version/s: 0.9.6.3
Fix Version/s: Evolution-1.0.0-rc2

Time Tracking:
Not Specified

Environment: PHP5 + MySQL5


 Description  « Hide
Multi-byte characters are garbled in 'Site' > 'Search'.
A solution is the following.

Before: /manager/actions/search.static.php(line: 131)
<td><?php echo strlen($logentry['pagetitle'])>20 ? substr($logentry['pagetitle'], 0, 20)."..." : $logentry['pagetitle'] ; ?></td>
<td><?php echo strlen($logentry['description'])>35 ? substr($logentry['description'], 0, 35)."..." : $logentry['description'] ; ?></td>

After: /manager/actions/search.static.php(line: 131)
<?php if (function_exists('mb_strlen') && function_exists('mb_substr')) :?>
<td><?php echo mb_strlen($logentry['pagetitle'], $modx->config['modx_charset'])>20 ? mb_substr($logentry['pagetitle'], 0, 20, $modx->config['modx_charset'])."..." : $logentry['pagetitle'] ; ?></td>
<td><?php echo mb_strlen($logentry['description'], $modx->config['modx_charset'])>35 ? mb_substr($logentry['description'], 0, 35, $modx->config['modx_charset'])."..." : $logentry['description'] ; ?></td>
<?php else:?>
<td><?php echo strlen($logentry['pagetitle'])>20 ? substr($logentry['pagetitle'], 0, 20)."..." : $logentry['pagetitle'] ; ?></td>
<td><?php echo strlen($logentry['description'])>35 ? substr($logentry['description'], 0, 35)."..." : $logentry['description'] ; ?></td>
<?php endif;?>



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Garry Nutting added a comment - 30/Jun/09 11:12 AM
Applied fix in SVN rev #5280.