Changeset 1615 for trunk/system/views

Show
Ignore:
Timestamp:
12/26/2007 07:35:04 AM (11 months ago)
Author:
Geert
Message:
  • Database: fixed float related bug. Certain locales (nl_NL and probably many other European) display floats with a comma "," as decimal separator. This caused invalid SQL syntax, of course. The escape() function now converts floats to be non-locale aware.
  • Calendar: strftime() is locale aware, you don't even need a translation file for the months
Location:
trunk/system/views
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/views/kohana_calendar.php

    r1611 r1615  
    1717 
    1818<table class="calendar"> 
    19 <caption><?php echo date('F Y', mktime(1, 0, 0, $month, 1, $year)) ?></caption> 
     19<caption><?php echo strftime('%B %Y', mktime(1, 0, 0, $month, 1, $year)) ?></caption> 
    2020<tr> 
    2121<?php foreach ($headings as $day): ?> 
     
    3535?> 
    3636<td><?php echo $day[0] ?></td> 
    37 <?php endif; ?> 
     37<?php endif ?> 
    3838<?php endforeach ?> 
    3939</tr> 
  • trunk/system/views/pagination/classic.php

    r1535 r1615  
    1111        <?php if ($first_page): ?> 
    1212                <a href="<?php echo str_replace('{page}', 1, $url) ?>">&lsaquo;&nbsp;<?php echo Kohana::lang('pagination.first') ?></a> 
    13         <?php endif; ?> 
     13        <?php endif ?> 
    1414 
    1515        <?php if ($previous_page): ?> 
    1616                <a href="<?php echo str_replace('{page}', $previous_page, $url) ?>">&lt;</a> 
    17         <?php endif; ?> 
     17        <?php endif ?> 
    1818         
    1919 
     
    2424                <?php else: ?> 
    2525                        <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> 
    26                 <?php endif; ?> 
     26                <?php endif ?> 
    2727                 
    28         <?php endfor; ?> 
     28        <?php endfor ?> 
    2929 
    3030 
    3131        <?php if ($next_page): ?> 
    3232                <a href="<?php echo str_replace('{page}', $next_page, $url) ?>">&gt;</a> 
    33         <?php endif; ?> 
     33        <?php endif ?> 
    3434 
    3535        <?php if ($last_page): ?> 
    3636                <a href="<?php echo str_replace('{page}', $last_page, $url) ?>"><?php echo Kohana::lang('pagination.last') ?>&nbsp;&rsaquo;</a> 
    37         <?php endif; ?> 
     37        <?php endif ?> 
    3838 
    3939</p> 
  • trunk/system/views/pagination/digg.php

    r1535 r1615  
    1313        <?php else: ?> 
    1414                &laquo;&nbsp;<?php echo Kohana::lang('pagination.previous') ?> 
    15         <?php endif; ?> 
     15        <?php endif ?> 
    1616         
    1717 
     
    2323                        <?php else: ?> 
    2424                                <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> 
    25                         <?php endif; ?> 
    26                 <?php endfor; ?> 
     25                        <?php endif ?> 
     26                <?php endfor ?> 
    2727         
    2828        <?php elseif ($current_page < 9): /* « Previous  1 2 3 4 5 6 7 8 9 10 … 25 26  Next » */ ?> 
     
    3333                        <?php else: ?> 
    3434                                <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> 
    35                         <?php endif; ?> 
    36                 <?php endfor; ?> 
     35                        <?php endif ?> 
     36                <?php endfor ?> 
    3737         
    3838                &hellip; 
     
    5151                        <?php else: ?> 
    5252                                <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> 
    53                         <?php endif; ?> 
    54                 <?php endfor; ?> 
     53                        <?php endif ?> 
     54                <?php endfor ?> 
    5555         
    5656        <?php else: /* « Previous  1 2 … 5 6 7 8 9 10 11 12 13 14 … 25 26  Next » */ ?> 
     
    6565                        <?php else: ?> 
    6666                                <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> 
    67                         <?php endif; ?> 
    68                 <?php endfor; ?> 
     67                        <?php endif ?> 
     68                <?php endfor ?> 
    6969         
    7070                &hellip; 
     
    7272                <a href="<?php echo str_replace('{page}', $total_pages, $url) ?>"><?php echo $total_pages ?></a> 
    7373 
    74         <?php endif; ?> 
     74        <?php endif ?> 
    7575         
    7676         
     
    7979        <?php else: ?> 
    8080                <?php echo Kohana::lang('pagination.next') ?>&nbsp;&raquo; 
    81         <?php endif; ?> 
     81        <?php endif ?> 
    8282 
    8383</p> 
  • trunk/system/views/pagination/extended.php

    r1535 r1615  
    1313        <?php else: ?> 
    1414                &laquo;&nbsp;<?php echo Kohana::lang('pagination.previous') ?> 
    15         <?php endif; ?> 
     15        <?php endif ?> 
    1616         
    1717        | <?php echo Kohana::lang('pagination.page') ?> <?php echo $current_page ?> <?php echo Kohana::lang('pagination.of') ?> <?php echo $total_pages ?> 
     
    2323        <?php else: ?> 
    2424                <?php echo Kohana::lang('pagination.next') ?>&nbsp;&raquo; 
    25         <?php endif; ?> 
     25        <?php endif ?> 
    2626         
    2727</p> 
  • trunk/system/views/pagination/punbb.php

    r1535 r1615  
    1414                <a href="<?php echo str_replace('{page}', 1, $url) ?>">1</a> 
    1515                <?php if ($current_page != 4) echo '&hellip;' ?> 
    16         <?php endif; ?> 
     16        <?php endif ?> 
    1717         
    1818 
     
    2525                <?php else: ?> 
    2626                        <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> 
    27                 <?php endif; ?> 
     27                <?php endif ?> 
    2828                 
    29         <?php endfor; ?> 
     29        <?php endfor ?> 
    3030         
    3131 
     
    3333                <?php if ($current_page != $total_pages - 3) echo '&hellip;' ?> 
    3434                <a href="<?php echo str_replace('{page}', $total_pages, $url) ?>"><?php echo $total_pages ?></a> 
    35         <?php endif; ?> 
     35        <?php endif ?> 
    3636 
    3737</p>