Code Duplication    Length = 20-20 lines in 3 locations

blocks/faqs_random_diduno.php 1 location

@@ 10-29 (lines=20) @@
7
 */
8
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
9
10
function b_faqs_random_diduno_show()
11
{
12
    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
13
14
    $block = array();
15
16
    // Creating the faq handler object
17
    $faqHandler = sf_gethandler('faq');
18
19
    // creating the FAQ object
20
    $faqsObj = $faqHandler->getRandomFaq('diduno', array(_SF_STATUS_PUBLISHED, _SF_STATUS_NEW_ANSWER));
21
22
    if ($faqsObj) {
23
        $block['content']     = $faqsObj->diduno();
24
        $block['id']          = $faqsObj->faqid();
25
        $block['lang_answer'] = _MB_SF_MOREDETAILS;
26
    }
27
28
    return $block;
29
}
30

blocks/faqs_random_faq.php 1 location

@@ 10-29 (lines=20) @@
7
 */
8
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
9
10
function b_faqs_random_faq_show()
11
{
12
    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
13
14
    $block = array();
15
16
    // Creating the faq handler object
17
    $faqHandler = sf_gethandler('faq');
18
19
    // creating the FAQ object
20
    $faqsObj = $faqHandler->getRandomFaq('question', array(_SF_STATUS_PUBLISHED, _SF_STATUS_NEW_ANSWER));
21
22
    if ($faqsObj) {
23
        $block['content']     = $faqsObj->question();
24
        $block['id']          = $faqsObj->faqid();
25
        $block['lang_answer'] = _MB_SF_ANSWERHERE;
26
    }
27
28
    return $block;
29
}
30

blocks/faqs_random_how.php 1 location

@@ 10-29 (lines=20) @@
7
 */
8
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
9
10
function b_faqs_random_how_show()
11
{
12
    include_once(XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php');
13
14
    $block = array();
15
16
    // Creating the faq handler object
17
    $faqHandler = sf_gethandler('faq');
18
19
    // creating the FAQ object
20
    $faqsObj = $faqHandler->getRandomFaq('howdoi', array(_SF_STATUS_PUBLISHED, _SF_STATUS_NEW_ANSWER));
21
22
    if ($faqsObj) {
23
        $block['content']     = $faqsObj->howdoi();
24
        $block['id']          = $faqsObj->faqid();
25
        $block['lang_answer'] = _MB_SF_ANSWERHERE;
26
    }
27
28
    return $block;
29
}
30