language fixes

fixed bug move accessory cats if master-cat is moved
This commit is contained in:
wnz_gh05t 2005-11-03 22:48:30 +00:00
parent 373d7c68a2
commit c155417f45
3 changed files with 18 additions and 6 deletions

View File

@ -210,10 +210,22 @@ class bo_resources
$this->link->link('resources',$resource['res_id'],$resource['link_to']['to_id']);
}
if($resource['accessory_of'] != -1)
{ echo $resource['res_id'].', '.$resource['accessory_of'];
{
$this->link->link('resources',$resource['res_id'],'resources',$resource['accessory_of']);
}
if(!empty($resource['res_id']) && $this->so->get_value("cat_id",$resource['res_id']) != $resource['cat_id'] && $resource['accessory_of'] == -1)
{
$accessories = $this->get_acc_list($resource['res_id']);
foreach($accessories as $accessory => $name)
{
$acc = $this->so->read($accessory);
$acc['cat_id'] = $resource['cat_id'];
$this->so->data = $acc;
$this->so->save();
}
}
return $this->so->save($resource) ? false : lang('Something went wrong by saving resource');
}

View File

@ -72,7 +72,7 @@
'lang_read' => lang('Read permissions'),
'lang_write' => lang('Write permissions'),
'lang_implies_read' => lang('implies read permission'),
'lang_calread' => lang('Read Calender permissions'),
'lang_calread' => lang('Read Calendar permissions'),
'lang_calbook' => lang('Direct booking permissions'),
'lang_implies_book' => lang('implies booking permission'),
'lang_cat_admin' => lang('Categories admin')

View File

@ -159,7 +159,7 @@ class ui_resources
$no_button['back'] = false;
$no_button['add'] = true;
$no_button['add_sub'] = false;
$GLOBALS['egw_info']['flags']['app_header'] = lang('resources') . ' - ' . lang('accessories of ') . $master['name'] .
$GLOBALS['egw_info']['flags']['app_header'] = lang('resources') . ' - ' . lang('accessories of '). ' '. $master['name'] .
($master['short_description'] ? ' [' . $master['short_description'] . ']' : '');
}
$preserv = $content;
@ -230,12 +230,12 @@ class ui_resources
$content['resource_picture'] = $this->bo->get_picture($content['res_id'],$content['picture_src'],$size=true);
$content['quantity'] = $content['quantity'] ? $content['quantity'] : 1;
$content['useable'] = $content['useable'] ? $content['useable'] : 1;
$content['accessory_of'] = $accessory_of;
$content['accessory_of'] = $content['accessory_of'] ? $content['accessory_of'] : $accessory_of;
$sel_options['gen_src_list'] = $this->bo->get_genpicturelist();
$sel_options['cat_id'] = $this->bo->acl->get_cats(EGW_ACL_ADD);
$sel_options['cat_id'] = count($sel_options['cat_id']) == 1 ? $sel_options['cat_id'] : array('' => lang('select one')) + $sel_options['cat_id'];
$sel_options['cat_id'] = count($sel_options['cat_id']) == 1 ? $sel_options['cat_id'] :
$content['cat_id'] ? $sel_options['cat_id'] : array('' => lang('select one')) + $sel_options['cat_id'];
if($accessory_of > 0 || $content['accessory_of'] > 0)
{
$content['accessory_of'] = $content['accessory_of'] ? $content['accessory_of'] : $accessory_of;