+ $s = DB_DataObject::factory('core_setting');
+ $s->setFrom(array(
+ 'module' => $a['module'],
+ 'name' => $a['name'],
+ 'description' => $a['description'],
+ 'val' => (!isset($a['is_encrypt']) || $a['is_encrypt'] == 1) ?
+ $this->encrypt($val) : $val,
+ 'is_encrypt' => isset($a['is_encrypt']) ? $a['is_encrypt'] : 1
+ ));
+
+ $s->beforeInsert();
+
+ $s->insert();