Cannot check existence, an empty value here should reset the display_cal flag.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 9 Nov 2010 04:17:00 +0000 (23:17 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 9 Nov 2010 04:18:56 +0000 (23:18 -0500)
kronolith/lib/Kronolith.php
kronolith/templates/panel.inc

index c0d735e..98befd5 100644 (file)
@@ -965,7 +965,7 @@ class Kronolith
             $GLOBALS['session']->set('kronolith', 'display_cal', $calendarId);
         }
 
-        if ($GLOBALS['session']->exists('kronolith', 'display_cal')) {
+        if (strlen($GLOBALS['session']->get('kronolith', 'display_cal'))) {
             /* Specifying a value for display_cal is always to make sure
              * that only the specified calendars are shown. Use the
              * "toggle_calendar" argument  to toggle the state of a single
index 2eb848f..cf98390 100644 (file)
@@ -43,11 +43,11 @@ $tagger = Kronolith::getTagger();
 <div id="pageControls">
  <a id="sbarShow" href="#" onclick="sbarToggle(); return false;"><?php echo _("Calendars") ?></a>
  <a id="sbarHide" href="#" onclick="sbarToggle(); return false;"><?php echo _("Calendars") ?></a>
-<?php if ($GLOBALS['session']->exists('kronolith', 'display_cal')): ?>
+<?php if (strlen($GLOBALS['session']->get('kronolith', 'display_cal'))): ?>
    <a id="sbarClose" href="<?php echo Horde::selfUrl(true)->add('display_cal', '') ?>"><?php echo $GLOBALS['registry']->getAuth() ? _("Return to my calendars") : _("Return to calendars") ?></a>
 <?php endif; ?>
 <div id="pageControlsInner">
-<?php if ($GLOBALS['session']->exists('kronolith', 'display_cal')): ?>
+<?php if (strlen($GLOBALS['session']->get('kronolith', 'display_cal'))): ?>
   <h4><?php echo ngettext("Showing calendar:", "Showing calendars:", count($calendar_names)) ?></h4>
   <?php foreach ($calendar_names as $name): ?>
    <h4><?php echo $name ?></h4>