ci
This commit is contained in:
parent
2b3bc7f1b5
commit
08241c7869
@ -276,7 +276,7 @@ trait Crud
|
||||
$field = current($allow_column);
|
||||
}
|
||||
foreach ($where as $column => $value) {
|
||||
if (!$value || !isset($allow_column[$column]) ||
|
||||
if ($value === '' || !isset($allow_column[$column]) ||
|
||||
(is_array($value) && ($value[0] == 'undefined' || $value[1] == 'undefined'))) {
|
||||
unset($where[$column]);
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ class TableController extends Base
|
||||
$order = $order === 'ascend' ? 'asc' : 'desc';
|
||||
$paginator = Util::db()->table($table);
|
||||
foreach ($request->get() as $column => $value) {
|
||||
if (!$value) {
|
||||
if ($value === '') {
|
||||
continue;
|
||||
}
|
||||
if (isset($allow_column[$column])) {
|
||||
@ -278,9 +278,9 @@ class TableController extends Base
|
||||
$items_map[$item->id] = (array)$item;
|
||||
}
|
||||
$formatted_items = [];
|
||||
foreach ($items_map as $item) {
|
||||
foreach ($items_map as $index => $item) {
|
||||
if ($item['pid'] && isset($items_map[$item['pid']])) {
|
||||
$items_map[$item['pid']]['children'][] = $item;
|
||||
$items_map[$item['pid']]['children'][] = &$items_map[$index];
|
||||
}
|
||||
}
|
||||
foreach ($items_map as $item) {
|
||||
|
Loading…
Reference in New Issue
Block a user