qa-util-debug.php 1.06 KB
Newer Older
Scott committed
1 2 3 4 5 6 7 8
<?php
/**
 * @deprecated This file is deprecated from Q2A 1.7; use Q2A_Util_Usage class (Q2A/Util/Usage.php) instead.
 *
 * The functions in this file are maintained for backwards compatibility, but simply call through to the
 * new class where applicable.
 */

9 10 11 12 13 14 15 16 17
if (!defined('QA_VERSION')) {
	header('Location: ../');
	exit;
}

if (defined('QA_DEBUG_PERFORMANCE') && QA_DEBUG_PERFORMANCE) {
	trigger_error('Included file ' . basename(__FILE__) . ' is deprecated');
}

Scott committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
function qa_usage_init()
{
	// should already be initialised in qa-base.php
	global $qa_usage;
	if (empty($qa_usage))
		$qa_usage = new Q2A_Util_Usage;
}

function qa_usage_get()
{
	global $qa_usage;
	return $qa_usage->getCurrent();
}

function qa_usage_delta($oldusage, $newusage)
{
	// equivalent function is now private
	return array();
}

function qa_usage_mark($stage)
{
	global $qa_usage;
	return $qa_usage->mark($stage);
}

function qa_usage_line($stage, $usage, $totalusage)
{
	// equivalent function is now private
	return '';
}

function qa_usage_output()
{
	global $qa_usage;
	return $qa_usage->output();
}