|
@@ -237,9 +237,11 @@ class Database
|
|
|
{
|
|
|
$this->param = array();
|
|
|
if (!$this->param) {
|
|
|
- if ($where = Dever::preInput('search_', $input)) {
|
|
|
- unset($where['search_option_state']);
|
|
|
- $this->param += $where;
|
|
|
+ if ($key != 'listParent') {
|
|
|
+ if ($where = Dever::preInput('search_', $input)) {
|
|
|
+ unset($where['search_option_state']);
|
|
|
+ $this->param += $where;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -248,14 +250,14 @@ class Database
|
|
|
}
|
|
|
*/
|
|
|
|
|
|
- /*
|
|
|
- if ($where = Dever::preInput('send_', $input)) {
|
|
|
+ if ($where = Dever::preInput('set_', $input)) {
|
|
|
$this->param += $where;
|
|
|
- }*/
|
|
|
+ }
|
|
|
|
|
|
+ /*
|
|
|
if ($search_limit = Dever::input('search_limit')) {
|
|
|
$this->param['search_limit'] = $search_limit;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
if ($page_type = Dever::input('page_type')) {
|
|
|
$this->param['page_type'] = $page_type;
|
|
@@ -674,6 +676,9 @@ class Database
|
|
|
}
|
|
|
|
|
|
if (!isset($config['search'])) {
|
|
|
+ if (isset($v['search_name'])) {
|
|
|
+ $v['name'] = $v['search_name'];
|
|
|
+ }
|
|
|
if (isset($v['search']) && is_string($v['search'])) {
|
|
|
|
|
|
if ($v['search'] == 'sday') {
|
|
@@ -1534,6 +1539,7 @@ class Database
|
|
|
# 搜索
|
|
|
if (isset($config['struct']) && isset($config['manage']['search']) && $config['manage']['search']) {
|
|
|
$search = Dever::preInput('search_');
|
|
|
+ $set = Dever::preInput('set_');
|
|
|
|
|
|
$node = Html::node(array(' style="margin-top:0px;"', ''));
|
|
|
|
|
@@ -1691,7 +1697,10 @@ class Database
|
|
|
$value = array();
|
|
|
$value['name'] = $prefix . 'option_' . $k;
|
|
|
$value['class'] = 'form-control';
|
|
|
- if (isset($search[$value['name']])) {
|
|
|
+ if (isset($set[$value['name']])) {
|
|
|
+ $value['name'] = 'set_option_' . $k;
|
|
|
+ $value['value'] = $set[$value['name']];
|
|
|
+ } elseif (isset($search[$value['name']])) {
|
|
|
$value['value'] = $search[$value['name']];
|
|
|
}
|
|
|
if (strpos($v, '-') !== false) {
|
|
@@ -2201,6 +2210,9 @@ class Database
|
|
|
$j = 0;
|
|
|
foreach ($data as $ki => $vi) {
|
|
|
if (is_array($vi)) {
|
|
|
+ if (isset($data[$ki][$k])) {
|
|
|
+ $data[$ki]['cur_value'] = $data[$ki][$k];
|
|
|
+ }
|
|
|
$body[$j][$i] = '';
|
|
|
//if (isset($vi[$k])) {
|
|
|
# 处理同步
|
|
@@ -2813,6 +2825,10 @@ class Database
|
|
|
}
|
|
|
|
|
|
foreach ($config['struct'] as $ki => $vi) {
|
|
|
+ if (isset($data[$k][$ki])) {
|
|
|
+ $data[$k]['cur_value'] = $data[$k][$ki];
|
|
|
+ }
|
|
|
+
|
|
|
# 处理同步
|
|
|
# 兼容处理,之后删除
|
|
|
if (isset($vi['sync']) && (isset($vi['sync'][0]) && strpos($ki, '-'))) {
|
|
@@ -3293,6 +3309,14 @@ class Database
|
|
|
if (!$data) {
|
|
|
return $value;
|
|
|
}
|
|
|
+ if (isset($data['cur_value'])) {
|
|
|
+ if ($value == 'time') {
|
|
|
+ return $data['cur_value'] ? date('Y-m-d H:i', $data['cur_value']) : '-';
|
|
|
+ } elseif (!strstr($value, 'Dever::load') && (strstr($value, '/') || strstr($value, '.'))) {
|
|
|
+ return $data['cur_value'] ? Dever::load($value, $data['cur_value']) : '-';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (strstr($value, '={') && !strstr($value, '"')) {
|
|
|
$value = '"' . $value . '"';
|
|
|
}
|
|
@@ -4955,6 +4979,9 @@ class Database
|
|
|
{
|
|
|
$log = $tlog = array();
|
|
|
foreach ($struct as $i => $j) {
|
|
|
+ if (isset($data[$i])) {
|
|
|
+ $data['cur_value'] = $data[$i];
|
|
|
+ }
|
|
|
/*
|
|
|
if ($i == 'reorder' || $i == 'id') {
|
|
|
continue;
|