projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sync
[Pman.Core]
/
DataObjects
/
Core_setting.php
diff --git
a/DataObjects/Core_setting.php
b/DataObjects/Core_setting.php
index
1a69da3
..
05816c4
100644
(file)
--- a/
DataObjects/Core_setting.php
+++ b/
DataObjects/Core_setting.php
@@
-89,11
+89,9
@@
class Pman_Core_DataObjects_Core_setting extends DB_DataObject
$c = $this->lookup($a['module'], $a['name']);
$c = $this->lookup($a['module'], $a['name']);
- $o =
empty($c) ? false : clone($c)
;
+ $o =
$c ? clone($c) : false
;
- if(empty($c)) {
- $c = DB_DataObject::factory('core_setting');
- }
+ $c = $c ? $c : DB_DataObject::factory('core_setting');
$c->setFrom(array(
'module' => $a['module'],
$c->setFrom(array(
'module' => $a['module'],
@@
-105,7
+103,7
@@
class Pman_Core_DataObjects_Core_setting extends DB_DataObject
'is_valid' => 1
));
'is_valid' => 1
));
-
empty($o) ? $c->insert() : $c->update($o
);
+
$o ? $c->update($o) : $c->insert(
);
}
//one key for encrypting all the settings
}
//one key for encrypting all the settings