Code Duplication    Length = 10-10 lines in 2 locations

install/cli-install.php 2 locations

@@ 1327-1336 (lines=10) @@
1324
                        }
1325
                    }
1326
                    echo "  $name: " . $_lang['upgraded'] . PHP_EOL;
1327
                } else {
1328
                    if ($properties != NULL ){
1329
                        $properties = mysqli_real_escape_string($conn, parseProperties($properties, true));
1330
                    }
1331
                    if (!mysqli_query($sqlParser->conn, "INSERT INTO $dbase.`" . $table_prefix . "site_plugins` (name,description,plugincode,properties,moduleguid,category,disabled) VALUES('$name','$desc','$plugin','$properties','$guid',$category,$disabled);")) {
1332
                        echo mysqli_error($sqlParser->conn) . PHP_EOL;
1333
                        return;
1334
                    }
1335
                    echo "  $name: " . $_lang['installed'] . PHP_EOL;
1336
                }
1337
                // add system events
1338
                if (count($events) > 0) {
1339
                    $ds=mysqli_query($sqlParser->conn, "SELECT id FROM $dbase.`".$table_prefix."site_plugins` WHERE name='$name' AND description='$desc';");
@@ 1386-1395 (lines=10) @@
1383
                        return;
1384
                    }
1385
                    echo "  $name: " . $_lang['upgraded'] . PHP_EOL;
1386
                } else {
1387
                    if ($properties != NULL ){
1388
                        $properties = mysqli_real_escape_string($conn, parseProperties($properties, true));
1389
                    }
1390
                    if (!mysqli_query($sqlParser->conn, "INSERT INTO $dbase.`" . $table_prefix . "site_snippets` (name,description,snippet,properties,category) VALUES('$name','$desc','$snippet','$properties',$category);")) {
1391
                        echo mysqli_error($sqlParser->conn) . PHP_EOL;
1392
                        return;
1393
                    }
1394
                    echo "  $name: " . $_lang['installed'] . PHP_EOL;
1395
                }
1396
            }
1397
        }
1398
    }