Code Duplication    Length = 8-8 lines in 3 locations

canvashack.css.php 1 location

@@ 56-63 (lines=8) @@
53
}
54
55
$css = array();
56
if (($applicableCSS = $toolbox->mysql_query("
57
    SELECT *
58
        FROM `css`
59
        WHERE
60
            `canvashack` = '" . implode("' OR `canvashack` = '", array_keys($canvashacks)) . "'
61
")) == false) {
62
    exit;
63
}
64
while ($entry = $applicableCSS->fetch_assoc()) {
65
    $css[$entry['canvashack']] = shell_exec("php \"{$entry['path']}\" \"{$location}\" 2>&1");
66
}

canvashack.js.php 2 locations

@@ 49-56 (lines=8) @@
46
}
47
48
$dom = array();
49
if (($applicableDOM = $toolbox->mysql_query("
50
    SELECT *
51
        FROM `dom`
52
        WHERE
53
            `canvashack` = '" . implode("' OR `canvashack` = '", array_keys($canvashacks)) . "'
54
")) == false) {
55
    exit;
56
}
57
while ($entry = $applicableDOM->fetch_assoc()) {
58
    $dom[$entry['canvashack']] = "$('{$entry['selector']}').{$entry['event']}(" .
59
        (empty($entry['action']) ? '' : "this." . canonicalNamespaceId($entry['canvashack']) .
@@ 68-75 (lines=8) @@
65
    ' . implode(PHP_EOL . "\t", $dom) . '
66
}');
67
68
if (($response = $toolbox->mysql_query("
69
    SELECT *
70
        FROM `javascript`
71
        WHERE
72
            `canvashack` = '" . implode("' OR `canvashack` = '", array_keys($canvashacks)) . "'
73
")) == false) {
74
    exit;
75
}
76
while ($entry = $response->fetch_assoc()) {
77
    $javascript[$entry['canvashack']] = canvasHackNamespace(
78
        $entry['canvashack'],