<commit_before><?php

/**
 * 
 * template close, code that runs when an editor window is closed to remove the lock file
 *
 * @author <NAME>
 * @version 1.0
 * @copyright Copyright (c) 2008,2009 University of Nottingham
 * @package
 */

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

_load_language_file("/website_code/php/versioncontrol/template_close.inc");

require('../template_status.php');

$temp_array = explode("-",$_POST['file_path']);

database_connect("template close success","template close fail");
<commit_msg>fix undefined variable issue/session expired issue with template_close.php<commit_after><?php

/**
 * 
 * template close, code that runs when an editor window is closed to remove the lock file
 *
 * @author <NAME>
 * @version 1.0
 * @copyright Copyright (c) 2008,2009 University of Nottingham
 * @package
 */

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

if(empty($_SESSION) || !isset($_SESSION['toolkits_logon_id'])) {
    die("Session expired; please login again.");
}

_load_language_file("/website_code/php/versioncontrol/template_close.inc");

require('../template_status.php');

$temp_array = explode("-",$_POST['file_path']);

database_connect("template close success","template close fail");

{'fraction_non_alphanumeric': 0.1605960264900662, 'fraction_numerical': 0.016556291390728478, 'mean_word_length': 5.045, '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': '7385760', 'n_tokens_mistral': 373, 'n_tokens_neox': 350, 'n_words': 92}