mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-28 22:01:55 +02:00
while copying infologs - handle defaults
This commit is contained in:
parent
0d916de566
commit
5869d59d12
@ -743,16 +743,8 @@ class infolog_ui
|
|||||||
return $this->tmpl->exec('infolog.infolog_ui.index',$values,$sel_options,$readonlys,$persist,$return_html ? -1 : 0);
|
return $this->tmpl->exec('infolog.infolog_ui.index',$values,$sel_options,$readonlys,$persist,$return_html ? -1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
function get_validtypes()
|
||||||
* Get actions / context menu items
|
|
||||||
*
|
|
||||||
* @param array $query
|
|
||||||
* @return array see nextmatch_widget::get_actions()
|
|
||||||
*/
|
|
||||||
private function get_actions(array $query)
|
|
||||||
{
|
{
|
||||||
for($i = 0; $i <= 100; $i += 10) $percent[$i] = $i.'%';
|
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
$types = $this->bo->enums['type'];
|
$types = $this->bo->enums['type'];
|
||||||
if ($this->bo->group_owners)
|
if ($this->bo->group_owners)
|
||||||
@ -766,6 +758,21 @@ class infolog_ui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $types;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get actions / context menu items
|
||||||
|
*
|
||||||
|
* @param array $query
|
||||||
|
* @return array see nextmatch_widget::get_actions()
|
||||||
|
*/
|
||||||
|
private function get_actions(array $query)
|
||||||
|
{
|
||||||
|
for($i = 0; $i <= 100; $i += 10) $percent[$i] = $i.'%';
|
||||||
|
|
||||||
|
// Types
|
||||||
|
$types = $this->get_validtypes();
|
||||||
$types_add = array();
|
$types_add = array();
|
||||||
foreach($types as $type => &$data)
|
foreach($types as $type => &$data)
|
||||||
{
|
{
|
||||||
@ -1691,6 +1698,21 @@ class infolog_ui
|
|||||||
unset($content['info_datemodified']);
|
unset($content['info_datemodified']);
|
||||||
unset($content['info_modifier']);
|
unset($content['info_modifier']);
|
||||||
foreach ($this->bo->copy_excludefields as $k => $f) if (isset($content[$f])) unset($content[$f]);
|
foreach ($this->bo->copy_excludefields as $k => $f) if (isset($content[$f])) unset($content[$f]);
|
||||||
|
if (!isset($content['info_startdate']))
|
||||||
|
{
|
||||||
|
switch($this->prefs['set_start'])
|
||||||
|
{
|
||||||
|
case 'date': default: $set_startdate = mktime(0,0,0,date('m',$this->bo->user_time_now),date('d',$this->bo->user_time_now),date('Y',$this->bo->user_time_now)); break;
|
||||||
|
case 'datetime': $set_startdate = $this->bo->user_time_now; break;
|
||||||
|
case 'empty': $set_startdate = 0; break;
|
||||||
|
}
|
||||||
|
$content['info_startdate'] = $set_startdate;
|
||||||
|
}
|
||||||
|
$types = $this->get_validtypes();
|
||||||
|
$typekeys = array_keys($types);
|
||||||
|
if (!isset($content['info_type'])) $content['info_type'] = $typekeys[0];
|
||||||
|
if (!isset($content['info_status'])) $this->bo->status[$content['info_type']];
|
||||||
|
if (!isset($content['info_cat'])) $content['info_cat'] = $this->prefs['cat_add_default'];
|
||||||
// Get links to be copied
|
// Get links to be copied
|
||||||
$content['link_to']['to_id'] = egw_link::get_links($content['link_to']['to_app'], $content['link_to']['to_id']);
|
$content['link_to']['to_id'] = egw_link::get_links($content['link_to']['to_app'], $content['link_to']['to_id']);
|
||||||
// Special mangling for files so the files get copied
|
// Special mangling for files so the files get copied
|
||||||
|
Loading…
x
Reference in New Issue
Block a user