projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b516c10
)
Import/Core_email.php
author
Alan Knowles
<alan@roojs.com>
Tue, 6 Oct 2015 05:58:48 +0000
(13:58 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 6 Oct 2015 05:58:48 +0000
(13:58 +0800)
Import/Core_email.php
patch
|
blob
|
history
diff --git
a/Import/Core_email.php
b/Import/Core_email.php
index
486e865
..
4e487a5
100644
(file)
--- a/
Import/Core_email.php
+++ b/
Import/Core_email.php
@@
-24,6
+24,13
@@
class Pman_Core_Import_Core_email extends Pman
'max' => 1,
),
'max' => 1,
),
+ 'master' => array(
+ 'desc' => 'Update template (deletes old version?)',
+ 'short' => 'u',
+ 'default' => '',
+ 'min' => 1,
+ 'max' => 1,
+ ),
);
function getAuth()
);
function getAuth()
@@
-45,6
+52,13
@@
class Pman_Core_Import_Core_email extends Pman
if (!file_exists($opts['file'])) {
$this->jerr("file does not exist : " . $opts['file']);
}
if (!file_exists($opts['file'])) {
$this->jerr("file does not exist : " . $opts['file']);
}
+
+
+ if (!empty($opts['master']) && !file_exists($opts['master'])) {
+ $this->jerr("master file does not exist : " . $opts['master']);
+ }
+
+
$c = DB_dataObject::factory('core_email');
$ret = $c->get('name',$template_name);
$c = DB_dataObject::factory('core_email');
$ret = $c->get('name',$template_name);