Code Duplication    Length = 10-10 lines in 2 locations

install/cli-install.php 2 locations

@@ 1298-1307 (lines=10) @@
1295
                        }
1296
                    }
1297
                    echo "  $name: " . $_lang['upgraded'] . PHP_EOL;
1298
                } else {
1299
                    if ($properties != null) {
1300
                        $properties = mysqli_real_escape_string($conn, parseProperties($properties, true));
1301
                    }
1302
                    if (!mysqli_query($sqlParser->conn,
1303
                        "INSERT INTO $dbase.`" . $table_prefix . "site_plugins` (name,description,plugincode,properties,moduleguid,category,disabled) VALUES('$name','$desc','$plugin','$properties','$guid',$category,$disabled);")) {
1304
                        echo mysqli_error($sqlParser->conn) . PHP_EOL;
1305
1306
                        return;
1307
                    }
1308
                    echo "  $name: " . $_lang['installed'] . PHP_EOL;
1309
                }
1310
                // add system events
@@ 1366-1375 (lines=10) @@
1363
                        return;
1364
                    }
1365
                    echo "  $name: " . $_lang['upgraded'] . PHP_EOL;
1366
                } else {
1367
                    if ($properties != null) {
1368
                        $properties = mysqli_real_escape_string($conn, parseProperties($properties, true));
1369
                    }
1370
                    if (!mysqli_query($sqlParser->conn,
1371
                        "INSERT INTO $dbase.`" . $table_prefix . "site_snippets` (name,description,snippet,properties,category) VALUES('$name','$desc','$snippet','$properties',$category);")) {
1372
                        echo mysqli_error($sqlParser->conn) . PHP_EOL;
1373
1374
                        return;
1375
                    }
1376
                    echo "  $name: " . $_lang['installed'] . PHP_EOL;
1377
                }
1378
            }