<commit_before><?php

/***
 *
 * This API endpoint enables bulk modifications of posts' times via POST.
 *
 */


header('Content-type: application/json');

// This endpoint requires authentication:

session_start();

if (!isset($_SESSION['access_token'])) {
	header('HTTP/1.1 401 Unauthorized');
	exit;
}

// All right, our user is authenticated.

// $_SESSION['access_token'] contains oauth_token, oauth_token_secret, user_id, screen_name

$user = array(
	'user_id'          => (int) $_SESSION['access_token']['user_id'],
	'user_screen_name' => $_SESSION['access_token']['screen_name'],
	'user_token'       => $_SESSION['access_token']['oauth_token'],
	'user_secret'      => $_SESSION['access_token']['oauth_token_secret']
);




if (!isset($_POST['posts'])) {
	header('HTTP/1.1 400 Bad Request');
	exit;
}
<commit_msg>Tinyl API fix<commit_after><?php

/***
 *
 * This API endpoint enables bulk modifications of posts' times via POST.
 *
 */


header('Content-type: application/json');

// This endpoint requires authentication:

session_start();

if (!isset($_SESSION['access_token'])) {
	header('HTTP/1.1 401 Unauthorized');
	exit;
}

// All right, our user is authenticated.

// $_SESSION['access_token'] contains oauth_token, oauth_token_secret, user_id, screen_name

$user = array(
	'user_id'          => (int) $_SESSION['access_token']['user_id'],
	'user_screen_name' => $_SESSION['access_token']['screen_name'],
	'user_token'       => $_SESSION['access_token']['oauth_token'],
	'user_secret'      => $_SESSION['access_token']['oauth_token_secret']
);




if (!isset($_POST['posts'])) {
	exit;
}

{'fraction_non_alphanumeric': 0.17779164067373673, 'fraction_numerical': 0.009357454772301934, 'mean_word_length': 5.075757575757576, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '3338054', 'n_tokens_mistral': 537, 'n_tokens_neox': 516, 'n_words': 108}