Changeset 1684 for trunk/system/views

Show
Ignore:
Timestamp:
01/06/2008 02:31:17 AM (12 months ago)
Author:
Geert
Message:
  • Added cookie data to the Profiler
  • Translators: update profiler file please
  • Also fixed small bug in Profiler library: now using stripos() in combination with str_ireplace() to add profiler data before </body>
Files:
1 modified

Legend:

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

    r1606 r1684  
    6565        background-color: #CCE8FB; 
    6666} 
     67#kp-cookiedata th 
     68{ 
     69        background-color: #FFF4D7; 
     70} 
    6771#kohana-profiler .kp-column 
    6872{ 
     
    237241<?php endif; ?> 
    238242 
     243<?php if (isset($cookie)): ?> 
     244        <table id="kp-cookiedata"> 
     245                <tr> 
     246                        <th colspan="2"><?php echo Kohana::lang('profiler.cookie_data') ?></th> 
     247                </tr> 
     248<?php 
     249 
     250if (count($_COOKIE) == 0): 
     251 
     252?> 
     253                <tr><td colspan="2"><?php echo Kohana::lang('profiler.no_cookie') ?></td></tr> 
     254<?php 
     255 
     256else: 
     257        text::alternate(); 
     258        foreach($_COOKIE as $name => $value): 
     259 
     260?> 
     261                <tr<?php echo text::alternate('', ' class="kp-altrow"') ?>> 
     262                        <td class="kp-name"><?php echo $name ?></td> 
     263                        <td> 
     264                                <?php echo (is_array($value)) ? '<pre>'.html::specialchars(print_r($value, TRUE)).'</pre>' : html::specialchars($value) ?> 
     265                        </td> 
     266                </tr> 
     267<?php 
     268 
     269        endforeach; 
     270endif; 
     271 
     272?> 
     273        </table> 
     274<?php endif; ?> 
     275 
    239276</div>