Code Duplication    Length = 7-8 lines in 2 locations

gateway-notify.php 1 location

@@ 33-40 (lines=8) @@
30
$gateway = oledrion_gateways::getCurrentGateway();
31
$temporaryGateway = null;
32
$temporaryGateway = oledrion_gateways::getGatewayObject();
33
if (is_object($temporaryGateway)) {
34
    if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) {
35
        file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>');
36
    }
37
    $user_log = $temporaryGateway->gatewayNotify(OLEDRION_GATEWAY_LOG_PATH);
38
    unset($temporaryGateway);
39
    echo $user_log;
40
}
41

thankyou.php 1 location

@@ 35-41 (lines=7) @@
32
// On donne la possibilité à la passerelle de traiter la commande
33
$gateway = null;
34
$gateway = oledrion_gateways::getGatewayObject();
35
if (is_object($gateway) && method_exists($gateway, 'thankYou')) {
36
    if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) {
37
        file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>');
38
    }
39
    $gateway->thankYou(OLEDRION_GATEWAY_LOG_PATH);
40
    unset($gateway);
41
}
42
$xoopsTpl->assign('success', $success);
43
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
44
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_PURCHASE_FINSISHED)));