diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index ed1d4cc535..d4d9ff8133 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -128,17 +128,32 @@ function save_sessiondata($values) { - $GLOBALS['phpgw']->session->appsession('session_data','infolog',array( + $for = @$values['session_for'] ? $values['session_for'] : @$this->called_by; + //echo "
$for: uiinfolog::save_sessiondata(".print_r($values,True).") called_by='$this->called_by'
\n"; + $GLOBALS['phpgw']->session->appsession($for.'session_data','infolog',array( 'search' => $values['search'], 'start' => $values['start'], 'filter' => $values['filter'], 'cat_id' => $values['cat_id'], 'order' => $values['order'], 'sort' => $values['sort'], - 'col_filter' => $values['col_filter'] + 'col_filter' => $values['col_filter'], + 'session_for' => $for )); } + function read_sessiondata() + { + $values = $GLOBALS['phpgw']->session->appsession(@$this->called_by.'session_data','infolog'); + if (!@$values['session_for'] && $this->called_by) + { + $values['session_for'] = $this->called_by; + $this->save_sessiondata($values); + } + //echo "$this->called_by: uiinfolog::read_sessiondata() = ".print_r($values,True)."
\n"; + return $values; + } + function get_rows($query,&$rows,&$readonlys) { //echo "uiinfolog.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id],action='$query[action]/$query[action_id]',col_filter=".print_r($query['col_filter'],True).")
\n"; @@ -170,7 +185,7 @@ //echo "uiinfolog::index(action='$action/$action_id',referer='$referer/$values[referer]') values=\n"; _debug_array($values); if (!is_array($values)) { - $values = array('nm' => $GLOBALS['phpgw']->session->appsession('session_data','infolog')); + $values = array('nm' => $this->read_sessiondata()); if (isset($_GET['filter'])) { $values['nm']['filter'] = $_GET['filter']; // infolog/index.php sets defaultFilter that way @@ -181,10 +196,6 @@ $values['nm']['sort'] = 'DESC'; } } - else - { - $this->save_sessiondata($values['nm']); - } if ($action == '') { $action = $values['action'] ? $values['action'] : get_var('action',array('POST','GET')); @@ -229,6 +240,10 @@ } } } + else + { + $this->save_sessiondata($values['nm']); + } switch ($action) { case 'sp': @@ -473,7 +488,7 @@ case 'calendar': default: // to allow other apps to participate $content['info_link_id'] = $this->link->link('infolog',$content['link_to']['to_id'],$action,$action_id); - $content['blur_title'] = $this->link->title($action,$action_id); +// $content['blur_title'] = $this->link->title($action,$action_id); case '': if ($info_id) @@ -495,6 +510,10 @@ $content['info_type'] = 'note'; } } + if ($action && $action != 'new' && $action != 'sp') + { + $content['blur_title'] = $this->link->title($action,$action_id); + } $readonlys['delete'] = !$info_id || !$this->bo->check_access($info_id,PHPGW_ACL_DELETE); $GLOBALS['phpgw_info']['flags']['app_header'] = lang($this->messages[$info_id ? 'edit' : ($action == 'sp' ? 'add_sub' : 'add')]); @@ -698,8 +717,10 @@ { return False; } - $save_app = $GLOBALS['phpgw_info']['flags']['currentapp']; - $GLOBALS['phpgw_info']['flags']['currentapp'] = 'infolog'; + $this->called_by = $app; // for read/save_sessiondata, to have different sessions for the hooks + + $save_app = $GLOBALS['phpgw_info']['flags']['currentapp']; + $GLOBALS['phpgw_info']['flags']['currentapp'] = 'infolog'; $GLOBALS['phpgw']->translation->add_app('infolog');