<commit_before><?php
// (c) Copyright 2002-2012 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$

function wikiplugin_timesheet_info()
{
	return array(
		'name' => tra('TimeSheet'),
		'documentation' => 'Timesheet',
		'description' => tra('A portable timesheet usable in a webpage'),
		'prefs' => array('wikiplugin_timesheet', 'feature_time_sheet'),
		'body' => tra('text'),
		'icon' => 'img/icons/layout_header.png',
		'tags' => array( 'basic' ),		
		'params' => array(
		),
	);
}

function wikiplugin_timesheet($data, $params)
{
	global $tikilib, $tiki_p_view_trackers, $tiki_p_create_tracker_items;
	extract($params, EXTR_SKIP);
	
	if ( $tiki_p_view_trackers != "y" || $tiki_p_create_tracker_items != "y") return "";
	
	TikiLib::lib("header")->add_cssfile("lib/jquery/jtrack/css/jtrack.css");
	TikiLib::lib("header")->add_jsfile("lib/jquery/jtrack/js/domcached-0.1-jquery.js");
	TikiLib::lib("header")->add_jsfile("lib/jquery/jtrack/js/jtrack.js");
	TikiLib::lib("header")->add_jq_onready(
					"jTask.init();"
	);
	return "~np~" . TikiLib::lib("smarty")->fetch('wiki-plugins/wikiplugin_timesheet.tpl') . '~/np~';
}<commit_msg>[FIX] Remove tons of calls to headerlib when only 1 needed<commit_after><?php
// (c) Copyright 2002-2012 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$

function wikiplugin_timesheet_info()
{
	return array(
		'name' => tra('TimeSheet'),
		'documentation' => 'Timesheet',
		'description' => tra('A portable timesheet usable in a webpage'),
		'prefs' => array('wikiplugin_timesheet', 'feature_time_sheet'),
		'body' => tra('text'),
		'icon' => 'img/icons/layout_header.png',
		'tags' => array( 'basic' ),		
		'params' => array(
		),
	);
}

function wikiplugin_timesheet($data, $params)
{
	global $tikilib, $tiki_p_view_trackers, $tiki_p_create_tracker_items;
	extract($params, EXTR_SKIP);
	
	if ( $tiki_p_view_trackers != "y" || $tiki_p_create_tracker_items != "y") return "";
	
	TikiLib::lib("header")
		->add_cssfile("lib/jquery/jtrack/css/jtrack.css")
		->add_jsfile("lib/jquery/jtrack/js/domcached-0.1-jquery.js")
		->add_jsfile("lib/jquery/jtrack/js/jtrack.js")
		->add_jq_onready(
					"jTask.init();"
	);
	return "~np~" . TikiLib::lib("smarty")->fetch('wiki-plugins/wikiplugin_timesheet.tpl') . '~/np~';
}
{'fraction_non_alphanumeric': 0.17725880551301684, 'fraction_numerical': 0.008039816232771823, 'mean_word_length': 4.952164009111617, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '3421045', 'n_tokens_mistral': 1019, 'n_tokens_neox': 955, 'n_words': 193}