<commit_before><?php

//Burden, Copyright <NAME> (http://github.com/joshf/Burden)

if (!file_exists("../../config.php")) {
    header("Location: ../../installer");
}

require_once("../../config.php");

$uniquekey = UNIQUE_KEY;

session_start();
if (!isset($_SESSION["is_logged_in_" . $uniquekey . ""])) {
    header("Location: ../login.php");
    exit; 
}

if (!isset($_POST["idtoedit"])) {
    header("Location: ../../admin");
}	

$idtoedit = mysql_real_escape_string($_POST["idtoedit"]);

//Connect to database
@$con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if (!$con) {
    header("Location: ../edit.php?id=$idtoedit&error=dberror");
    exit;
}

mysql_select_db(DB_NAME, $con);<commit_msg>Do that in a more logical way<commit_after><?php

//Burden, Copyright <NAME> (http://github.com/joshf/Burden)

if (!file_exists("../../config.php")) {
    header("Location: ../../installer");
}

require_once("../../config.php");

$uniquekey = UNIQUE_KEY;

session_start();
if (!isset($_SESSION["is_logged_in_" . $uniquekey . ""])) {
    header("Location: ../login.php");
    exit; 
}

if (!isset($_POST["idtoedit"])) {
    header("Location: ../../admin");
}	

//Connect to database
@$con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if (!$con) {
    header("Location: ../edit.php?id=" . $_POST["idtoedit"] . "&error=dberror");
    exit;
}

mysql_select_db(DB_NAME, $con);

$idtoedit = mysql_real_escape_string($_POST["idtoedit"]);
{'fraction_non_alphanumeric': 0.23307745987438938, 'fraction_numerical': 0.0, 'mean_word_length': 4.176895306859206, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3269093', 'n_tokens_mistral': 538, 'n_tokens_neox': 525, 'n_words': 85}