Code Duplication    Length = 5-7 lines in 4 locations

caddy.php 1 location

@@ 40-44 (lines=5) @@
37
}
38
39
$op = 'default';
40
if (isset($_POST['op'])) {
41
    $op = $_POST['op'];
42
} elseif (isset($_GET['op'])) {
43
    $op = $_GET['op'];
44
}
45
46
$productId = 0;
47
if (isset($_POST['product_id'])) {

checkout.php 2 locations

@@ 44-48 (lines=5) @@
41
}
42
// Get option
43
$op = 'default';
44
if (isset($_POST['op'])) {
45
    $op = $_POST['op'];
46
} elseif (isset($_GET['op'])) {
47
    $op = $_GET['op'];
48
}
49
// Get action
50
$action = 'default';
51
if (isset($_POST['action'])) {
@@ 51-55 (lines=5) @@
48
}
49
// Get action
50
$action = 'default';
51
if (isset($_POST['action'])) {
52
    $action = $_POST['action'];
53
} elseif (isset($_GET['action'])) {
54
    $action = $_GET['action'];
55
}
56
// Get commend id
57
$commend_id = 0;
58
if (isset($_POST['commend_id'])) {

my-lists.php 1 location

@@ 36-42 (lines=7) @@
33
34
$baseurl  = OLEDRION_URL . basename(__FILE__); // URL de ce script
35
$handlers = OledrionHandler::getInstance();
36
if (isset($_GET['op'])) {
37
    $op = $_GET['op'];
38
} elseif (isset($_POST['op'])) {
39
    $op = $_POST['op'];
40
} else {
41
    $op = 'default';
42
}
43
$xoopsTpl->assign('baseurl', $baseurl);
44
Oledrion_utils::loadLanguageFile('modinfo.php');
45
Oledrion_utils::loadLanguageFile('admin.php');