<commit_before><?php
require_once('include/NotificationsManager.php');

function notify_init(App &$a) {
	if (! local_user()) {
		return;
	}
	$nm = new NotificationsManager();

	if ($a->argc > 2 && $a->argv[1] === 'view' && intval($a->argv[2])) {
		$note = $nm->getByID($a->argv[2]);
		if ($note) {
			$nm->setSeen($note);
		
			// The friendica client has problems with the GUID. this is some workaround
			if ($a->is_friendica_app()) {
				require_once("include/items.php");
				$urldata = parse_url($note['link']);
				$guid = basename($urldata["path"]);
				$itemdata = get_item_id($guid, local_user());
				if ($itemdata["id"] != 0) {
					$note['link'] = App::get_baseurl().'/display/'.$itemdata["nick"].'/'.$itemdata["id"];
				}
			}

			goaway($note['link']);<commit_msg>added curly braces + space between "if" and brace<commit_after><?php
require_once('include/NotificationsManager.php');

function notify_init(App &$a) {
	if (! local_user()) {
		return;
	}

	$nm = new NotificationsManager();

	if ($a->argc > 2 && $a->argv[1] === 'view' && intval($a->argv[2])) {
		$note = $nm->getByID($a->argv[2]);
		if ($note) {
			$nm->setSeen($note);
		
			// The friendica client has problems with the GUID. this is some workaround
			if ($a->is_friendica_app()) {
				require_once("include/items.php");
				$urldata = parse_url($note['link']);
				$guid = basename($urldata["path"]);
				$itemdata = get_item_id($guid, local_user());
				if ($itemdata["id"] != 0) {
					$note['link'] = App::get_baseurl().'/display/'.$itemdata["nick"].'/'.$itemdata["id"];
				}
			}

			goaway($note['link']);
{'fraction_non_alphanumeric': 0.22884012539184953, 'fraction_numerical': 0.006269592476489028, 'mean_word_length': 4.082802547770701, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '2170876', 'n_tokens_mistral': 664, 'n_tokens_neox': 579, 'n_words': 106}