Code Duplication    Length = 17-17 lines in 2 locations

admin/wffaq.php 1 location

@@ 197-213 (lines=17) @@
194
            $faqObj->setVar('diduno', $wft_summary);
195
            $faqObj->setVar('exacturl', 0);
196
197
            if (!$faqObj->store(false)) {
198
                echo sprintf('  ' . _AM_SF_IMPORT_FAQ_ERROR, $wft_question) . '<br/>';
199
                continue;
200
            } else {
201
                $answerObj->setVar('faqid', $faqObj->faqid());
202
                $answerObj->setVar('answer', $wft_answer);
203
                $answerObj->setVar('uid', $wft_uid);
204
                $answerObj->setVar('status', _SF_AN_STATUS_APPROVED);
205
206
                if (!$answerObj->store()) {
207
                    echo sprintf('  ' . _AM_SF_IMPORT_FAQ_ERROR) . '<br/>';
208
                    continue;
209
                } else {
210
                    echo '&nbsp;&nbsp;' . sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)) . '<br />';
211
                    ++$cnt_imported_faq;
212
                }
213
            }
214
        }
215
216
        echo '<br/>';

admin/xoopsfaq.php 1 location

@@ 196-212 (lines=17) @@
193
            $faqObj->setVar('xcodes', $xfaq_contents_noxcode == 1 ? 0 : 1);
194
            $faqObj->setVar('cancomment', $cancomment);
195
196
            if (!$faqObj->store(false)) {
197
                echo sprintf('  ' . _AM_SF_IMPORT_FAQ_ERROR, $xfaq_contents_title) . '<br/>';
198
                continue;
199
            } else {
200
                $answerObj->setVar('faqid', $faqObj->faqid());
201
                $answerObj->setVar('answer', $xfaq_contents_contents);
202
                $answerObj->setVar('uid', $uid);
203
                $answerObj->setVar('status', _SF_AN_STATUS_APPROVED);
204
205
                if (!$answerObj->store()) {
206
                    echo sprintf('  ' . _AM_SF_IMPORT_FAQ_ERROR) . '<br/>';
207
                    continue;
208
                } else {
209
                    echo '&nbsp;&nbsp;' . sprintf(_AM_SF_IMPORTED_QUESTION, $faqObj->question(50)) . '<br />';
210
                    ++$cnt_imported_faq;
211
                }
212
            }
213
        }
214
215
        echo '<br/>';