Code Duplication    Length = 10-10 lines in 2 locations

install/cli-install.php 2 locations

@@ 1311-1320 (lines=10) @@
1308
                        }
1309
                    }
1310
                    echo "  $name: " . $_lang['upgraded'] . PHP_EOL;
1311
                } else {
1312
                    if ($properties != NULL ){
1313
                        $properties = mysqli_real_escape_string($conn, parseProperties($properties, true));
1314
                    }
1315
                    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);")) {
1316
                        echo mysqli_error($sqlParser->conn) . PHP_EOL;
1317
                        return;
1318
                    }
1319
                    echo "  $name: " . $_lang['installed'] . PHP_EOL;
1320
                }
1321
                // add system events
1322
                if (count($events) > 0) {
1323
                    $ds=mysqli_query($sqlParser->conn, "SELECT id FROM $dbase.`".$table_prefix."site_plugins` WHERE name='$name' AND description='$desc';");
@@ 1370-1379 (lines=10) @@
1367
                        return;
1368
                    }
1369
                    echo "  $name: " . $_lang['upgraded'] . PHP_EOL;
1370
                } else {
1371
                    if ($properties != NULL ){
1372
                        $properties = mysqli_real_escape_string($conn, parseProperties($properties, true));
1373
                    }
1374
                    if (!mysqli_query($sqlParser->conn, "INSERT INTO $dbase.`" . $table_prefix . "site_snippets` (name,description,snippet,properties,category) VALUES('$name','$desc','$snippet','$properties',$category);")) {
1375
                        echo mysqli_error($sqlParser->conn) . PHP_EOL;
1376
                        return;
1377
                    }
1378
                    echo "  $name: " . $_lang['installed'] . PHP_EOL;
1379
                }
1380
            }
1381
        }
1382
    }