forked from extern/egroupware
do NOT store actions in session or eT2 request, nor send for mobile devices skiped actions
This commit is contained in:
parent
786ad5b71b
commit
dfbd0d2e6f
@ -319,7 +319,7 @@ class addressbook_ui extends addressbook_bo
|
||||
// Merge to email dialog needs the infolog types
|
||||
$infolog = new infolog_bo();
|
||||
$sel_options['info_type'] = $infolog->enums['type'];
|
||||
|
||||
|
||||
// dont show tid-selection if we have only one content_type
|
||||
// be a bit more sophisticated about it
|
||||
$availabletypes = array_keys($this->content_types);
|
||||
@ -853,7 +853,7 @@ class addressbook_ui extends addressbook_bo
|
||||
|
||||
/**
|
||||
* Unset the relevant column filters to clear a grouped view
|
||||
*
|
||||
*
|
||||
* @param Array $query
|
||||
*/
|
||||
protected function unset_grouped_filters(&$query)
|
||||
@ -1465,7 +1465,7 @@ window.egw_LAB.wait(function() {
|
||||
$success += $loop_success;
|
||||
$failed += $loop_fail;
|
||||
}
|
||||
if ($extra[0])
|
||||
if ($extra[0])
|
||||
{
|
||||
$grouped_contacts = array_merge($grouped_contacts,$extra);
|
||||
}
|
||||
@ -1525,7 +1525,7 @@ window.egw_LAB.wait(function() {
|
||||
{
|
||||
$store_query = $query;
|
||||
// Do not store these
|
||||
foreach(array('options-cat_id','actions') as $key)
|
||||
foreach(array('options-cat_id','actions','action_links','placeholder_actions') as $key)
|
||||
{
|
||||
unset($store_query[$key]);
|
||||
}
|
||||
@ -1536,7 +1536,7 @@ window.egw_LAB.wait(function() {
|
||||
{
|
||||
$old_state = Api\Cache::getSession('addressbook', $what);
|
||||
}
|
||||
if (!isset($this->grouped_views[(string) $query['grouped_view']]) || strpos($query['grouped_view'],':') === false)
|
||||
if (!isset($this->grouped_views[(string) $query['grouped_view']]) || strpos($query['grouped_view'],':') === false)
|
||||
{
|
||||
// we don't have a grouped view, unset the according col_filters
|
||||
$this->unset_grouped_filters($query);
|
||||
|
@ -272,16 +272,21 @@ class Request
|
||||
*/
|
||||
protected function cleanup()
|
||||
{
|
||||
if (isset($this->data['content']['nm']) && is_array($this->data['content']['nm']['rows']))
|
||||
if (isset($this->data['content']['nm']))
|
||||
{
|
||||
foreach(array_keys($this->data['content']['nm']['rows']) as $n)
|
||||
if (is_array($this->data['content']['nm']['rows']))
|
||||
{
|
||||
if (is_int($n))
|
||||
foreach(array_keys($this->data['content']['nm']['rows']) as $n)
|
||||
{
|
||||
unset($this->data['content']['nm']['rows'][$n]);
|
||||
if (is_int($n))
|
||||
{
|
||||
unset($this->data['content']['nm']['rows'][$n]);
|
||||
}
|
||||
}
|
||||
//error_log(__METHOD__."() content[nm][rows]=".array2string($this->data['content']['nm']['rows']));
|
||||
}
|
||||
//error_log(__METHOD__."() content[nm][rows]=".array2string($this->data['content']['nm']['rows']));
|
||||
// do not store actions
|
||||
unset($this->data['content']['nm']['actions'], $this->data['content']['nm']['action_links']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -808,6 +808,10 @@ class Nextmatch extends Etemplate\Widget
|
||||
|
||||
foreach((array)$actions as $id => $action)
|
||||
{
|
||||
if (!empty($action['hideOnMobile']) && Api\Header\UserAgent::mobile())
|
||||
{
|
||||
continue; // no need to send this action to client, specially document actions can be huge
|
||||
}
|
||||
// in case it's only selectbox id => label pairs
|
||||
if (!is_array($action)) $action = array('caption' => $action);
|
||||
if ($default_attrs) $action += $default_attrs;
|
||||
|
@ -274,8 +274,12 @@ class calendar_uilist extends calendar_ui
|
||||
$this->filter = $params['filter'];
|
||||
}
|
||||
}
|
||||
if (!$params['csv_export']) Api\Cache::setSession('calendar', 'calendar_list', $params);
|
||||
|
||||
if (!$params['csv_export'])
|
||||
{
|
||||
Api\Cache::setSession('calendar', 'calendar_list',
|
||||
array_diff_key ($params, array_flip('rows', 'actions', 'action_links', 'placeholder_actions')));
|
||||
}
|
||||
// do we need to query custom fields and which
|
||||
// Check stored preference if selectcols isn't available (ie: first call)
|
||||
$select_cols = $params['selectcols'] ? $params['selectcols'] : $GLOBALS['egw_info']['user']['preferences']['calendar']['nextmatch-calendar.list.rows'];
|
||||
|
@ -349,7 +349,6 @@ class filemanager_ui
|
||||
'default_cols' => '!comment,ctime', // I columns to use if there's no user or default pref (! as first char uses all but the named columns), default all columns
|
||||
'csv_fields' => false, // I false=disable csv export, true or unset=enable it with auto-detected fieldnames,
|
||||
//or array with name=>label or name=>array('label'=>label,'type'=>type) pairs (type is a eT widget-type)
|
||||
'actions' => static::get_actions(),
|
||||
'row_id' => 'path',
|
||||
'row_modified' => 'mtime',
|
||||
'parent_id' => 'dir',
|
||||
@ -359,6 +358,7 @@ class filemanager_ui
|
||||
);
|
||||
$content['nm']['path'] = static::get_home_dir();
|
||||
}
|
||||
$content['nm']['actions'] = static::get_actions();
|
||||
$content['nm']['home_dir'] = static::get_home_dir();
|
||||
$content['nm']['view'] = $GLOBALS['egw_info']['user']['preferences']['filemanager']['nm_view'];
|
||||
|
||||
@ -832,7 +832,8 @@ class filemanager_ui
|
||||
// do NOT store query, if hierarchical data / children are requested
|
||||
if (!$query['csv_export'])
|
||||
{
|
||||
Api\Cache::setSession('filemanager', 'index',$query);
|
||||
Api\Cache::setSession('filemanager', 'index',
|
||||
array_diff_key ($query, array_flip('rows','actions','action_links','placeholder_actions')));
|
||||
}
|
||||
if(!$query['path']) $query['path'] = static::get_home_dir();
|
||||
|
||||
|
@ -316,8 +316,8 @@ class infolog_ui
|
||||
unset($query['col_filter']['parent_id']);
|
||||
if(!$query['action'])
|
||||
{
|
||||
unset($query['rows']);
|
||||
Api\Cache::setSession('infolog', $query['session_for'].'session_data', $query);
|
||||
Api\Cache::setSession('infolog', $query['session_for'].'session_data',
|
||||
array_diff_key ($query, array_flip('rows','actions','action_links','placeholder_actions')));
|
||||
}
|
||||
$query['actions'] = $this->get_actions($query);
|
||||
$query['row_id'] = 'info_id';
|
||||
|
@ -327,7 +327,7 @@ class timesheet_ui extends timesheet_bo
|
||||
'view' => $view,
|
||||
'tabs' => $content['tabs'],
|
||||
'link_to' => array(
|
||||
'to_id' => $this->data['ts_id'] ? $this->data['ts_id'] :
|
||||
'to_id' => $this->data['ts_id'] ? $this->data['ts_id'] :
|
||||
($this->data['link_to']['to_id'] ? $this->data['link_to']['to_id'] : $content['link_to']['to_id']),
|
||||
'to_app' => TIMESHEET_APP,
|
||||
),
|
||||
@ -934,7 +934,6 @@ class timesheet_ui extends timesheet_bo
|
||||
'placeholder_actions' => array('add')
|
||||
);
|
||||
}
|
||||
$content['nm']['actions'] = $this->get_actions($content['nm']);
|
||||
|
||||
if($_GET['search'])
|
||||
{
|
||||
@ -1322,7 +1321,7 @@ class timesheet_ui extends timesheet_bo
|
||||
{
|
||||
$original_id = $this->data['ts_id'];
|
||||
unset($this->data['ts_id']);
|
||||
|
||||
|
||||
$this->data['ts_title'] = lang('Copy of:') . ' ' .$this->data['ts_title'];
|
||||
unset($this->data['ts_modified']);
|
||||
unset($this->data['ts_modifier']);
|
||||
|
Loading…
Reference in New Issue
Block a user