<commit_before><?php
	if(!isset($help_is_coming_config)) {
        //Get global plugin config - but only once
		$path = dirname(__FILE__) . "/config/config.json";
		$data = file_get_contents ($path);
        if($data) {
            $help_is_coming_config = json_decode($data, true);
            if(!isset($help_is_coming_config)) {
                echo "Error: help_is_coming config/config.json is not valid JSON.";
                exit(0);
            }
     
        } else {
            echo "Error: Missing config/config.json in help_is_coming plugin.";
            exit(0);
     
        }
  
  
    }
 
	$start_path = $help_is_coming_config['serverPath'];
	
	$staging = $help_is_coming_config['staging'];
	$notify = false;
	include_once($start_path . 'config/db_connect.php');	
	echo "Start path:" . $start_path . "\n";

	
	$define_classes_path = $start_path;     //This flag ensures we have access to the typical classes, before the cls.pluginapi.php is included
	
	echo "Classes path:" . $define_classes_path . "\n";
	
	require($start_path . "classes/cls.pluginapi.php");
	
	$api = new cls_plugin_api();
	
	//Insert a column into the user table - a free text json for the config on a per layer (forum) basis
	$sql = "ALTER TABLE tbl_layer ADD COLUMN `var_help_is_coming_json` varchar(2000) DEFAULT NULL";
	echo "Updating user table. SQL:" . $sql . "\n";
	$result = $api->db_select($sql);
	echo "Completed.  Make sure you set storeInDb as 'true' in your config/config.json file, to allow these settings per forum to be stored in the database, rather than just the config.\n";
	

?><commit_msg>store in database<commit_after><?php
	if(!isset($help_is_coming_config)) {
        //Get global plugin config - but only once
		$path = dirname(__FILE__) . "/config/config.json";
		$data = file_get_contents ($path);
        if($data) {
            $help_is_coming_config = json_decode($data, true);
            if(!isset($help_is_coming_config)) {
                echo "Error: help_is_coming config/config.json is not valid JSON.";
                exit(0);
            }
     
        } else {
            echo "Error: Missing config/config.json in help_is_coming plugin.";
            exit(0);
     
        }
  
  
    }
 
	$start_path = $help_is_coming_config['serverPath'];
	
	$staging = $help_is_coming_config['staging'];
	$notify = false;
	include_once($start_path . 'config/db_connect.php');	
	echo "Start path:" . $start_path . "\n";

	
	$define_classes_path = $start_path;     //This flag ensures we have access to the typical classes, before the cls.pluginapi.php is included
	
	echo "Classes path:" . $define_classes_path . "\n";
	
	require($start_path . "classes/cls.pluginapi.php");
	
	$api = new cls_plugin_api();
	
	//Insert a column into the user table - a free text json for the config on a per layer (forum) basis
	$sql = "ALTER TABLE tbl_layer ADD COLUMN `var_help_is_coming_json` varchar(2000) DEFAULT NULL";
	echo "Updating user table. SQL:" . $sql . "\n";
	$result = $api->db_select($sql);
	echo "\nCompleted.  Make sure you set storeInDb as 'true' in your config/config.json file, to allow these settings per forum to be stored in the database, rather than just the config.\n";
	

?>
{'fraction_non_alphanumeric': 0.12195882719900188, 'fraction_numerical': 0.0037429819089207735, 'mean_word_length': 2.9109756097560977, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7502514', 'n_tokens_mistral': 1038, 'n_tokens_neox': 991, 'n_words': 296}