[core] Remove last remaining parts of profiling code which was removed in 2006.

This commit is contained in:
Michal Čihař
2010-08-30 11:01:31 +02:00
parent bf8a597d78
commit 7f1b1df69f
10 changed files with 6 additions and 123 deletions

View File

@@ -2653,29 +2653,6 @@ $cfg['DBG'] = array();
*/
$cfg['DBG']['sql'] = false;
/**
* Make the DBG stuff available
* To use the following, please install the DBG extension from http://dd.cron.ru/dbg/
*
* @global boolean $cfg['DBG']['php']
*/
$cfg['DBG']['php'] = false;
/**
* Produce profiling results of PHP
*
* @global boolean $cfg['DBG']['profile']['enable']
*/
$cfg['DBG']['profile']['enable'] = false;
/**
* Threshold of long running code to display
* Anything below the threshold is not displayed
*
* @global float $cfg['DBG']['profile']['threshold']
*/
$cfg['DBG']['profile']['threshold'] = 0.5;
/*******************************************************************************
* MySQL settings

View File

@@ -40,7 +40,6 @@ $strConfigConfigurationFile = __('Configuration file');
$strConfigConfirm_desc = __('Whether a warning ("Are your really sure...") should be displayed when you\'re about to lose data');
$strConfigConfirm_name = __('Confirm DROP queries');
$strConfigCtrlArrowsMoving_name = __('Field navigation using Ctrl+Arrows');
$strConfigDBG_php_name = __('Debug PHP');
$strConfigDBG_sql_name = __('Debug SQL');
$strConfigDefaultDisplay_name = __('Default display direction');
$strConfigDefaultPropDisplay_desc = __('[kbd]horizontal[/kbd], [kbd]vertical[/kbd] or a number that indicates maximum number for which vertical model is used');

View File

@@ -118,8 +118,7 @@ $forms['Features']['Developer'] = array(
'UserprefsDeveloperTab',
'Error_Handler/display',
'Error_Handler/gather',
'DBG/sql',
'DBG/php');
'DBG/sql');
$forms['Features']['Other_core_settings'] = array(
'NaturalOrder',
'InitialSlidersState',
@@ -370,4 +369,4 @@ $forms['Export']['Texy'] = array('Export' => array(
':group:' . __('Data'),
'texytext_null',
'texytext_columns'));
?>
?>

View File

@@ -51,8 +51,7 @@ $forms['Features']['Warnings'] = array(
$forms['Features']['Developer'] = array(
'Error_Handler/display',
'Error_Handler/gather',
'DBG/sql',
'DBG/php');
'DBG/sql');
$forms['Sql_queries']['Sql_queries'] = array(
'ShowSQL',
'Confirm',
@@ -272,4 +271,4 @@ $forms['Export']['Texy'] = array(
':group:' . __('Data'),
'Export/texytext_null',
'Export/texytext_columns');
?>
?>

View File

@@ -1,31 +0,0 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* @package phpMyAdmin-DBG
*/
if (! defined('PHPMYADMIN')) {
exit;
}
/**
* checks for DBG extension
*
* allways use $GLOBALS here, as this script is included by footer.inc.hp
* which can also be included from inside a function
*/
if ($GLOBALS['cfg']['DBG']['php']) {
/**
* Loads the DBG extension if needed
*/
if (! @extension_loaded('dbg') ) {
$message = PMA_Message::error(__('The %s extension is missing. Please check your PHP configuration.'),
$message->addParam(sprintf('[a@http://php.net/%1$s@Documentation][em]%1$s[/em][/a]', 'dbg'));
$message->addMessage('<a href="./Documentation.html#faqdbg" target="documentation">', false);
$message->addString(__('Documentation'));
$message->addMessage('</a>', false);
$message->display();
} else {
$GLOBALS['DBG'] = true;
}
}
?>

View File

@@ -29,8 +29,6 @@
* @uses $GLOBALS['userlink'] to close it
* @uses $cfg['Server']['user']
* @uses $cfg['NavigationBarIconic']
* @uses $cfg['DBG']['enable']
* @uses $cfg['DBG']['profile']['enable']
* @uses $cfg['MaxCharactersInDisplayedSQL']
* @uses PMA_isValid()
* @uses PMA_setHistory()
@@ -202,25 +200,6 @@ if (! $GLOBALS['is_ajax_request'] && file_exists(CUSTOM_FOOTER_FILE)) {
require CUSTOM_FOOTER_FILE;
}
/**
* Generates profiling data if requested
*/
// profiling deactivated due to licensing issues
if (! empty($GLOBALS['cfg']['DBG']['php'])
&& ! empty($GLOBALS['cfg']['DBG']['profile']['enable'])) {
//run the basic setup code first
require_once './libraries/dbg/setup.php';
//if the setup ran fine, then do the profiling
/*
if (! empty($GLOBALS['DBG'])) {
require_once './libraries/dbg/profiling.php';
dbg_dump_profiling_results();
}
*/
}
/**
* If we are in an AJAX request, we do not need to generate the closing tags for
* body and html.

View File

@@ -48,21 +48,6 @@ if (!empty($_GET['saved'])) {
$message->display();
}
// debug info
if ($cfg['DBG']['php']) {
$arr = ConfigFile::getInstance()->getConfigArray();
$arr2 = array();
foreach ($arr as $k => $v) {
$arr2[] = "<b>$k</b> " . var_export($v, true);
}
$arr2 = implode(', ', $arr2);
$arr2 .= '<br />Blacklist: ' . (empty($cfg['UserprefsDisallow'])
? '<i>empty</i>'
: implode(', ', $cfg['UserprefsDisallow']));
$msg = PMA_Message::notice('Settings: ' . $arr2);
$msg->display();
}
// warn about using session storage for settings
$cfgRelation = PMA_getRelationsParam();
if (!$cfgRelation['userconfigwork']) {

View File

@@ -164,7 +164,6 @@ function PMA_apply_userprefs(array $config_data)
$blacklist['Error_Handler/display'] = true;
$blacklist['Error_Handler/gather'] = true;
$blacklist['DBG/sql'] = true;
$blacklist['DBG/php'] = true;
}
$whitelist = array_flip(PMA_read_userprefs_fieldnames());
// whitelist some additional fields which are custom handled
@@ -313,4 +312,4 @@ function PMA_userprefs_autoload_header()
</div>
<?php
}
?>
?>