projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c84d818
)
UpdateDatabase.php
author
john
<john@roojs.com>
Wed, 24 Jan 2018 04:26:03 +0000
(12:26 +0800)
committer
john
<john@roojs.com>
Wed, 24 Jan 2018 04:26:03 +0000
(12:26 +0800)
UpdateDatabase.php
patch
|
blob
|
history
diff --git
a/UpdateDatabase.php
b/UpdateDatabase.php
index
3022cf6
..
abef7cb
100644
(file)
--- a/
UpdateDatabase.php
+++ b/
UpdateDatabase.php
@@
-858,6
+858,19
@@
class Pman_Core_UpdateDatabase extends Pman
$cm->to_group = $gp->id;
}
+ if(isset($cm->to_group)) {
+ if($cm->to_group > 0) {
+
+ $gp = DB_DataObject::Factory('core_group')->lookup('name',$data['to_group']);
+
+ if (empty($gp->id)) {
+ $this->jerr("to_group {$data['to_group']} does not exist when importing template $name");
+ }
+
+ $cm->to_group = $gp->id;
+ }
+ }
+
if(isset($data['active'])) {
$cm->active = $data['active'];
}