<commit_before><?php
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$

// <NAME>
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
	header("location: index.php");
	exit;
}
function smarty_modifier_tasklink($taskId, $class_name="link", $offset="0", $sort_mode="priority_desc")
{
	global $tasklib, $user, $prefs, $smarty;
	$tikilib = TikiLib::lib('tiki');

	include_once('lib/tasks/tasklib.php');

	$info = $tasklib->get_task($user, $taskId);
	if ($prefs['feature_community_mouseover'] == 'y') {
		$description = "";

		$my_length = strlen($info['description']);
		$my_pos=0;
		$line = 0;
		if ( $my_length > 0 ) {
			do {
				$line++;
				$my_pos = strpos($info['description'], "\n", ($my_pos+1));
			} while (($line <= 15) && ($my_pos!=''));
		}

		if (($my_length >= 1300) || ($line >= 16)) {
			if ($line < 15) {
				$my_pos = 1300;
			}
			$description .= substr($info['description'], 0, min(1300, $my_pos+1));
			$append = "<br /><center><span class=\'highlight\'>" . tra("Text cut here") . "</span></center>";
		} else {
			$description = $info['description'];
			$append = '';
		}

		// FIXME: Truncated Tiki syntax cannot be parsed.
		$description =str_replace("\n", "", (str_replace("\r\n", "<br />", TikiLib::lib('parser')->parse_data($description)))) . $append;

		$fillin = tra("Task") . ' ' . tra("from") . ' <b>' . $info['creator'] . '</b> ' . tra("for") .
			' <b>' . $info['user'] . '</b>.<br />' . tra("Priority") . ': <b>' . $info['priority'] . '</b>, (<b>' .
					$info['percentage'] . '%</b>) ' . tra('done') . '.<br />';

		if ($info['start'] != 0 ) {
			$fillin .= tra("Start date:") . " " . $tikilib->date_format("%H:%M -- %d. %e. %Y", $info['start']) . "<br />";
		} else {<commit_msg>Stop messing with line breaks in description for no clear reason<commit_after><?php
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$

// <NAME>
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
	header("location: index.php");
	exit;
}
function smarty_modifier_tasklink($taskId, $class_name="link", $offset="0", $sort_mode="priority_desc")
{
	global $tasklib, $user, $prefs, $smarty;
	$tikilib = TikiLib::lib('tiki');

	include_once('lib/tasks/tasklib.php');

	$info = $tasklib->get_task($user, $taskId);
	if ($prefs['feature_community_mouseover'] == 'y') {
		$description = "";

		$my_length = strlen($info['description']);
		$my_pos=0;
		$line = 0;
		if ( $my_length > 0 ) {
			do {
				$line++;
				$my_pos = strpos($info['description'], "\n", ($my_pos+1));
			} while (($line <= 15) && ($my_pos!=''));
		}

		if (($my_length >= 1300) || ($line >= 16)) {
			if ($line < 15) {
				$my_pos = 1300;
			}
			$description .= substr($info['description'], 0, min(1300, $my_pos+1));
			$append = "<br /><center><span class=\'highlight\'>" . tra("Text cut here") . "</span></center>";
		} else {
			$description = $info['description'];
			$append = '';
		}

		// FIXME: Truncated Tiki syntax cannot be parsed.
		$description = TikiLib::lib('parser')->parse_data($description) . $append;

		$fillin = tra("Task") . ' ' . tra("from") . ' <b>' . $info['creator'] . '</b> ' . tra("for") .
			' <b>' . $info['user'] . '</b>.<br />' . tra("Priority") . ': <b>' . $info['priority'] . '</b>, (<b>' .
					$info['percentage'] . '%</b>) ' . tra('done') . '.<br />';

		if ($info['start'] != 0 ) {
			$fillin .= tra("Start date:") . " " . $tikilib->date_format("%H:%M -- %d. %e. %Y", $info['start']) . "<br />";
		} else {
{'fraction_non_alphanumeric': 0.23882820258192652, 'fraction_numerical': 0.016881827209533268, 'mean_word_length': 3.6470588235294117, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 50, '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': '1869177', 'n_tokens_mistral': 1602, 'n_tokens_neox': 1419, 'n_words': 351}