Code Duplication    Length = 4-4 lines in 2 locations

admin/letter.php 1 location

@@ 170-173 (lines=4) @@
167
                            $template_path = XOOPS_ROOT_PATH . '/modules/xnewsletter/language/english/templates/';
168
                        }
169
                        $filename = $template_path . $templateObj->getVar('template_title') . '.tpl';
170
                        if (!file_exists ( $filename )) {
171
                            $letter['template_err'] = true;
172
                            $letter['template_err_text'] = str_replace('%s', $template_path, _AM_XNEWSLETTER_TEMPLATE_ERR_FILE);
173
                        }
174
                    }
175
                } else {
176
                    $letter['template_err'] = true;

admin/template.php 1 location

@@ 115-118 (lines=4) @@
112
                        $template_path = XOOPS_ROOT_PATH . '/modules/xnewsletter/language/english/templates/';
113
                    }
114
                    $filename = $template_path . $templateObj->getVar('template_title') . '.tpl';
115
                    if (!file_exists ( $filename )) {
116
                        $template['template_err'] = true;
117
                        $template['template_err_text'] = str_replace('%s', $template_path, _AM_XNEWSLETTER_TEMPLATE_ERR_FILE);
118
                    }
119
                    $template['type_text'] = $template['type_text'] . ' *';
120
                }
121
                $GLOBALS['xoopsTpl']->append('templates_list', $template);