Code Duplication    Length = 12-12 lines in 2 locations

request.php 1 location

@@ 89-100 (lines=12) @@
86
        $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_PUBLISHED));
87
88
        $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED;
89
    } else {
90
        // Subscribe the user to On Published notification, if requested
91
        if ($notifypub == 1) {
92
            include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
93
            $notification_handler = &xoops_gethandler('notification');
94
            $notification_handler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
95
        }
96
        // Send notifications
97
        $newFaqObj->sendNotifications(array(_SF_NOT_QUESTION_SUBMITTED));
98
99
        $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL;
100
    }
101
102
    //redirect_header("javascript:history.go(-2)", 3, $redirect_msg);
103
redirect_header("index.php", 2, $redirect_msg);

submit.php 1 location

@@ 262-273 (lines=12) @@
259
        $newFaqObj->sendNotifications(array(_SF_NOT_FAQ_PUBLISHED));
260
261
        $redirect_msg = _MD_SF_QNA_RECEIVED_AND_PUBLISHED;
262
    } else {
263
        // Subscribe the user to On Published notification, if requested
264
        if ($notifypub == 1) {
265
            include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
266
            $notification_handler = &xoops_gethandler('notification');
267
            $notification_handler->subscribe('faq', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE);
268
        }
269
        // Send notifications
270
        $newFaqObj->sendNotifications(array(_SF_NOT_FAQ_SUBMITTED));
271
272
        $redirect_msg = _MD_SF_QNA_RECEIVED_NEED_APPROVAL;
273
    }
274
275
    redirect_header("index.php", 2, $redirect_msg);
276