From 7fb163e3c61869a983e5b4cd654856450fa06c1a Mon Sep 17 00:00:00 2001 From: wangyuting Date: Sat, 14 Sep 2024 19:26:05 +0800 Subject: [PATCH] * [bug#55422,done,0.2h,0h] Fix actions title empty error. --- framework/helper.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/helper.class.php b/framework/helper.class.php index 898bb7021f..bedc4e46c9 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -543,7 +543,7 @@ function initTableData(array $items, array &$fieldList, object $model = null, st } } - global $app; + global $app, $lang; if(empty($model)) { $module = $app->getModuleName(); @@ -612,7 +612,11 @@ function initTableData(array $items, array &$fieldList, object $model = null, st if(count($item->actions) > $maxActionCount) $maxActionCount = count($item->actions); } - if(isset($fieldList['actions'])) $fieldList['actions']['minWidth'] = $maxActionCount * 24 + 24; + if(isset($fieldList['actions'])) + { + $fieldList['actions']['minWidth'] = $maxActionCount * 24 + 24; + if(empty($fieldList['actions']['title'])) $fieldList['actions']['title'] = $lang->actions; + } if($fieldList['actions']['minWidth'] < 48) $fieldList['actions']['minWidth'] = 48; return array_values($items);