[kronolith] month view and no cookies

Jan Schneider jan@horde.org
Fri, 7 Dec 2001 10:00:54 +0100


Zitat von mays@optonline.net:

> In the CVS head version of kronolith, the next and previous buttons do
> not work
> properly in the month view without cookies.
> 
> A query representing the desired month is appended to the result of
> Horde::selfURL().  The problem is that without cookies, selfURL() appends
> the
> session variable to the url returned.  The query that is appended assumes
> that
> it is first.  The consequence is that two '?'s are present in the final
> result
> used by Horde::link().  This causes the session variable to not be found,
> and
> the user is presented with a new login screen.
> 
> The behavior is correct with the daily and weekly views.
> 
> Appended is a patch to get around this.  The patch also uses the
> available
> $prevstamp and $nextstamp.
> 
> Mark
> 
> --- kronolith/templates/month/head.inc.orig	Fri Aug 31 16:25:51 2001
> +++ kronolith/templates/month/head.inc	Thu Dec  6 17:41:40 2001
> @@ -1,8 +1,8 @@
>  <table border="0" cellpadding="1" cellspacing="0" width="100%">
>  <tr><th class="header">
> -<?= Horde::link(Horde::selfURL() . '?month=' . date('n', $prevstamp) .
> '&year=' . date('Y', $prevstamp), _("Last month"), 'menu') .
> Horde::img('prev.gif', 'border="0" alt="&lt;"') ?></a>
> +<?= Horde::link(Horde::url($HTTP_SERVER_VARS['PHP_SELF'] . '?timestamp='
> . $prevstamp), _("Last month"), 'menu') . Horde::img('prev.gif',
> 'border="0" alt="&lt;"') ?></a>
>  <?= $title ?>
> -<?= Horde::link(Horde::selfURL() . '?month=' . date('n', $nextstamp) .
> '&year=' . date('Y', $nextstamp), _("Next Month"), 'menu') .
> Horde::img('next.gif', 'border="0" alt="&gt;"') ?></a>
> +<?= Horde::link(Horde::url($HTTP_SERVER_VARS['PHP_SELF'] . '?timestamp='
> . $nextstamp), _("Next Month"), 'menu') . Horde::img('next.gif',
> 'border="0" alt="&gt;"') ?></a>
>  </th></tr>
>  
>  <tr><td class="control"><table border="0" cellpadding="2"
> cellspacing="1" width="100%">

Fixed in cvs, thanks.

Jan.

::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::