Changeset 247 for trunk/bin


Ignore:
Timestamp:
Apr 5, 2007 1:48:45 AM (17 years ago)
Author:
quinn
Message:

Converted all string functions to multi-byte (mb_*) functions

Location:
trunk/bin/module_maker
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/list_template.cli.php

    r185 r247  
    7878            'longblob' == $type
    7979        ) {
    80             $listrows[] = "<\x3fphp echo strlen(\$list[\$i]['$field'])<50 \x3f oTxt(\$list[\$i]['$field'], true) : oTxt(trim(substr(\$list[\$i]['$field'], 0, 50)) . '...'); \x3f>";
     80            $listrows[] = "<\x3fphp echo mb_strlen(\$list[\$i]['$field'])<50 \x3f oTxt(\$list[\$i]['$field'], true) : oTxt(trim(mb_substr(\$list[\$i]['$field'], 0, 50)) . '...'); \x3f>";
    8181        } else if (preg_match('/.*(begin|start).*date.*/i', $field)) {
    8282            $listrows[] = "<\x3fphp echo '0000-00-00' == \$list[\$i]['$field'] ? '' : date(\$app->getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
  • trunk/bin/module_maker/module.cli.php

    r238 r247  
    6969$module_title = ucwords(str_replace('_', ' ', $module_name_plural));
    7070$item_title = ucwords(str_replace('_', ' ', $module_name_singular));
    71 $module_name_upper = strtoupper(str_replace('_', ' ', $module_name_plural));
     71$module_name_upper = mb_strtoupper(str_replace('_', ' ', $module_name_plural));
    7272
    7373// Admin files
  • trunk/bin/module_maker/skel/public_list.ihtml

    r154 r247  
    44    for ($i = 0; $i <= $page->last_item - $page->first_item && $page->total_items > 0; $i++) {
    55        ?>
    6         <?php if (strlen(trim($%NAME_SINGULAR%_list[$i]['content'])) > 0) { // Link only if content is available. ?>
     6        <?php if (mb_strlen(trim($%NAME_SINGULAR%_list[$i]['content'])) > 0) { // Link only if content is available. ?>
    77            <h4><a href="<?php echo $app->oHREF('/%PUBLIC_SCRIPT%?%PRIMARY_KEY%=' . $%NAME_SINGULAR%_list[$i]['%PRIMARY_KEY%']); ?>"><?php echo fancyTxt(oTxt($%NAME_SINGULAR%_list[$i]['title'])); ?></a></h4>
    88        <?php } else { ?>
     
    1212        <em><?php echo date($app->getParam('date_format'), strtotime($%NAME_SINGULAR%_list[$i]['__///__'])); ?></em> &mdash; <?php echo nl2br(fancyTxt(oTxt($%NAME_SINGULAR%_list[$i]['summary'], true))); ?>
    1313
    14         <?php if (strlen(trim($%NAME_SINGULAR%_list[$i]['content'])) > 0) { // Link only if content is available. ?>
     14        <?php if (mb_strlen(trim($%NAME_SINGULAR%_list[$i]['content'])) > 0) { // Link only if content is available. ?>
    1515            <br /><a href="<?php echo $app->oHREF('/%PUBLIC_SCRIPT%?%PRIMARY_KEY%=' . $%NAME_SINGULAR%_list[$i]['%PRIMARY_KEY%']); ?>"><?php echo _("Read more"); ?></a>
    1616        <?php } ?>
Note: See TracChangeset for help on using the changeset viewer.