mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 02:14:45 +01:00
fix for bug #834436: changeing to an other year, month or week in the search-result get a template-error, set_root ...
This commit is contained in:
parent
cde51aa8dd
commit
8ee52d717c
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare - Calendar *
|
* eGroupWare - Calendar *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.eGroupWare.org *
|
||||||
|
* Maintained and further developed by RalfBecker@outdoor-training.de *
|
||||||
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
* Based on Webcalendar by Craig Knudsen <cknudsen@radix.net> *
|
||||||
* http://www.radix.net/~cknudsen *
|
* http://www.radix.net/~cknudsen *
|
||||||
* Modified by Mark Peters <skeeter@phpgroupware.org> *
|
* Originaly modified by Mark Peters <skeeter@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms of the GNU General Public License as published by the *
|
* under the terms of the GNU General Public License as published by the *
|
||||||
@ -311,6 +312,16 @@
|
|||||||
|
|
||||||
function index($params='')
|
function index($params='')
|
||||||
{
|
{
|
||||||
|
if (!$params)
|
||||||
|
{
|
||||||
|
foreach(array('date','year','month','day') as $field)
|
||||||
|
{
|
||||||
|
if (isset($_GET[$field]))
|
||||||
|
{
|
||||||
|
$params[$field] = $_GET[$field];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$GLOBALS['phpgw']->redirect($this->page('',$params));
|
$GLOBALS['phpgw']->redirect($this->page('',$params));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2218,13 +2229,21 @@
|
|||||||
{
|
{
|
||||||
if (empty($_POST['keywords']))
|
if (empty($_POST['keywords']))
|
||||||
{
|
{
|
||||||
// If we reach this, it is because they didn't search for anything,
|
// If we reach this, it is because they didn't search for anything
|
||||||
// attempt to send them back to where they where.
|
// or they used one of the selectboxes (year, month, week) in the search-result
|
||||||
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',array(
|
// attempt to send them back to where they came from.
|
||||||
'menuaction' => $_POST['from'],
|
|
||||||
'date' => $_POST['year'].$_POST['month'].$_POST['day']
|
$vars['menuaction'] = isset($_POST['from']) && $_POST['from'] != 'calendar.uicalendar.search' ?
|
||||||
)));
|
$_POST['from'] : 'calendar.uicalendar.index';
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
|
||||||
|
foreach(array('date','year','month','day') as $field)
|
||||||
|
{
|
||||||
|
if (isset($_POST[$field]))
|
||||||
|
{
|
||||||
|
$vars[$field] = $_POST[$field];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$GLOBALS['phpgw']->redirect_link('/index.php',$vars);
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||||
@ -2370,7 +2389,15 @@
|
|||||||
{
|
{
|
||||||
$page_app = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
$page_app = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
||||||
}
|
}
|
||||||
return $GLOBALS['phpgw']->link('/index.php','menuaction='.$page_app.'.ui'.$page_app.'.'.$_page.$params);
|
if (is_array($params))
|
||||||
|
{
|
||||||
|
$params['menuaction'] = $page_app.'.ui'.$page_app.'.'.$_page;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$params = 'menuaction='.$page_app.'.ui'.$page_app.'.'.$_page.$params;
|
||||||
|
}
|
||||||
|
return $GLOBALS['phpgw']->link('/index.php',$params);
|
||||||
}
|
}
|
||||||
|
|
||||||
function header()
|
function header()
|
||||||
|
Loading…
Reference in New Issue
Block a user