public function update(array $data, $where) { if (isset($data['config'])) { $config = array(); if (substr($data['config'], 0, 2) == "[{") { $config = json_decode(stripcslashes($data['config']), true); } else { $config = $data['config']; } // TODO: move this down a level into components: foreach ($config as $k => $v) { if (!isset($v['part']) || !$v['part']) { $config[$k]['part'] = uniqid("", true); } } $data['config'] = json_encode($config); } return parent::update($data, $where); }
public function update(array $data, $where) { return parent::update($data, $where); }