<commit_before><?php

/*
// Alkaline
// Copyright (c) 2010-2011 by Budin Ltd. All rights reserved.
// Do not redistribute this code without written permission from Budin Ltd.
// http://www.alkalineapp.com/
*/

require_once('./../../config.php');
require_once(PATH . CLASSES . 'alkaline.php');

$alkaline = new Alkaline;
$user = new User;

$user->perm(true, 'maintenance');

// Cache
require_once(PATH . CLASSES . 'cache_lite/Lite.php');

// Set a few options
$options = array(
    'cacheDir' => PATH . CACHE,
    'lifeTime' => 999999999999999,
);

// Create a Cache_Lite object
$cache = new Cache_Lite($options);

if(!$report = $cache->get('diagnostic_report')){
	$alkaline->addNote('Your diagnostic report could not be submitted. Please try again.', 'error');
}

$data = http_build_query(
    array(
		'domain' => $_SERVER['HTTP_HOST'],
        'report' => $report
    )
);

$opts = array(
	'http' => array(
		'method' => 'POST',<commit_msg>Send diagnostic report (on error) bugfix<commit_after><?php

/*
// Alkaline
// Copyright (c) 2010-2011 by Budin Ltd. All rights reserved.
// Do not redistribute this code without written permission from Budin Ltd.
// http://www.alkalineapp.com/
*/

require_once('./../../config.php');
require_once(PATH . CLASSES . 'alkaline.php');

$alkaline = new Alkaline;
$user = new User;

$user->perm(true, 'maintenance');

// Cache
require_once(PATH . CLASSES . 'cache_lite/Lite.php');

// Set a few options
$options = array(
    'cacheDir' => PATH . CACHE,
    'lifeTime' => 999999999999999,
);

// Create a Cache_Lite object
$cache = new Cache_Lite($options);

if(!$report = $cache->get('diagnostic_report')){
	$alkaline->addNote('Your diagnostic report could not be submitted. Please try again.', 'error');
	header('Location: ' . LOCATION . BASE . ADMIN . 'settings' . URL_CAP);
}

$data = http_build_query(
    array(
		'domain' => $_SERVER['HTTP_HOST'],
        'report' => $report
    )
);

$opts = array(
	'http' => array(
		'method' => 'POST',
{'fraction_non_alphanumeric': 0.17599596570852244, 'fraction_numerical': 0.02319717599596571, 'mean_word_length': 3.6792452830188678, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '2749637', 'n_tokens_mistral': 724, 'n_tokens_neox': 669, 'n_words': 176}