|
@@ -47,10 +47,10 @@ class Update extends Page
|
|
unset($data['update'][$k]['option']);
|
|
unset($data['update'][$k]['option']);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- $this->column($data);
|
|
|
|
|
|
+ $active = $this->column($data);
|
|
$data['info_id'] = false;
|
|
$data['info_id'] = false;
|
|
- if (!$this->info && $data['column'] && $data['column']['where'] == 'id') {
|
|
|
|
- $this->info = $this->db->find($data['column']['active']);
|
|
|
|
|
|
+ if (!$this->info && $active) {
|
|
|
|
+ $this->info = $this->db->find($active);
|
|
if ($this->info) {
|
|
if ($this->info) {
|
|
$data['info_id'] = $this->info['id'];
|
|
$data['info_id'] = $this->info['id'];
|
|
if (!$func) {
|
|
if (!$func) {
|
|
@@ -350,7 +350,10 @@ class Update extends Page
|
|
$this->checkRules($v, $input[$v['key']]);
|
|
$this->checkRules($v, $input[$v['key']]);
|
|
}
|
|
}
|
|
if ($v['type'] == 'sku') {
|
|
if ($v['type'] == 'sku') {
|
|
- $sku[$v['key']] = array($v['where'], $v['content']['field'], $v['spec'], $v['spec_field'], $input[$v['key'] . '_spec'], $input[$v['key']]);
|
|
|
|
|
|
+ if (isset($input[$v['key'] . '_spec']) && isset($input[$v['key']])) {
|
|
|
|
+ $sku[$v['key']] = array($v['where'], $v['content']['field'], $v['spec'], $v['spec_field'], $input[$v['key'] . '_spec'], $input[$v['key']]);
|
|
|
|
+ }
|
|
|
|
+
|
|
} elseif (strpos($v['key'], '/')) {
|
|
} elseif (strpos($v['key'], '/')) {
|
|
$other[$v['key']] = array($v['where'], $v['content']['field'], $v['content']['drag'], $input[$v['key']]);
|
|
$other[$v['key']] = array($v['where'], $v['content']['field'], $v['content']['drag'], $input[$v['key']]);
|
|
} else {
|
|
} else {
|
|
@@ -456,7 +459,7 @@ class Update extends Page
|
|
{
|
|
{
|
|
if (isset($this->config['start']) && $this->config['start']) {
|
|
if (isset($this->config['start']) && $this->config['start']) {
|
|
$data['id'] = $id;
|
|
$data['id'] = $id;
|
|
- $data = Dever::call($this->config['start'], array($data));
|
|
|
|
|
|
+ $data = Dever::call($this->config['start'], array($this->db, $data));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -464,7 +467,13 @@ class Update extends Page
|
|
{
|
|
{
|
|
if (isset($this->config['end']) && $this->config['end']) {
|
|
if (isset($this->config['end']) && $this->config['end']) {
|
|
$data['id'] = $id;
|
|
$data['id'] = $id;
|
|
- Dever::call($this->config['end'], array($data));
|
|
|
|
|
|
+ if (is_array($this->config['end'])) {
|
|
|
|
+ foreach ($this->config['end'] as $k => $v) {
|
|
|
|
+ Dever::call($v, array($data));
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ Dever::call($this->config['end'], array($this->db, $data));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|