projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cdf65d
)
DataObjects/Core_domain.php
author
Alan
<alan@roojs.com>
Fri, 6 Oct 2023 03:24:30 +0000
(11:24 +0800)
committer
Alan
<alan@roojs.com>
Fri, 6 Oct 2023 03:24:30 +0000
(11:24 +0800)
DataObjects/Core_domain.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_domain.php
b/DataObjects/Core_domain.php
index
89b4587
..
be765e7
100644
(file)
--- a/
DataObjects/Core_domain.php
+++ b/
DataObjects/Core_domain.php
@@
-15,5
+15,14
@@
class Pman_Core_DataObjects_Core_domain extends DB_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
-
+ function loadOrCreate($dom)
+ {
+ $cd = DB_DataObject::Factory($dom);
+ if ($cd->get('domain', $dom)) {
+ return $cd;
+ }
+ $cd->domain = $dom;
+ $cd->insert();
+ return $cd;
+ }
}