function initKeys()
{
- $dir = $this->keyDir();
+ $dir = $this->getkeyDirectory();
if(
file_exists("{$dir}/pub.key") ||
file_exists("{$dir}/pri.key")
function beforeInsert($q, $roo)
{
+ print_r($q);
exit;
return;
$this->initKeys();
- $val = $a['val'];
- if(!isset($a['is_encrypt']) || $a['is_encrypt'] == 1) {
- $val = $this->encrypt($val);
- }
-
$s = DB_DataObject::factory('core_setting');
$s->setFrom(array(
'module' => $a['module'],
'name' => $a['name'],
'description' => $a['description'],
- 'val' =>$val,
+ 'val' => (!isset($a['is_encrypt']) || $a['is_encrypt'] == 1) ?
+ $this->encrypt($val) : $val,
'is_encrypt' => isset($a['is_encrypt']) ? $a['is_encrypt'] : 1
));
+ print_r('setting');exit;
+
$s->insert();
}