Skip to content

Commit

Permalink
Merge pull request madalinoprea#17 from colinmollenhour/fix-sessions
Browse files Browse the repository at this point in the history
Show all session namespaces, not just core namespace.
  • Loading branch information
madalinoprea committed Oct 8, 2012
2 parents ef5d62b + acec35c commit c5c0185
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions design/template/debug/controller.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $session = Mage::getSingleton('core/session');
<?php endif ?>

<h4><?php echo $this->__('SESSION Variables') ?></h4>
<?php if( $session): ?>
<?php if( count($_SESSION)): ?>
<table>
<colgroup>
<col style="width:20%"/>
Expand All @@ -73,14 +73,18 @@ $session = Mage::getSingleton('core/session');
<th><?php echo $this->__("Value") ?></th>
</tr>
</thead>
<?php foreach( $_SESSION as $namespace => $data): ?>
<tbody>
<tr><th colspan="2" style="text-align: center; font-size: 120%; font-weight: bold;"><?php echo $namespace ?></th></tr>
<?php $row = 0; ?>
<?php foreach( $session->getData() as $key=>$value ): ?>
<?php foreach( $data as $key => $value ): ?>
<tr class="<?php echo ( ($row % 2 ? 'djDebugOdd' : 'djDebugEven')) ?>">
<td><?php echo htmlspecialchars($key) ?></td>
<td>
<?php if( is_array($value) ): ?>
<?php echo @implode('<br/>', array_map('htmlspecialchars', $value)) ?>
<?php foreach ($value as $key => $_value): ?>
<?php echo $key.' => '.$this->escapeHtml(json_encode($_value)); ?><br/>
<?php endforeach; ?>
<?php elseif( is_object($value)): ?>
<?php echo get_class($value) ?>
<?php else: ?>
Expand All @@ -91,6 +95,7 @@ $session = Mage::getSingleton('core/session');
<?php $row++; ?>
<?php endforeach; ?>
</tbody>
<?php endforeach; ?>
</table>
<?php else: ?>
<p><?php echo $this->__("No SESSION data") ?></p>
Expand Down

0 comments on commit c5c0185

Please sign in to comment.