-
- $c = DB_dataObject::factory('core_email');
- $ret = $c->get('name',$template_name);
- if($ret && empty($opts['update'])) {
- $this->jerr("use --update 1 to update the template..");
+ if (empty($cm)) {
+ $cm = DB_dataObject::factory('core_email');
+ $ret = $cm->get('name',$template_name);
+ if($ret && empty($opts['update'])) {
+ $this->jerr("use --update to update the template..");
+ }