* Code for fix bug #32189.

This commit is contained in:
tianshujie
2023-02-16 15:15:36 +08:00
parent f4153b2629
commit e652d0075c
2 changed files with 14 additions and 9 deletions
+1 -1
View File
@@ -71,4 +71,4 @@ $config->custom->fieldList['doc'] = 'keywords,content';
$config->custom->fieldList['user']['create'] = 'dept,role,email,commiter';
$config->custom->fieldList['user']['edit'] = 'dept,role,email,commiter,skype,qq,mobile,phone,address,zipcode,dingding,slack,whatsapp,weixin';
$config->custom->notSetMethods = array('required', 'browsestoryconcept', 'product');
$config->custom->notSetMethods = array('required', 'browsestoryconcept', 'product', 'role');
+13 -8
View File
@@ -5,9 +5,10 @@
<?php
foreach($lang->custom->{$module}->fields as $key => $value)
{
$params = $key == 'required' ? "module=$module" : '';
$method = $key;
$active = $app->rawMethod == $key ? 'active' : '';
$currentModule = 'custom';
$method = $key;
$params = $key == 'required' ? "module=$module" : '';
$active = $app->rawMethod == $key ? 'active' : '';
if(!in_array($key, $config->custom->notSetMethods))
{
$params = "module=$module&field=$key";
@@ -15,14 +16,18 @@
$active = (isset($field) and $field == $key) ? 'active' : $active;
}
if($module == 'approvalflow' and in_array($key, array('project', 'workflow')))
if($module == 'approvalflow')
{
$method = 'browse';
$params = "type=$key";
$active = (isset($type) and $type == $key) ? 'active' : $active;
$currentModule = 'approvalflow';
if(in_array($key, array('project', 'workflow')))
{
$method = 'browse';
$params = "type=$key";
$active = (isset($type) and $type == $key) ? 'active' : $active;
}
}
if(common::hasPriv('custom', $method)) echo html::a(inlink($method, $params), $value, '', "class='$active'");
if(common::hasPriv($currentModule, $method)) echo html::a(inlink($method, $params), $value, '', "class='$active'");
}
?>
</div>