Renamed PMA_CommonFunctions::getInstance()-> with PMA_Util::

This commit is contained in:
Chanaka Indrajith 2012-09-16 14:41:47 +05:30
parent e6894be57f
commit 6971295e96
114 changed files with 291 additions and 291 deletions

View File

@ -11,7 +11,7 @@ require_once 'libraries/transformations.lib.php';
$field = $_REQUEST['field'];
PMA_CommonFunctions::getInstance()->checkParameters(array('db', 'table', 'field'));
PMA_Util::checkParameters(array('db', 'table', 'field'));
$response = PMA_Response::getInstance();
$response->getFooter()->setMinimal();
@ -65,7 +65,7 @@ if (is_array($foreignData['disp_row'])) {
$nbTotalPage = @ceil($foreignData['the_total'] / $session_max_rows);
if ($foreignData['the_total'] > $GLOBALS['cfg']['MaxRows']) {
$gotopage = PMA_CommonFunctions::getInstance()->pageselector(
$gotopage = PMA_Util::pageselector(
$session_max_rows,
$pageNow,
$nbTotalPage,

View File

@ -29,7 +29,7 @@ foreach ($post_params as $one_post_param) {
}
}
PMA_CommonFunctions::getInstance()->checkParameters(array('new_db'));
PMA_Util::checkParameters(array('new_db'));
/**
* Defines the url to return to in case of error in a sql statement
@ -39,7 +39,7 @@ $err_url = 'main.php?' . PMA_generate_common_url();
/**
* Builds and executes the db creation sql query
*/
$sql_query = 'CREATE DATABASE ' . PMA_CommonFunctions::getInstance()->backquote($new_db);
$sql_query = 'CREATE DATABASE ' . PMA_Util::backquote($new_db);
if (! empty($db_collation)) {
list($db_charset) = explode('_', $db_collation);
if (in_array($db_charset, $mysql_charsets)
@ -137,7 +137,7 @@ if (! $result) {
$response->addJSON('new_db_string', $new_db_string);
$response->addJSON(
'sql_query',
PMA_CommonFunctions::getInstance()->getMessage(
PMA_Util::getMessage(
null, $sql_query, 'success'
)
);

View File

@ -27,7 +27,7 @@ require_once 'libraries/Index.class.php';
/**
* Check parameters
*/
PMA_CommonFunctions::getInstance()->checkParameters(array('db'));
PMA_Util::checkParameters(array('db'));
/**
* Defines the url to return to in case of error in a sql statement
@ -125,8 +125,8 @@ foreach ($tables as $table) {
// http://bugs.mysql.com/20910.
$show_create_table_query = 'SHOW CREATE TABLE '
. PMA_CommonFunctions::getInstance()->backquote($db) . '.'
. PMA_CommonFunctions::getInstance()->backquote($table);
. PMA_Util::backquote($db) . '.'
. PMA_Util::backquote($table);
$show_create_table = PMA_DBI_fetch_value(
$show_create_table_query, 0, 1
);
@ -186,7 +186,7 @@ foreach ($tables as $table) {
$row['Null'] = 'NO';
}
$extracted_columnspec
= PMA_CommonFunctions::getInstance()->extractColumnSpec($row['Type']);
= PMA_Util::extractColumnSpec($row['Type']);
// reformat mysql query output
// set or enum types: slashes single quotes inside options
@ -285,6 +285,6 @@ foreach ($tables as $table) {
/**
* Displays the footer
*/
echo PMA_CommonFunctions::getInstance()->getButton();
echo PMA_Util::getButton();
?>

View File

@ -35,7 +35,7 @@ $cfgRelation = PMA_getRelationsParam();
// speedup view on locked tables
// Special speedup for newer MySQL Versions (in 4.0 format changed)
if ($cfg['SkipLockedTables'] == true) {
$result = PMA_DBI_query('SHOW OPEN TABLES FROM ' . PMA_CommonFunctions::getInstance()->backquote($db) . ';');
$result = PMA_DBI_query('SHOW OPEN TABLES FROM ' . PMA_Util::backquote($db) . ';');
// Blending out tables in use
if ($result != false && PMA_DBI_num_rows($result) > 0) {
while ($tmp = PMA_DBI_fetch_row($result)) {
@ -47,11 +47,11 @@ if ($cfg['SkipLockedTables'] == true) {
PMA_DBI_free_result($result);
if (isset($sot_cache)) {
$result = PMA_DBI_query('SHOW TABLES FROM ' . PMA_CommonFunctions::getInstance()->backquote($db) . ';', null, PMA_DBI_QUERY_STORE);
$result = PMA_DBI_query('SHOW TABLES FROM ' . PMA_Util::backquote($db) . ';', null, PMA_DBI_QUERY_STORE);
if ($result != false && PMA_DBI_num_rows($result) > 0) {
while ($tmp = PMA_DBI_fetch_row($result)) {
if (! isset($sot_cache[$tmp[0]])) {
$sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_CommonFunctions::getInstance()->backquote($db) . ' LIKE \'' . sqlAddSlashes($tmp[0], true) . '\';');
$sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_Util::backquote($db) . ' LIKE \'' . sqlAddSlashes($tmp[0], true) . '\';');
$sts_tmp = PMA_DBI_fetch_assoc($sts_result);
$tables[] = $sts_tmp;
} else { // table in use
@ -67,7 +67,7 @@ if ($cfg['SkipLockedTables'] == true) {
}
if (! isset($sot_ready)) {
$result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_CommonFunctions::getInstance()->backquote($db) . ';');
$result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_Util::backquote($db) . ';');
if (PMA_DBI_num_rows($result) > 0) {
while ($sts_tmp = PMA_DBI_fetch_assoc($result)) {
$tables[] = $sts_tmp;

View File

@ -26,7 +26,7 @@ require 'libraries/db_common.inc.php';
// If config variable $GLOBALS['cfg']['Usedbsearch'] is on false : exit.
if (! $GLOBALS['cfg']['UseDbSearch']) {
PMA_CommonFunctions::getInstance()->mysqlDie(
PMA_Util::mysqlDie(
__('Access denied'), '', false, $err_url
);
} // end if

View File

@ -107,8 +107,8 @@ $response->disable();
var token = '<?php echo PMA_escapeJsString($_SESSION[' PMA_token ']); ?>';
var text_dir = '<?php echo PMA_escapeJsString($GLOBALS['text_dir']); ?>';
var pma_absolute_uri = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['PmaAbsoluteUri']); ?>';
var pma_text_default_tab = '<?php echo PMA_escapeJsString(PMA_CommonFunctions::getInstance()->getTitleForTarget($GLOBALS['cfg']['DefaultTabTable'])); ?>';
var pma_text_left_default_tab = '<?php echo PMA_escapeJsString(PMA_CommonFunctions::getInstance()->getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable'])); ?>';
var pma_text_default_tab = '<?php echo PMA_escapeJsString(PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable'])); ?>';
var pma_text_left_default_tab = '<?php echo PMA_escapeJsString(PMA_Util::getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable'])); ?>';
// for content and navigation frames

View File

@ -437,7 +437,7 @@ function ADVISOR_bytime($num, $precision)
$num = round($num, $precision);
if ($num == 0) {
$num = '<' . PMA_CommonFunctions::getInstance()->pow(10, -$precision);
$num = '<' . PMA_Util::pow(10, -$precision);
}
return "$num $per";
@ -445,12 +445,12 @@ function ADVISOR_bytime($num, $precision)
function ADVISOR_timespanFormat($val)
{
return PMA_CommonFunctions::getInstance()->timespanFormat($val);
return PMA_Util::timespanFormat($val);
}
function ADVISOR_formatByteDown($value, $limes = 6, $comma = 0)
{
return PMA_CommonFunctions::getInstance()->formatByteDown($value, $limes, $comma);
return PMA_Util::formatByteDown($value, $limes, $comma);
}
?>

View File

@ -2797,7 +2797,7 @@ class PMA_DisplayResults
) {
$parsed_sql = PMA_SQP_parse($row[$i]);
$row[$i] = PMA_CommonFunctions::getInstance()->formatSql(
$row[$i] = PMA_Util::formatSql(
$parsed_sql, $row[$i]
);
include_once $this->sytax_highlighting_column_info[strtolower($this->__get('_db'))][strtolower($this->__get('_table'))][strtolower($meta->name)][0];

View File

@ -426,7 +426,7 @@ class PMA_File
}
$this->setName(
PMA_CommonFunctions::getInstance()->userDir($GLOBALS['cfg']['UploadDir']) . PMA_securePath($name)
PMA_Util::userDir($GLOBALS['cfg']['UploadDir']) . PMA_securePath($name)
);
if (! $this->isReadable()) {
$this->_error_message = __('File could not be read');

View File

@ -196,7 +196,7 @@ class PMA_Footer
$retval .= '<a href="index.php' . PMA_generate_common_url($url_params) . '"'
. ' title="' . __('Open new phpMyAdmin window') . '" target="_blank">';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$retval .= PMA_CommonFunctions::getInstance()->getImage(
$retval .= PMA_Util::getImage(
'window-new.png',
__('Open new phpMyAdmin window')
);

View File

@ -169,7 +169,7 @@ class PMA_Header
);
$this->_scripts->addFile('functions.js');
$this->_scripts->addCode(
PMA_CommonFunctions::getInstance()->getReloadNavigationScript(true)
PMA_Util::getReloadNavigationScript(true)
);
}
@ -452,7 +452,7 @@ class PMA_Header
$temp_title = $GLOBALS['cfg']['TitleDefault'];
}
$this->_title = htmlspecialchars(
PMA_CommonFunctions::getInstance()->expandUserString($temp_title)
PMA_Util::expandUserString($temp_title)
);
} else {
$this->_title = 'phpMyAdmin';

View File

@ -48,7 +48,7 @@ class PMA_PDF extends TCPDF
$this->SetY(-15);
$this->SetFont(PMA_PDF_FONT, '', 14);
$this->Cell(0, 6, __('Page number:') . ' ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 'T', 0, 'C');
$this->Cell(0, 6, PMA_CommonFunctions::getInstance()->localisedDate(), 0, 1, 'R');
$this->Cell(0, 6, PMA_Util::localisedDate(), 0, 1, 'R');
$this->SetY(20);
// set footerset

View File

@ -47,8 +47,8 @@ class PMA_RecentTable
if (strlen($GLOBALS['cfg']['Server']['pmadb'])
&& strlen($GLOBALS['cfg']['Server']['recent'])
) {
$this->pma_table = PMA_CommonFunctions::getInstance()->backquote($GLOBALS['cfg']['Server']['pmadb']) . "."
. PMA_CommonFunctions::getInstance()->backquote($GLOBALS['cfg']['Server']['recent']);
$this->pma_table = PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb']) . "."
. PMA_Util::backquote($GLOBALS['cfg']['Server']['recent']);
}
$server_id = $GLOBALS['server'];
if (! isset($_SESSION['tmp_user_values']['recent_tables'][$server_id])) {
@ -102,7 +102,7 @@ class PMA_RecentTable
$sql_query
= " REPLACE INTO " . $this->pma_table . " (`username`, `tables`)" .
" VALUES ('" . $username . "', '"
. PMA_CommonFunctions::getInstance()->sqlAddSlashes(
. PMA_Util::sqlAddSlashes(
json_encode($this->tables)
) . "')";

View File

@ -186,7 +186,7 @@ class PMA_StorageEngine
. ' <td>' . "\n";
if (! empty($details['desc'])) {
$ret .= ' '
. PMA_CommonFunctions::getInstance()->showHint($details['desc'])
. PMA_Util::showHint($details['desc'])
. "\n";
}
$ret .= ' </td>' . "\n"
@ -199,7 +199,7 @@ class PMA_StorageEngine
unset($parsed_size);
break;
case PMA_ENGINE_DETAILS_TYPE_NUMERIC:
$ret .= PMA_CommonFunctions::getInstance()->formatNumber($details['value']) . ' ';
$ret .= PMA_Util::formatNumber($details['value']) . ' ';
break;
default:
$ret .= htmlspecialchars($details['value']) . ' ';
@ -232,7 +232,7 @@ class PMA_StorageEngine
*/
function resolveTypeSize($value)
{
return PMA_CommonFunctions::getInstance()->formatByteDown($value);
return PMA_Util::formatByteDown($value);
}
/**

View File

@ -548,8 +548,8 @@ class PMA_Table
// fast enough
if (! $is_view || (PMA_DRIZZLE && PMA_is_system_schema($db))) {
$row_count = PMA_DBI_fetch_value(
'SELECT COUNT(*) FROM ' . PMA_CommonFunctions::getInstance()->backquote($db) . '.'
. PMA_CommonFunctions::getInstance()->backquote($table)
'SELECT COUNT(*) FROM ' . PMA_Util::backquote($db) . '.'
. PMA_Util::backquote($table)
);
} else {
// For complex views, even trying to get a partial record
@ -612,7 +612,7 @@ class PMA_Table
$attribute, $collation, $null, $default_type, $default_value,
$extra, $comment, &$field_primary, $index, $move_to
) {
return PMA_CommonFunctions::getInstance()->backquote($oldcol) . ' '
return PMA_Util::backquote($oldcol) . ' '
. PMA_Table::generateFieldSpec(
$newcol, $type, $index, $length, $attribute,
$collation, $null, $default_type, $default_value, $extra,

View File

@ -1114,7 +1114,7 @@ EOT;
$html_output = '<ul id="topmenu2">';
foreach ($this->_getSubTabs() as $tab) {
$html_output .= PMA_CommonFunctions::getInstance()->getHtmlTab($tab, $url_params);
$html_output .= PMA_Util::getHtmlTab($tab, $url_params);
}
$html_output .= '</ul>';
$html_output .= '<div class="clearfloat"></div>';

View File

@ -1027,7 +1027,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
* (note: when $cfg['ServerDefault'] = 0, constant is not defined)
*/
if (isset($_REQUEST['profiling'])
&& PMA_CommonFunctions::getInstance()->profilingSupported()
&& PMA_Util::profilingSupported()
) {
$_SESSION['profiling'] = true;
} elseif (isset($_REQUEST['profiling_form'])) {

View File

@ -168,7 +168,7 @@ function PMA_displayInput($path, $name, $type, $value, $description = '',
} else {
// In this case we just use getImage() because it's available
foreach ($icon_init as $k => $v) {
$icons[$k] = PMA_CommonFunctions::getInstance()->getImage(
$icons[$k] = PMA_Util::getImage(
$v[0], $v[1]
);
}

View File

@ -305,7 +305,7 @@ function PMA_warnMissingExtension($extension, $fatal = false, $extra = '')
function PMA_getTableCount($db)
{
$tables = PMA_DBI_try_query(
'SHOW TABLES FROM ' . PMA_CommonFunctions::getInstance()->backquote($db) . ';',
'SHOW TABLES FROM ' . PMA_Util::backquote($db) . ';',
null, PMA_DBI_QUERY_STORE
);
if ($tables) {

View File

@ -59,7 +59,7 @@ if (! PMA_DBI_checkDbExtension($GLOBALS['cfg']['Server']['extension'])) {
PMA_warnMissingExtension(
$GLOBALS['cfg']['Server']['extension'],
false,
PMA_CommonFunctions::getInstance()->showDocu('faqmysql')
PMA_Util::showDocu('faqmysql')
);
if ($GLOBALS['cfg']['Server']['extension'] === 'mysql') {
@ -73,7 +73,7 @@ if (! PMA_DBI_checkDbExtension($GLOBALS['cfg']['Server']['extension'])) {
PMA_warnMissingExtension(
$GLOBALS['cfg']['Server']['extension'],
true,
PMA_CommonFunctions::getInstance()->showDocu('faqmysql')
PMA_Util::showDocu('faqmysql')
);
}
@ -101,7 +101,7 @@ function PMA_DBI_query($query, $link = null, $options = 0,
$cache_affected_rows = true
) {
$res = PMA_DBI_try_query($query, $link, $options, $cache_affected_rows)
or PMA_CommonFunctions::getInstance()->mysqlDie(PMA_DBI_getError($link), $query);
or PMA_Util::mysqlDie(PMA_DBI_getError($link), $query);
return $res;
}
@ -314,7 +314,7 @@ function PMA_DBI_convert_message($message)
function PMA_DBI_get_tables($database, $link = null)
{
return PMA_DBI_fetch_result(
'SHOW TABLES FROM ' . PMA_CommonFunctions::getInstance()->backquote($database) . ';',
'SHOW TABLES FROM ' . PMA_Util::backquote($database) . ';',
null,
0,
$link,

View File

@ -14,7 +14,7 @@ if (! defined('PHPMYADMIN')) {
*/
require_once './libraries/bookmark.lib.php';
PMA_CommonFunctions::getInstance()->checkParameters(array('db'));
PMA_Util::checkParameters(array('db'));
$is_show_stats = $cfg['ShowStats'];
@ -61,7 +61,7 @@ if (! isset($is_db) || ! $is_db) {
if (isset($submitcollation) && !empty($db_collation)) {
list($db_charset) = explode('_', $db_collation);
$sql_query = 'ALTER DATABASE '
. PMA_CommonFunctions::getInstance()->backquote($db)
. PMA_Util::backquote($db)
. ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation);
$result = PMA_DBI_query($sql_query);
$message = PMA_Message::success();

View File

@ -50,7 +50,7 @@ if (empty($is_table)
if (! $is_table) {
$_result = PMA_DBI_try_query(
'SHOW TABLES LIKE \'' . PMA_CommonFunctions::getInstance()->sqlAddSlashes($table, true) . '\';',
'SHOW TABLES LIKE \'' . PMA_Util::sqlAddSlashes($table, true) . '\';',
null, PMA_DBI_QUERY_STORE
);
$is_table = @PMA_DBI_num_rows($_result);
@ -72,7 +72,7 @@ if (empty($is_table)
* only happen if IS_TRANSFORMATION_WRAPPER?
*/
$_result = PMA_DBI_try_query(
'SELECT COUNT(*) FROM ' . PMA_CommonFunctions::getInstance()->backquote($table) . ';',
'SELECT COUNT(*) FROM ' . PMA_Util::backquote($table) . ';',
null,
PMA_DBI_QUERY_STORE
);

View File

@ -18,7 +18,7 @@ if ($is_create_db_priv) {
// The user is allowed to create a db
?>
<form method="post" action="db_create.php" id="create_database_form" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax" ' : ''); ?>><strong>
<?php echo '<label for="text_create_db">' . __('Create database') . '</label>&nbsp;' . PMA_CommonFunctions::getInstance()->showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php echo '<label for="text_create_db">' . __('Create database') . '</label>&nbsp;' . PMA_Util::showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php echo PMA_generate_common_hidden_inputs('', '', 5); ?>
<input type="hidden" name="reload" value="1" />
<input type="text" name="new_db" value="<?php echo $db_to_create; ?>" maxlength="64" class="textfield" id="text_create_db"/>
@ -36,10 +36,10 @@ if ($is_create_db_priv) {
} else {
?>
<!-- db creation no privileges message -->
<strong><?php echo __('Create database') . ':&nbsp;' . PMA_CommonFunctions::getInstance()->showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<strong><?php echo __('Create database') . ':&nbsp;' . PMA_Util::showMySQLDocu('SQL-Syntax', 'CREATE_DATABASE'); ?></strong><br />
<?php
echo '<span class="noPrivileges">'
. PMA_CommonFunctions::getInstance()->getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle'))
. PMA_Util::getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle'))
. '' . __('No Privileges') .'</span>';
} // end create db form or message
?>

View File

@ -41,7 +41,7 @@ $is_create_table_priv = true;
<legend>
<?php
if ($GLOBALS['cfg']['PropertiesIconic']) {
echo PMA_CommonFunctions::getInstance()->getImage('b_newtbl.png');
echo PMA_Util::getImage('b_newtbl.png');
}
echo __('Create table');
?>

View File

@ -52,7 +52,7 @@ function PMA_select_language($use_fieldset = false, $show_doc = true)
$language_title = __('Language')
. (__('Language') != 'Language' ? ' - <em>Language</em>' : '');
if ($show_doc) {
$language_title .= PMA_CommonFunctions::getInstance()->showDocu('faq7_2');
$language_title .= PMA_Util::showDocu('faq7_2');
}
if ($use_fieldset) {
echo '<fieldset><legend lang="en" dir="ltr">' . $language_title . '</legend>';

View File

@ -269,7 +269,7 @@ function PMA_lookForUse($buffer, $db, $reload)
// $db must not contain the escape characters generated by backquote()
// ( used in PMA_buildSQL() as: backquote($db_name), and then called
// in PMA_importRunQuery() which in turn calls PMA_lookForUse() )
$db = PMA_CommonFunctions::getInstance()->unQuote($db);
$db = PMA_Util::unQuote($db);
$reload = true;
}
@ -462,7 +462,7 @@ function PMA_getColumnNumberFromName($name)
// base26 to base10 conversion : multiply each number
// with corresponding value of the position, in this case
// $i=0 : 1; $i=1 : 26; $i=2 : 676; ...
$column_number += $number * PMA_CommonFunctions::getInstance()->pow(26, $i);
$column_number += $number * PMA_Util::pow(26, $i);
}
return $column_number;
} else {

View File

@ -108,8 +108,8 @@ function PMA_analyzeWhereClauses(
foreach ($where_clause_array as $key_id => $where_clause) {
$local_query = 'SELECT * FROM '
. PMA_CommonFunctions::getInstance()->backquote($db) . '.'
. PMA_CommonFunctions::getInstance()->backquote($table)
. PMA_Util::backquote($db) . '.'
. PMA_Util::backquote($table)
. ' WHERE ' . $where_clause . ';';
$result[$key_id] = PMA_DBI_query($local_query, null, PMA_DBI_QUERY_STORE);
$rows[$key_id] = PMA_DBI_fetch_assoc($result[$key_id]);
@ -145,7 +145,7 @@ function PMA_showEmptyResultMessageOrSetUniqueCondition($rows, $key_id,
if (! $rows[$key_id]) {
unset($rows[$key_id], $where_clause_array[$key_id]);
PMA_Response::getInstance()->addHtml(
PMA_CommonFunctions::getInstance()->getMessage(
PMA_Util::getMessage(
__('MySQL returned an empty result set (i.e. zero rows).'),
$local_query
)
@ -158,7 +158,7 @@ function PMA_showEmptyResultMessageOrSetUniqueCondition($rows, $key_id,
$meta = PMA_DBI_get_fields_meta($result[$key_id]);
list($unique_condition, $tmp_clause_is_unique)
= PMA_CommonFunctions::getInstance()->getUniqueCondition(
= PMA_Util::getUniqueCondition(
$result[$key_id], count($meta), $meta, $rows[$key_id], true
);
@ -181,8 +181,8 @@ function PMA_showEmptyResultMessageOrSetUniqueCondition($rows, $key_id,
function PMA_loadFirstRowInEditMode($table, $db)
{
$result = PMA_DBI_query(
'SELECT * FROM ' . PMA_CommonFunctions::getInstance()->backquote($db)
. '.' . PMA_CommonFunctions::getInstance()->backquote($table) . ' LIMIT 1;',
'SELECT * FROM ' . PMA_Util::backquote($db)
. '.' . PMA_Util::backquote($table) . ' LIMIT 1;',
null,
PMA_DBI_QUERY_STORE
);
@ -1113,7 +1113,7 @@ function PMA_getBinaryAndBlobColumn(
) {
$html_output .= __('Binary - do not edit');
if (isset($data)) {
$data_size = PMA_CommonFunctions::getInstance()->formatByteDown(
$data_size = PMA_Util::formatByteDown(
strlen(stripslashes($data)), 3, 1
);
$html_output .= ' ('. $data_size [0] . ' ' . $data_size[1] . ')';
@ -1200,7 +1200,7 @@ function PMA_getHTMLinput($column, $column_name_appendix, $special_chars,
function PMA_getSelectOptionForUpload($vkey, $column)
{
$files = PMA_getFileSelectOptions(
PMA_CommonFunctions::getInstance()->userDir($GLOBALS['cfg']['UploadDir'])
PMA_Util::userDir($GLOBALS['cfg']['UploadDir'])
);
if ($files === false) {
@ -1246,7 +1246,7 @@ function PMA_getMaxUploadSize($column, $biggest_max_file_size)
$this_field_max_size = $max_field_sizes[$column['pma_type']];
}
$html_output
= PMA_CommonFunctions::getInstance()->getFormattedMaximumUploadSize(
= PMA_Util::getFormattedMaximumUploadSize(
$this_field_max_size
) . "\n";
// do not generate here the MAX_FILE_SIZE, because we should
@ -1563,7 +1563,7 @@ function PMA_getAfterInsertDropDown($where_clause, $after_insert, $found_unique_
function PMA_getSumbitAndResetButtonForActionsPanel($tabindex, $tabindex_for_value)
{
return '<td>'
. PMA_CommonFunctions::getInstance()->showHint(
. PMA_Util::showHint(
__('Use TAB key to move from value to value, or CTRL+arrows to move anywhere')
)
. '</td>'
@ -1898,8 +1898,8 @@ function PMA_buildSqlQuery($is_insertignore, $query_fields, $value_sets)
$insert_command = 'INSERT ';
}
$query[] = $insert_command . 'INTO '
. PMA_CommonFunctions::getInstance()->backquote($GLOBALS['db']) . '.'
. PMA_CommonFunctions::getInstance()->backquote($GLOBALS['table'])
. PMA_Util::backquote($GLOBALS['db']) . '.'
. PMA_Util::backquote($GLOBALS['table'])
. ' (' . implode(', ', $query_fields) . ') VALUES ('
. implode('), (', $value_sets) . ')';
unset($insert_command, $query_fields);

View File

@ -91,7 +91,7 @@ function PMA_ipMaskTest($testRange, $ipToTest)
for ($i = 0; $i < 31; $i++) {
if ($i < $regs[5] - 1) {
$maskl = $maskl + PMA_CommonFunctions::getInstance()->pow(2, (30 - $i));
$maskl = $maskl + PMA_Util::pow(2, (30 - $i));
} // end if
} // end for

View File

@ -33,7 +33,7 @@ function PMA_jsFormat($a_string = '', $add_backquotes = true)
$a_string = str_replace('#', '\\#', $a_string);
}
return (($add_backquotes) ? PMA_CommonFunctions::getInstance()->backquote($a_string) : $a_string);
return (($add_backquotes) ? PMA_Util::backquote($a_string) : $a_string);
} // end of the 'PMA_jsFormat()' function
/**

View File

@ -70,7 +70,7 @@ function PMA_getHtmlForRenameDatabase($db)
. '<legend>';
if ($GLOBALS['cfg']['PropertiesIconic']) {
$html_output .= PMA_CommonFunctions::getInstance()->getImage('b_edit.png');
$html_output .= PMA_Util::getImage('b_edit.png');
}
$html_output .= __('Rename database to') . ':'
. '</legend>';
@ -239,7 +239,7 @@ function PMA_getHtmlForChangeDatabaseCharset($db, $table)
$html_output .= '<fieldset>' . "\n"
. ' <legend>';
if ($GLOBALS['cfg']['PropertiesIconic']) {
$html_output .= PMA_CommonFunctions::getInstance()->getImage('s_asci.png');
$html_output .= PMA_Util::getImage('s_asci.png');
}
$html_output .= '<label for="select_db_collation">' . __('Collation')
. ':</label>' . "\n"
@ -274,7 +274,7 @@ function PMA_getHtmlForExportRelationalSchemaView($url_query)
$html_output = '<div class="operations_full_width">'
. '<fieldset><a href="schema_edit.php?' . $url_query . '">';
if ($GLOBALS['cfg']['PropertiesIconic']) {
$html_output .= PMA_CommonFunctions::getInstance()->getImage(
$html_output .= PMA_Util::getImage(
'b_edit.png'
);
}
@ -343,7 +343,7 @@ function PMA_getSqlQueryAndCreateDbBeforeCopy()
}
$local_query = 'CREATE DATABASE '
. PMA_CommonFunctions::getInstance()->backquote($_REQUEST['newname']);
. PMA_Util::backquote($_REQUEST['newname']);
if (isset($_REQUEST['db_collation'])) {
$local_query .= ' DEFAULT'
. PMA_generateCharsetQueryPart($_REQUEST['db_collation']);
@ -517,7 +517,7 @@ function PMA_runEventDefinitionsForDb($db)
{
$event_names = PMA_DBI_fetch_result(
'SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \''
. PMA_CommonFunctions::getInstance()->sqlAddSlashes($db, true) . '\';'
. PMA_Util::sqlAddSlashes($db, true) . '\';'
);
if ($event_names) {
foreach ($event_names as $event_name) {
@ -792,7 +792,7 @@ function PMA_getTableOptionFieldset($comment, $tbl_collation,
//Storage engine
$html_output .= '<tr><td>' . __('Storage Engine')
. PMA_CommonFunctions::getInstance()->showMySQLDocu(
. PMA_Util::showMySQLDocu(
'Storage_engines', 'Storage_engines'
)
. '</td>'
@ -891,7 +891,7 @@ function PMA_getTableOptionFieldset($comment, $tbl_collation,
$html_output .= '<tr><td>'
. '<label for="new_row_format">ROW_FORMAT</label></td>'
. '<td>';
$html_output .= PMA_CommonFunctions::getInstance()->getDropdown(
$html_output .= PMA_Util::getDropdown(
'new_row_format', $possible_row_formats[$tbl_storage_engine],
$current_row_format, 'new_row_format'
);
@ -1015,7 +1015,7 @@ function PMA_getHtmlForCopytable()
'data' => __('Structure and data'),
'dataonly' => __('Data only'));
$html_output .= PMA_CommonFunctions::getInstance()->getRadioFields(
$html_output .= PMA_Util::getRadioFields(
'what', $choices, 'data', true
);
@ -1220,7 +1220,7 @@ function PMA_getMaintainActionlink($action, $params, $url_params, $link,
. PMA_generate_common_url(array_merge($url_params, $params)) .'">'
. $action
. '</a>'
. PMA_CommonFunctions::getInstance()->showMySQLDocu($chapter, $link)
. PMA_Util::showMySQLDocu($chapter, $link)
. '</li>';
}
@ -1282,7 +1282,7 @@ function PMA_getDeleteDataOrTablelink($url_params, $syntax, $link, $id)
: ''
) . '>'
. $link . '</a>'
. PMA_CommonFunctions::getInstance()->showMySQLDocu(
. PMA_Util::showMySQLDocu(
'SQL-Syntax', $syntax
)
. '</li>';

View File

@ -420,16 +420,16 @@ function PMA_pluginGetOneOption(
$doc = $propertyGroup->getDoc();
if ($doc != null) {
if (count($doc) == 3) {
$ret .= PMA_CommonFunctions::getInstance()->showMySQLDocu(
$ret .= PMA_Util::showMySQLDocu(
$doc[0],
$doc[1],
false,
$doc[2]
);
} elseif (count($doc) == 1) {
$ret .= PMA_CommonFunctions::getInstance()->showDocu($doc[0]);
$ret .= PMA_Util::showDocu($doc[0]);
} else {
$ret .= PMA_CommonFunctions::getInstance()->showMySQLDocu(
$ret .= PMA_Util::showMySQLDocu(
$doc[0],
$doc[1]
);

View File

@ -126,7 +126,7 @@ class AuthenticationConfig extends AuthenticationPlugin
), E_USER_WARNING
);
}
PMA_CommonFunctions::getInstance()->mysqlDie(
PMA_Util::mysqlDie(
$conn_error, '', true, '', false
);
}

View File

@ -173,7 +173,7 @@ class AuthenticationCookie extends AuthenticationPlugin
<fieldset>
<legend>';
echo __('Log in');
echo PMA_CommonFunctions::getInstance()->showDocu('');
echo PMA_Util::showDocu('');
echo '</legend>';
if ($GLOBALS['cfg']['AllowArbitraryServer']) {
echo '
@ -536,7 +536,7 @@ class AuthenticationCookie extends AuthenticationPlugin
/**
* Clear user cache.
*/
PMA_CommonFunctions::getInstance()->clearUserCache();
PMA_Util::clearUserCache();
PMA_Response::getInstance()->disable();

View File

@ -186,7 +186,7 @@ class AuthenticationSignon extends AuthenticationPlugin
/**
* Clear user cache.
*/
PMA_CommonFunctions::getInstance()->clearUserCache();
PMA_Util::clearUserCache();
}
// Returns whether we get authentication settings or not

View File

@ -598,7 +598,7 @@ class ExportHtmlword extends ExportPlugin
$definition = '<tr class="print-category">';
$extracted_columnspec
= PMA_CommonFunctions::getInstance()->extractColumnSpec($column['Type']);
= PMA_Util::extractColumnSpec($column['Type']);
$type = htmlspecialchars($extracted_columnspec['print_type']);
if (empty($type)) {

View File

@ -220,7 +220,7 @@ class ExportLatex extends ExportPlugin
}
$head .= $crlf
. '% ' . __('Generation Time') . ': '
. PMA_CommonFunctions::getInstance()->localisedDate() . $crlf
. PMA_Util::localisedDate() . $crlf
. '% ' . __('Server version') . ': ' . PMA_MYSQL_STR_VERSION . $crlf
. '% ' . __('PHP Version') . ': ' . phpversion() . $crlf;
return PMA_exportOutputHandler($head);
@ -560,7 +560,7 @@ class ExportLatex extends ExportPlugin
$fields = PMA_DBI_get_columns($db, $table);
foreach ($fields as $row) {
$extracted_columnspec
= PMA_CommonFunctions::getInstance()->extractColumnSpec(
= PMA_Util::extractColumnSpec(
$row['Type']
);
$type = $extracted_columnspec['print_type'];

View File

@ -208,7 +208,7 @@ class ExportMediawiki extends ExportPlugin
// Print structure comment
$output = $this->_exportComment(
"Table structure for "
. PMA_CommonFunctions::getInstance()->backquote($table)
. PMA_Util::backquote($table)
);
// Begin the table construction
@ -282,7 +282,7 @@ class ExportMediawiki extends ExportPlugin
) {
// Print data comment
$output = $this->_exportComment(
"Table data for ". PMA_CommonFunctions::getInstance()->backquote($table)
"Table data for ". PMA_Util::backquote($table)
);
// Begin the table construction

View File

@ -699,7 +699,7 @@ class ExportOdt extends ExportPlugin
. '</table:table-cell>';
$extracted_columnspec
= PMA_CommonFunctions::getInstance()->extractColumnSpec($column['Type']);
= PMA_Util::extractColumnSpec($column['Type']);
$type = htmlspecialchars($extracted_columnspec['print_type']);
if (empty($type)) {
$type = '&nbsp;';

View File

@ -119,7 +119,7 @@ class ExportPhparray extends ExportPlugin
{
PMA_exportOutputHandler(
'//' . $GLOBALS['crlf']
. '// Database ' . PMA_CommonFunctions::getInstance()->backquote($db)
. '// Database ' . PMA_Util::backquote($db)
. $GLOBALS['crlf'] . '//' . $GLOBALS['crlf']
);
return true;
@ -196,8 +196,8 @@ class ExportPhparray extends ExportPlugin
// Output table name as comment if it's the first record of the table
if ($record_cnt == 1) {
$buffer .= $crlf . '// '
. PMA_CommonFunctions::getInstance()->backquote($db) . '.'
. PMA_CommonFunctions::getInstance()->backquote($table) . $crlf;
. PMA_Util::backquote($db) . '.'
. PMA_Util::backquote($table) . $crlf;
$buffer .= '$' . $tablefixed . ' = array(' . $crlf;
$buffer .= ' array(';
} else {

View File

@ -606,7 +606,7 @@ class ExportSql extends ExportPlugin
$head .=
$this->_exportComment(
__('Generation Time') . ': '
. PMA_CommonFunctions::getInstance()->localisedDate()
. PMA_Util::localisedDate()
)
. $this->_exportComment(
__('Server version') . ': ' . PMA_MYSQL_STR_VERSION
@ -759,7 +759,7 @@ class ExportSql extends ExportPlugin
. $this->_exportComment(
__('Database') . ': '
. (isset($GLOBALS['sql_backquotes'])
? PMA_CommonFunctions::getInstance()->backquoteCompat($db, $compat)
? PMA_Util::backquoteCompat($db, $compat)
: '\'' . $db . '\'')
)
. $this->_exportComment();

View File

@ -535,7 +535,7 @@ class ExportTexytext extends ExportPlugin
$column, $unique_keys
) {
$extracted_columnspec
= PMA_CommonFunctions::getInstance()->extractColumnSpec($column['Type']);
= PMA_Util::extractColumnSpec($column['Type']);
$type = $extracted_columnspec['print_type'];
if (empty($type)) {
$type = '&nbsp;';

View File

@ -124,7 +124,7 @@ class ImportCsv extends ImportPlugin
$leaf->setName("columns");
$leaf->setText(
__('Column names: ')
. PMA_CommonFunctions::getInstance()->showHint($hint)
. PMA_Util::showHint($hint)
);
$generalOptions->addProperty($leaf);
}

View File

@ -153,7 +153,7 @@ class ImportLdi extends ImportPlugin
if (strlen($ldi_new_line) > 0) {
if ($ldi_new_line == 'auto') {
$ldi_new_line
= (PMA_CommonFunctions::getInstance()->whichCrlf() == "\n")
= (PMA_Util::whichCrlf() == "\n")
? '\n'
: '\r\n';
}

View File

@ -219,7 +219,7 @@ class ImportXml extends ImportPlugin
*/
$attrs = $val2->attributes();
$create[] = "USE "
. PMA_CommonFunctions::getInstance()->backquote(
. PMA_Util::backquote(
$attrs["name"]
);

View File

@ -130,7 +130,7 @@ abstract class DateFormatTransformationsPlugin extends TransformationsPlugin
$timestamp -= $options[0] * 60 * 60;
$source = $buffer;
if ($options[2] == 'local') {
$text = PMA_CommonFunctions::getInstance()->localisedDate(
$text = PMA_Util::localisedDate(
$timestamp,
$options[1]
);

View File

@ -91,7 +91,7 @@ function get_script_contr()
PMA_DBI_select_db($GLOBALS['db']);
$con["C_NAME"] = array();
$i = 0;
$alltab_rs = PMA_DBI_query('SHOW TABLES FROM ' . PMA_CommonFunctions::getInstance()->backquote($GLOBALS['db']), null, PMA_DBI_QUERY_STORE);
$alltab_rs = PMA_DBI_query('SHOW TABLES FROM ' . PMA_Util::backquote($GLOBALS['db']), null, PMA_DBI_QUERY_STORE);
while ($val = @PMA_DBI_fetch_row($alltab_rs)) {
$row = PMA_getForeigners($GLOBALS['db'], $val[0], '', 'internal');
//echo "<br> internal ".$GLOBALS['db']." - ".$val[0]." - ";
@ -192,7 +192,7 @@ function get_script_tabs()
. 'var h_tabs = new Array();' . "\n" ;
for ($i = 0, $cnt = count($GLOBALS['PMD']['TABLE_NAME']); $i < $cnt; $i++) {
$script_tabs .= "j_tabs['" . $GLOBALS['PMD_URL']['TABLE_NAME'][$i] . "'] = '"
. PMA_CommonFunctions::getInstance()->isForeignKeySupported(
. PMA_Util::isForeignKeySupported(
$GLOBALS['PMD']['TABLE_TYPE'][$i]
)
? '1' : '0'
@ -219,7 +219,7 @@ function get_tab_pos()
`y` AS `Y`,
`v` AS `V`,
`h` AS `H`
FROM " . PMA_CommonFunctions::getInstance()->backquote($cfgRelation['db']) . "." . PMA_CommonFunctions::getInstance()->backquote($cfgRelation['designer_coords']);
FROM " . PMA_Util::backquote($cfgRelation['db']) . "." . PMA_Util::backquote($cfgRelation['designer_coords']);
$tab_pos = PMA_DBI_fetch_result($query, 'name', null, $GLOBALS['controllink'], PMA_DBI_QUERY_STORE);
return count($tab_pos) ? $tab_pos : null;
}

View File

@ -382,7 +382,7 @@ function PMA__getRelationsParam()
// fear it might be too slow
$tab_query = 'SHOW TABLES FROM '
. PMA_CommonFunctions::getInstance()->backquote(
. PMA_Util::backquote(
$GLOBALS['cfg']['Server']['pmadb']
);
$tab_rs = PMA_queryAsControlUser($tab_query, false, PMA_DBI_QUERY_STORE);

View File

@ -343,7 +343,7 @@ function PMA_replication_gui_master_addslaveuser()
. (isset($GLOBALS['hostname']) ? $GLOBALS['hostname'] : '')
. '" title="' . __('Host')
. '" onchange="pred_hostname.value = \'userdefined\';" />'
. PMA_CommonFunctions::getInstance()->showHint(
. PMA_Util::showHint(
__('When Host table is used, this field is ignored and values stored in Host table are used instead.')
)
. '</div>'

View File

@ -60,7 +60,7 @@ function PMA_EVN_main()
* Display a list of available events
*/
$columns = "`EVENT_NAME`, `EVENT_TYPE`, `STATUS`";
$where = "EVENT_SCHEMA='" . PMA_CommonFunctions::getInstance()->sqlAddSlashes($db) . "'";
$where = "EVENT_SCHEMA='" . PMA_Util::sqlAddSlashes($db) . "'";
$query = "SELECT $columns FROM `INFORMATION_SCHEMA`.`EVENTS` "
. "WHERE $where ORDER BY `EVENT_NAME` ASC;";
$items = PMA_DBI_fetch_result($query);

View File

@ -20,7 +20,7 @@ function PMA_RTE_handleExport($item_name, $export_data)
{
global $db;
$item_name = htmlspecialchars(PMA_CommonFunctions::getInstance()->backquote($_GET['item_name']));
$item_name = htmlspecialchars(PMA_Util::backquote($_GET['item_name']));
if ($export_data !== false) {
$export_data = '<textarea cols="40" rows="15" style="width: 100%;">'
. htmlspecialchars(trim($export_data)) . '</textarea>';
@ -37,7 +37,7 @@ function PMA_RTE_handleExport($item_name, $export_data)
. "</fieldset>\n";
}
} else {
$_db = htmlspecialchars(PMA_CommonFunctions::getInstance()->backquote($db));
$_db = htmlspecialchars(PMA_Util::backquote($db));
$response = __('Error in Processing Request') . ' : '
. sprintf(PMA_RTE_getWord('not_found'), $item_name, $_db);
$response = PMA_message::error($response);

View File

@ -109,7 +109,7 @@ function PMA_EVN_getFooterLinks()
$retval .= " </legend>\n";
$retval .= " <div class='wrap'>\n";
// show the toggle button
$retval .= PMA_CommonFunctions::getInstance()->toggleButton(
$retval .= PMA_Util::toggleButton(
"sql.php?$url_query&amp;goto=db_events.php" . urlencode("?db=$db"),
'sql_query',
$options,

View File

@ -38,7 +38,7 @@ function PMA_RTE_getList($type, $items)
$retval .= "<fieldset>\n";
$retval .= " <legend>\n";
$retval .= " " . PMA_RTE_getWord('title') . "\n";
$retval .= " " . PMA_CommonFunctions::getInstance()->showMySQLDocu('SQL-Syntax', PMA_RTE_getWord('docu')) . "\n";
$retval .= " " . PMA_Util::showMySQLDocu('SQL-Syntax', PMA_RTE_getWord('docu')) . "\n";
$retval .= " </legend>\n";
$retval .= " <div class='$class1' id='nothing2display'>\n";
$retval .= " " . PMA_RTE_getWord('nothing') . "\n";
@ -133,7 +133,7 @@ function PMA_RTN_getRowForList($routine, $rowclass = '')
$sql_drop = sprintf(
'DROP %s IF EXISTS %s',
$routine['ROUTINE_TYPE'],
PMA_CommonFunctions::getInstance()->backquote($routine['SPECIFIC_NAME'])
PMA_Util::backquote($routine['SPECIFIC_NAME'])
);
$type_link = "item_type={$routine['ROUTINE_TYPE']}";
@ -310,7 +310,7 @@ function PMA_EVN_getRowForList($event, $rowclass = '')
$sql_drop = sprintf(
'DROP EVENT IF EXISTS %s',
PMA_CommonFunctions::getInstance()->backquote($event['EVENT_NAME'])
PMA_Util::backquote($event['EVENT_NAME'])
);
$retval = " <tr class='noclick $rowclass'>\n";

View File

@ -63,7 +63,7 @@ if ($GLOBALS['cfg']['AjaxEnable']) {
/**
* Create labels for the list
*/
$titles = PMA_CommonFunctions::getInstance()->buildActionTitles();
$titles = PMA_Util::buildActionTitles();
/**
* Keep a list of errors that occured while

View File

@ -51,7 +51,7 @@ function PMA_RTN_main()
*/
$columns = "`SPECIFIC_NAME`, `ROUTINE_NAME`, `ROUTINE_TYPE`, ";
$columns .= "`DTD_IDENTIFIER`, `ROUTINE_DEFINITION`";
$where = "ROUTINE_SCHEMA='" . PMA_CommonFunctions::getInstance()->sqlAddSlashes($db) . "'";
$where = "ROUTINE_SCHEMA='" . PMA_Util::sqlAddSlashes($db) . "'";
$items = PMA_DBI_fetch_result(
"SELECT $columns FROM `INFORMATION_SCHEMA`.`ROUTINES` WHERE $where;"
);
@ -104,7 +104,7 @@ function PMA_RTN_parseOneParameter($value)
if ($parsed_param[$pos]['type'] == 'alpha_identifier'
|| $parsed_param[$pos]['type'] == 'quote_backtick'
) {
$retval[1] = PMA_CommonFunctions::getInstance()->unQuote(
$retval[1] = PMA_Util::unQuote(
$parsed_param[$pos]['data']
);
$pos++;
@ -246,7 +246,7 @@ function PMA_RTN_parseRoutineDefiner($parsed_query)
} else if ($fetching == true
&& $parsed_query[$i]['type'] == 'quote_backtick'
) {
$retval .= PMA_CommonFunctions::getInstance()->unQuote(
$retval .= PMA_Util::unQuote(
$parsed_query[$i]['data']
);
} else if ($fetching == true && $parsed_query[$i]['type'] == 'punct_user') {

View File

@ -92,7 +92,7 @@ function PMA_TRI_handleEditor()
}
} else {
$message = PMA_Message::success(__('Trigger %1$s has been modified.'));
$message->addParam(PMA_CommonFunctions::getInstance()->backquote($_REQUEST['item_name']));
$message->addParam(PMA_Util::backquote($_REQUEST['item_name']));
$sql_query = $drop_item . $item_query;
}
}
@ -108,7 +108,7 @@ function PMA_TRI_handleEditor()
. __('MySQL said: ') . PMA_DBI_getError(null);
} else {
$message = PMA_Message::success(__('Trigger %1$s has been created.'));
$message->addParam(PMA_CommonFunctions::getInstance()->backquote($_REQUEST['item_name']));
$message->addParam(PMA_Util::backquote($_REQUEST['item_name']));
$sql_query = $item_query;
}
}
@ -123,7 +123,7 @@ function PMA_TRI_handleEditor()
$message->addString('</ul>');
}
$output = PMA_CommonFunctions::getInstance()->getMessage($message, $sql_query);
$output = PMA_Util::getMessage($message, $sql_query);
if ($GLOBALS['is_ajax_request']) {
$response = PMA_Response::getInstance();
if ($message->isSuccess()) {
@ -196,8 +196,8 @@ function PMA_TRI_handleEditor()
$message = __('Error in processing request') . ' : ';
$message .= sprintf(
PMA_RTE_getWord('not_found'),
htmlspecialchars(PMA_CommonFunctions::getInstance()->backquote($_REQUEST['item_name'])),
htmlspecialchars(PMA_CommonFunctions::getInstance()->backquote($db))
htmlspecialchars(PMA_Util::backquote($_REQUEST['item_name'])),
htmlspecialchars(PMA_Util::backquote($db))
);
$message = PMA_message::error($message);
if ($GLOBALS['is_ajax_request']) {
@ -299,7 +299,7 @@ function PMA_TRI_getEditorForm($mode, $item)
. "type='hidden' value='{$item['item_original_name']}'/>\n";
}
$query = "SELECT `TABLE_NAME` FROM `INFORMATION_SCHEMA`.`TABLES` ";
$query .= "WHERE `TABLE_SCHEMA`='" . PMA_CommonFunctions::getInstance()->sqlAddSlashes($db) . "' ";
$query .= "WHERE `TABLE_SCHEMA`='" . PMA_Util::sqlAddSlashes($db) . "' ";
$query .= "AND `TABLE_TYPE`='BASE TABLE'";
$tables = PMA_DBI_fetch_result($query);

View File

@ -282,7 +282,7 @@ class Table_Stats
// displayfield
$this->displayfield = PMA_getDisplayField($db, $tableName);
// index
$result = PMA_DBI_query('SHOW INDEX FROM ' . PMA_CommonFunctions::getInstance()->backquote($tableName) . ';', null, PMA_DBI_QUERY_STORE);
$result = PMA_DBI_query('SHOW INDEX FROM ' . PMA_Util::backquote($tableName) . ';', null, PMA_DBI_QUERY_STORE);
if (PMA_DBI_num_rows($result) > 0) {
while ($row = PMA_DBI_fetch_assoc($result)) {
if ($row['Key_name'] == 'PRIMARY') {

View File

@ -50,7 +50,7 @@ $binary_logs = PMA_DRIZZLE
PMA_DBI_QUERY_STORE
);
PMA_CommonFunctions::getInstance()->checkParameters(
PMA_Util::checkParameters(
array('is_superuser', 'url_query'), false
);
?>

View File

@ -446,10 +446,10 @@ function PMA_getHtmlToDisplayPrivilegesTable($random_n, $db = '*',
// get columns
$res = PMA_DBI_try_query(
'SHOW COLUMNS FROM '
. PMA_CommonFunctions::getInstance()->backquote(
PMA_CommonFunctions::getInstance()->unescapeMysqlWildcards($db)
. PMA_Util::backquote(
PMA_Util::unescapeMysqlWildcards($db)
)
. '.' . PMA_CommonFunctions::getInstance()->backquote($table) . ';'
. '.' . PMA_Util::backquote($table) . ';'
);
$columns = array();
if ($res) {
@ -1193,7 +1193,7 @@ function PMA_getHtmlForDisplayLoginInformationFields($mode = 'new')
. htmlspecialchars(isset($GLOBALS['hostname']) ? $GLOBALS['hostname'] : '')
. '" title="' . __('Host')
. '" onchange="pred_hostname.value = \'userdefined\';" />' . "\n"
. PMA_CommonFunctions::getInstance()->showHint(
. PMA_Util::showHint(
__('When Host table is used, this field is ignored and values stored in Host table are used instead.')
)
. '</div>' . "\n";
@ -1289,8 +1289,8 @@ function PMA_getGrants($user, $host)
{
$grants = PMA_DBI_fetch_result(
"SHOW GRANTS FOR '"
. PMA_CommonFunctions::getInstance()->sqlAddSlashes($user) . "'@'"
. PMA_CommonFunctions::getInstance()->sqlAddSlashes($host) . "'"
. PMA_Util::sqlAddSlashes($user) . "'@'"
. PMA_Util::sqlAddSlashes($host) . "'"
);
$response = '';
foreach ($grants as $one_grant) {
@ -1706,7 +1706,7 @@ function PMA_getHtmlTableBodyForSpecificDbPrivs($found, $row, $odd_row,
if (! isset($current['Db']) || $current['Db'] == '*') {
$html_output .= __('global');
} elseif (
$current['Db'] == PMA_CommonFunctions::getInstance()->escapeMysqlWildcards(
$current['Db'] == PMA_Util::escapeMysqlWildcards(
$_REQUEST['checkprivs']
)
) {
@ -1839,7 +1839,7 @@ function PMA_getExtraDataForAjaxBehavior($password, $link_export, $sql_query,
if (strlen($sql_query)) {
$extra_data['sql_query']
= PMA_CommonFunctions::getInstance()->getMessage(null, $sql_query);
= PMA_Util::getMessage(null, $sql_query);
}
if (isset($_REQUEST['adduser_submit']) || isset($_REQUEST['change_copy'])) {
@ -1963,7 +1963,7 @@ function PMA_getChangeLoginInformationHtmlForm($username, $hostname)
. ' <legend>'
. __('Create a new user with the same privileges and ...')
. '</legend>' . "\n";
$html_output .= PMA_CommonFunctions::getInstance()->getRadioFields(
$html_output .= PMA_Util::getRadioFields(
'mode', $choices, '4', true
);
$html_output .= '</fieldset>' . "\n"
@ -1994,7 +1994,7 @@ function PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename)
. ' <a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?'
. $GLOBALS['url_query'] . '&amp;db=' . $url_dbname . '&amp;reload=1">'
. htmlspecialchars($dbname) . ': '
. PMA_CommonFunctions::getInstance()->getTitleForTarget(
. PMA_Util::getTitleForTarget(
$GLOBALS['cfg']['DefaultTabDatabase']
)
. "</a> ]\n";
@ -2005,7 +2005,7 @@ function PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename)
. '&amp;db=' . $url_dbname
. '&amp;table=' . htmlspecialchars(urlencode($tablename))
. '&amp;reload=1">' . htmlspecialchars($tablename) . ': '
. PMA_CommonFunctions::getInstance()->getTitleForTarget(
. PMA_Util::getTitleForTarget(
$GLOBALS['cfg']['DefaultTabTable']
)
. "</a> ]\n";
@ -2844,7 +2844,7 @@ function PMA_getAddUserHtmlFieldset($conditional_class)
. '<a href="server_privileges.php?' . $GLOBALS['url_query']
. '&amp;adduser=1" '
. 'class="' . $conditional_class . '">' . "\n"
. PMA_CommonFunctions::getInstance()->getIcon('b_usradd.png')
. PMA_Util::getIcon('b_usradd.png')
. ' ' . __('Add user') . '</a>' . "\n"
. '</fieldset>' . "\n";
}
@ -2865,7 +2865,7 @@ function PMA_getHtmlHeaderForDisplayUserProperties(
$dbname_is_wildcard, $url_dbname, $dbname, $username, $hostname, $tablename
) {
$html_output = '<h2>' . "\n"
. PMA_CommonFunctions::getInstance()->getIcon('b_usredit.png')
. PMA_Util::getIcon('b_usredit.png')
. __('Edit Privileges') . ': '
. __('User');
@ -2919,7 +2919,7 @@ function PMA_getHtmlForDisplayUserOverviewPage($link_edit, $pmaThemeImage,
$text_dir, $conditional_class, $link_export
) {
$html_output = '<h2>' . "\n"
. PMA_CommonFunctions::getInstance()->getIcon('b_usrlist.png')
. PMA_Util::getIcon('b_usrlist.png')
. __('Users overview') . "\n"
. '</h2>' . "\n";

View File

@ -426,8 +426,8 @@ function PMA_findDeleteRowsFromTargetTables(&$delete_array, $matching_table,
*/
function PMA_dataDiffInUncommonTables($source_tables_uncommon, $src_db, $src_link, $index, &$row_count)
{
$query = "SELECT COUNT(*) FROM " . PMA_CommonFunctions::getInstance()->backquote($src_db) . "."
. PMA_CommonFunctions::getInstance()->backquote($source_tables_uncommon[$index]);
$query = "SELECT COUNT(*) FROM " . PMA_Util::backquote($src_db) . "."
. PMA_Util::backquote($source_tables_uncommon[$index]);
$rows = PMA_DBI_fetch_result($query, null, null, $src_link);
$row_count[$index] = $rows[0];
}

View File

@ -288,7 +288,7 @@ function PMA_sqlQueryFormInsert(
.'multiple="multiple" ondblclick="insertValueQuery()">' . "\n";
foreach ($fields_list as $field) {
echo '<option value="'
.PMA_CommonFunctions::getInstance()->backquote(htmlspecialchars($field['Field'])) . '"';
.PMA_Util::backquote(htmlspecialchars($field['Field'])) . '"';
if (isset($field['Field'])
&& strlen($field['Field'])
&& isset($field['Comment'])
@ -411,7 +411,7 @@ function PMA_sqlQueryFormBookmark()
echo '</div>' . "\n";
echo '<div class="formelement">' . "\n";
echo __('Variable');
echo PMA_CommonFunctions::getInstance()->showDocu('faqbookmark');
echo PMA_Util::showDocu('faqbookmark');
echo '<input type="text" name="bookmark_variable" class="textfield"'
.' size="10" />' . "\n";
echo '</div>' . "\n";

View File

@ -125,7 +125,7 @@ function PMA_getTableDropQueryAndMessage($table_is_view, $current_table)
{
$drop_query = 'DROP '
. (($table_is_view || $current_table['ENGINE'] == null) ? 'VIEW' : 'TABLE')
. ' ' . PMA_CommonFunctions::getInstance()->backquote(
. ' ' . PMA_Util::backquote(
$current_table['TABLE_NAME']
);
$drop_message = sprintf(
@ -360,7 +360,7 @@ function PMA_getHtmlForTablePrintViewLink($url_query)
{
return '<p>'
. '<a href="db_printview.php?' . $url_query . '">'
. PMA_CommonFunctions::getInstance()->getIcon(
. PMA_Util::getIcon(
'b_print.png',
__('Print view'),
true
@ -377,7 +377,7 @@ function PMA_getHtmlForTablePrintViewLink($url_query)
function PMA_getHtmlForDataDictionaryLink($url_query)
{
return '<a href="db_datadict.php?' . $url_query . '">'
. PMA_CommonFunctions::getInstance()->getIcon(
. PMA_Util::getIcon(
'b_tblanalyse.png',
__('Data Dictionary'),
true
@ -775,7 +775,7 @@ function PMA_TableHeader($db_is_information_schema = false, $replication = false
.'</th>'
// larger values are more interesting so default sort order is DESC
.'<th>' . PMA_sortableTableHeader(__('Rows'), 'records', 'DESC')
. PMA_CommonFunctions::getInstance()->showHint(
. PMA_Util::showHint(
PMA_sanitize(
__('May be approximate. See [doc@faq3_11]FAQ 3.11[/doc]')
)
@ -907,7 +907,7 @@ function PMA_sortableTableHeader($title, $sort, $initial_sort_order = 'ASC')
// We set the position back to 0 every time they sort.
$url .= "&amp;pos=0&amp;sort=$sort&amp;sort_order=$future_sort_order";
return PMA_CommonFunctions::getInstance()->linkOrButton(
return PMA_Util::linkOrButton(
$url, $title . $order_img, $order_link_params
);
}
@ -1606,7 +1606,7 @@ function PMA_getHtmlForAddColumn($columns_list)
*/
function PMA_getHtmlForDisplayIndexes()
{
$html_output = PMA_CommonFunctions::getInstance()->getDivForSliderEffect(
$html_output = PMA_Util::getDivForSliderEffect(
'indexes', __('Indexes')
);
$html_output .= PMA_Index::getView($GLOBALS['table'], $GLOBALS['db']);

View File

@ -15,7 +15,7 @@ if (! defined('PHPMYADMIN')) {
require_once './libraries/bookmark.lib.php';
// Check parameters
PMA_CommonFunctions::getInstance()->checkParameters(array('db', 'table'));
PMA_Util::checkParameters(array('db', 'table'));
$db_is_information_schema = PMA_is_system_schema($db);

View File

@ -13,7 +13,7 @@ if (! defined('PHPMYADMIN')) {
}
// Check parameters
PMA_CommonFunctions::getInstance()->checkParameters(array('db', 'table'));
PMA_Util::checkParameters(array('db', 'table'));
/**
* Defining global variables, in case this script is included by a function.

View File

@ -84,7 +84,7 @@ $content_cells = array();
$header_cells[] = __('Name');
$header_cells[] = __('Type')
. PMA_CommonFunctions::getInstance()->showMySQLDocu('SQL-Syntax', 'data-types');
. PMA_Util::showMySQLDocu('SQL-Syntax', 'data-types');
$header_cells[] = __('Length/Values')
. PMA_Util::showHint(__('If column type is "enum" or "set", please enter the values using this format: \'a\',\'b\',\'c\'...<br />If you ever need to put a backslash ("\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'));
$header_cells[] = __('Default') . PMA_Util::showHint(__('For default values, please enter just a single value, without backslash escaping or quotes, using this format: a'));

View File

@ -23,7 +23,7 @@ $tabs_icons = array(
'Import' => 'b_import.png',
'Export' => 'b_export.png');
echo '<ul id="topmenu2">';
echo PMA_CommonFunctions::getInstance()->getHtmlTab(
echo PMA_Util::getHtmlTab(
array(
'link' => 'prefs_manage.php',
'text' => __('Manage your settings')
@ -37,7 +37,7 @@ foreach (array_keys($forms) as $formset) {
'text' => PMA_lang('Form_' . $formset),
'icon' => $tabs_icons[$formset],
'active' => ($script_name == 'prefs_forms.php' && $formset == $form_param));
echo PMA_CommonFunctions::getInstance()->getHtmlTab($tab, array('form' => $formset)) . "\n";
echo PMA_Util::getHtmlTab($tab, array('form' => $formset)) . "\n";
}
echo '</ul><div class="clearfloat"></div>';

View File

@ -568,7 +568,7 @@ function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = nu
echo '</a>' . "\n";
}
if (null !== $mysql_help_page) {
echo PMA_CommonFunctions::getInstance()->showMySQLDocu('', $mysql_help_page);
echo PMA_Util::showMySQLDocu('', $mysql_help_page);
}
echo '</li>';
}

View File

@ -305,7 +305,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
onmouseout="this.className = old_class;"
onmousedown="Click_field('<?php
echo $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]."','".urlencode($tab_column[$t_n]["COLUMN_NAME"][$j])."',";
if (!PMA_CommonFunctions::getInstance()->isForeignKeySupported($GLOBALS['PMD']['TABLE_TYPE'][$i])) {
if (!PMA_Util::isForeignKeySupported($GLOBALS['PMD']['TABLE_TYPE'][$i])) {
echo (isset($tables_pk_or_unique_keys[$t_n . "." . $tab_column[$t_n]["COLUMN_NAME"][$j]]) ? 1 : 0);
} else {
// if foreign keys are supported, it's not necessary that the

View File

@ -240,7 +240,7 @@ PMA_printJsValue("PMA_messages['strSavedOn']", __('Saved on: @DATE@'));
<h2><?php echo __('Import') ?></h2>
<form class="group-cnt prefs-form" name="prefs_import" action="prefs_manage.php" method="post" enctype="multipart/form-data">
<?php
echo PMA_CommonFunctions::getInstance()->generateHiddenMaxFileSize($max_upload_size) . "\n";
echo PMA_Util::generateHiddenMaxFileSize($max_upload_size) . "\n";
echo PMA_generate_common_hidden_inputs() . "\n";
?>
<input type="hidden" name="json" value="" />
@ -284,7 +284,7 @@ PMA_printJsValue("PMA_messages['strSavedOn']", __('Saved on: @DATE@'));
<div class="group-cnt">
<?php
echo sprintf(__('You can set more settings by modifying config.inc.php, eg. by using %sSetup script%s.'), '<a href="setup/index.php">', '</a>');
echo PMA_CommonFunctions::getInstance()->showDocu('setup_script');
echo PMA_Util::showDocu('setup_script');
?>
</div>
</div>

View File

@ -20,7 +20,7 @@ require 'libraries/server_common.inc.php';
* Displays the sub-page heading
*/
echo '<h2>' . "\n"
. ' ' . PMA_CommonFunctions::getInstance()->getImage('s_asci.png')
. ' ' . PMA_Util::getImage('s_asci.png')
. '' . __('Character Sets and Collations') . "\n"
. '</h2>' . "\n";

View File

@ -29,7 +29,7 @@ require 'libraries/server_common.inc.php';
* Displays the sub-page heading
*/
echo '<h2>' . "\n"
. PMA_CommonFunctions::getInstance()->getImage('b_engine.png')
. PMA_Util::getImage('b_engine.png')
. "\n" . __('Plugins') . "\n"
. '</h2>' . "\n";
@ -86,7 +86,7 @@ pma_theme_image = '<?php echo $GLOBALS['pmaThemeImage']; ?>';
<caption class="tblHeaders">
<a class="top" href="#serverinfo"><?php
echo __('Begin');
echo PMA_CommonFunctions::getInstance()->getImage('s_asc.png');
echo PMA_Util::getImage('s_asc.png');
?></a>
<?php echo htmlspecialchars($plugin_type); ?>
</caption>

View File

@ -1317,7 +1317,7 @@ if (! isset($_REQUEST['submit_connect'])
/**
* Displays the sub-page heading
*/
echo '<h2>' . PMA_CommonFunctions::getInstance()->getImage('s_sync.png') . __('Synchronize') .'</h2>';
echo '<h2>' . PMA_Util::getImage('s_sync.png') . __('Synchronize') .'</h2>';
echo '<div id="serverstatus">
<form name="connection_form" id="connection_form" method="post" action="server_synchronize.php"
@ -1355,7 +1355,7 @@ if (! isset($_REQUEST['submit_connect'])
$database_header = __('Target database');
}
$database_header .= PMA_CommonFunctions::getInstance()->showHint(
$database_header .= PMA_Util::showHint(
PMA_sanitize(
sprintf(
'%sAllowArbitraryServer%s',

View File

@ -177,7 +177,7 @@ if (isset($_REQUEST['do_save_data'])) {
$fields = array();
foreach ($key_fields as $each_field) {
if (isset($_REQUEST['field_name'][$each_field]) && strlen($_REQUEST['field_name'][$each_field])) {
$fields[] = PMA_CommonFunctions::getInstance()->backquote($_REQUEST['field_name'][$each_field]);
$fields[] = PMA_Util::backquote($_REQUEST['field_name'][$each_field]);
}
} // end for
$key_query = ', ADD KEY (' . implode(', ', $fields) . ') ';

View File

@ -79,7 +79,7 @@ if (! empty($sql_query)) {
// Just crop LIMIT clause
$sql_query = $analyzed_sql[0]['section_before_limit'] . $analyzed_sql[0]['section_after_limit'];
}
echo PMA_CommonFunctions::getInstance()->getMessage(PMA_Message::success());
echo PMA_Util::getMessage(PMA_Message::success());
}
$export_type = 'table';

View File

@ -206,7 +206,7 @@ if ($GLOBALS['is_ajax_request'] != true) {
<label for="input_index_name">
<?php echo __('Index name:'); ?>
<?php
echo PMA_CommonFunctions::getInstance()->showHint(
echo PMA_Util::showHint(
PMA_Message::notice(
__(
'("PRIMARY" <b>must</b> be the name of'

View File

@ -102,7 +102,7 @@ foreach ($the_tables as $key => $table) {
$show_create_table = PMA_DBI_fetch_value(
'SHOW CREATE TABLE ' . PMA_Util::backquote($db) . '.'
. PMA_CommonFunctions::getInstance()->backquote($table),
. PMA_Util::backquote($table),
0, 1
);
$analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));

View File

@ -492,7 +492,7 @@ if (count($columns) > 0) {
<select name="destination_foreign[<?php echo $myfield_md5; ?>]" class="referenced_column_dropdown">
<?php
if (isset($existrel_foreign[$myfield])) {
// need to PMA_CommonFunctions::getInstance()->backquote to support a dot character inside
// need to PMA_Util::backquote to support a dot character inside
// an element
$foreign_field = PMA_Util::backquote($existrel_foreign[$myfield]['foreign_db']) . '.'
. PMA_Util::backquote($existrel_foreign[$myfield]['foreign_table']) . '.'

View File

@ -149,7 +149,7 @@ if (isset($zoom_submit)
$tmpRow[] = $val;
}
//Get unique conditon on each row (will be needed for row update)
$uniqueCondition = PMA_CommonFunctions::getInstance()->getUniqueCondition(
$uniqueCondition = PMA_Util::getUniqueCondition(
$result, count($table_search->getColumnNames()), $fields_meta, $tmpRow,
true
);

View File

@ -44,7 +44,7 @@ class PMA_getBrowseUploadFileBlock_test extends PHPUnit_Framework_TestCase
function testBrowseUploadFile($size, $unit, $res)
{
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getBrowseUploadFileBlock($size),
PMA_Util::getBrowseUploadFileBlock($size),
'<label for="input_import_file">' . __("Browse your computer:") . '</label>'
. '<div id="upload_form_status" style="display: none;"></div>'
. '<div id="upload_form_status_info" style="display: none;"></div>'

View File

@ -40,12 +40,12 @@ class PMA_cache_test extends PHPUnit_Framework_TestCase
public function testCacheExists()
{
$GLOBALS['server'] = 'server';
PMA_CommonFunctions::getInstance()->cacheSet('test_data', 5, true);
PMA_CommonFunctions::getInstance()->cacheSet('test_data_2', 5, true);
PMA_Util::cacheSet('test_data', 5, true);
PMA_Util::cacheSet('test_data_2', 5, true);
$this->assertTrue(PMA_CommonFunctions::getInstance()->cacheExists('test_data', true));
$this->assertTrue(PMA_CommonFunctions::getInstance()->cacheExists('test_data_2', 'server'));
$this->assertFalse(PMA_CommonFunctions::getInstance()->cacheExists('fake_data_2', true));
$this->assertTrue(PMA_Util::cacheExists('test_data', true));
$this->assertTrue(PMA_Util::cacheExists('test_data_2', 'server'));
$this->assertFalse(PMA_Util::cacheExists('fake_data_2', true));
}
/**
@ -54,12 +54,12 @@ class PMA_cache_test extends PHPUnit_Framework_TestCase
public function testCacheGet()
{
$GLOBALS['server'] = 'server';
PMA_CommonFunctions::getInstance()->cacheSet('test_data', 5, true);
PMA_CommonFunctions::getInstance()->cacheSet('test_data_2', 5, true);
PMA_Util::cacheSet('test_data', 5, true);
PMA_Util::cacheSet('test_data_2', 5, true);
$this->assertNotNull(PMA_CommonFunctions::getInstance()->cacheGet('test_data', true));
$this->assertNotNull(PMA_CommonFunctions::getInstance()->cacheGet('test_data_2', 'server'));
$this->assertNull(PMA_CommonFunctions::getInstance()->cacheGet('fake_data_2', true));
$this->assertNotNull(PMA_Util::cacheGet('test_data', true));
$this->assertNotNull(PMA_Util::cacheGet('test_data_2', 'server'));
$this->assertNull(PMA_Util::cacheGet('fake_data_2', true));
}
/**
@ -68,11 +68,11 @@ class PMA_cache_test extends PHPUnit_Framework_TestCase
public function testCacheSetGet()
{
$GLOBALS['server'] = 'server';
PMA_CommonFunctions::getInstance()->cacheSet('test_data', 25, true);
PMA_Util::cacheSet('test_data', 25, true);
PMA_CommonFunctions::getInstance()->cacheSet('test_data', 5, true);
PMA_Util::cacheSet('test_data', 5, true);
$this->assertEquals(5, $_SESSION['cache']['server_server']['test_data']);
PMA_CommonFunctions::getInstance()->cacheSet('test_data_3', 3, true);
PMA_Util::cacheSet('test_data_3', 3, true);
$this->assertEquals(3, $_SESSION['cache']['server_server']['test_data_3']);
}
@ -82,12 +82,12 @@ class PMA_cache_test extends PHPUnit_Framework_TestCase
public function testCacheUnSet()
{
$GLOBALS['server'] = 'server';
PMA_CommonFunctions::getInstance()->cacheSet('test_data', 25, true);
PMA_CommonFunctions::getInstance()->cacheSet('test_data_2', 25, true);
PMA_Util::cacheSet('test_data', 25, true);
PMA_Util::cacheSet('test_data_2', 25, true);
PMA_CommonFunctions::getInstance()->cacheUnset('test_data', true);
PMA_Util::cacheUnset('test_data', true);
$this->assertArrayNotHasKey('test_data', $_SESSION['cache']['server_server']);
PMA_CommonFunctions::getInstance()->cacheUnset('test_data_2', true);
PMA_Util::cacheUnset('test_data_2', true);
$this->assertArrayNotHasKey('test_data_2', $_SESSION['cache']['server_server']);
}
@ -97,10 +97,10 @@ class PMA_cache_test extends PHPUnit_Framework_TestCase
public function testClearUserCache()
{
$GLOBALS['server'] = 'server';
PMA_CommonFunctions::getInstance()->cacheSet('is_superuser', 'yes', true);
PMA_Util::cacheSet('is_superuser', 'yes', true);
$this->assertEquals('yes', $_SESSION['cache']['server_server']['is_superuser']);
PMA_CommonFunctions::getInstance()->clearUserCache();
PMA_Util::clearUserCache();
$this->assertArrayNotHasKey('is_superuser', $_SESSION['cache']['server_server']);
}
}

View File

@ -35,7 +35,7 @@ class PMA_checkParameters_test extends PHPUnit_Framework_TestCase
$this->expectOutputRegex("/Missing parameter: field/");
PMA_CommonFunctions::getInstance()->checkParameters(
PMA_Util::checkParameters(
array('db', 'table', 'field')
);
}
@ -50,7 +50,7 @@ class PMA_checkParameters_test extends PHPUnit_Framework_TestCase
$GLOBALS['sql_query'] = "SELECT * FROM tblTable;";
$this->expectOutputString("");
PMA_CommonFunctions::getInstance()->checkParameters(
PMA_Util::checkParameters(
array('db', 'table', 'field', 'sql_query')
);
}

View File

@ -32,7 +32,7 @@ class PMA_ContainsNonPrintableAsciiTest extends PHPUnit_Framework_TestCase
function testContainsNonPrintableAscii($str, $res)
{
$this->assertEquals(
$res, PMA_CommonFunctions::getInstance()->containsNonPrintableAscii($str)
$res, PMA_Util::containsNonPrintableAscii($str)
);
}

View File

@ -30,7 +30,7 @@ class PMA_ConvertBitDefaultValueTest extends PHPUnit_Framework_TestCase
function testConvert_bit_default_value_test($bit, $val)
{
$this->assertEquals(
$val, PMA_CommonFunctions::getInstance()->convertBitDefaultValue($bit)
$val, PMA_Util::convertBitDefaultValue($bit)
);
}

View File

@ -37,7 +37,7 @@ class PMA_EscapeMySqlWildcardsTest extends PHPUnit_Framework_TestCase
public function testEscape($a, $b)
{
$this->assertEquals(
$a, PMA_CommonFunctions::getInstance()->escapeMysqlWildcards($b)
$a, PMA_Util::escapeMysqlWildcards($b)
);
}
@ -49,7 +49,7 @@ class PMA_EscapeMySqlWildcardsTest extends PHPUnit_Framework_TestCase
public function testUnEscape($a, $b)
{
$this->assertEquals(
$b, PMA_CommonFunctions::getInstance()->unescapeMysqlWildcards($a)
$b, PMA_Util::unescapeMysqlWildcards($a)
);
}
}

View File

@ -54,7 +54,7 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
{
$out = str_replace('PMA_VERSION', PMA_VERSION, $out);
$this->assertEquals(
$out, PMA_CommonFunctions::getInstance()->expandUserString($in)
$out, PMA_Util::expandUserString($in)
);
}
@ -73,7 +73,7 @@ class PMA_expandUserString_test extends PHPUnit_Framework_TestCase
$out = str_replace('PMA_VERSION', PMA_VERSION, $out);
$this->assertEquals(
htmlspecialchars($out),
PMA_CommonFunctions::getInstance()->expandUserString(
PMA_Util::expandUserString(
$in, 'htmlspecialchars'
)
);

View File

@ -33,7 +33,7 @@ class PMA_extractColumnSpec_test extends PHPUnit_Framework_TestCase
public function testParsing($in, $out)
{
$this->assertEquals(
$out, PMA_CommonFunctions::getInstance()->extractColumnSpec($in)
$out, PMA_Util::extractColumnSpec($in)
);
}

View File

@ -19,7 +19,7 @@ class PMA_extractValueFromFormattedSize_test extends PHPUnit_Framework_TestCase
{
$this->assertEquals(
-1,
PMA_CommonFunctions::getInstance()->extractValueFromFormattedSize(100)
PMA_Util::extractValueFromFormattedSize(100)
);
}
@ -27,7 +27,7 @@ class PMA_extractValueFromFormattedSize_test extends PHPUnit_Framework_TestCase
{
$this->assertEquals(
10737418240,
PMA_CommonFunctions::getInstance()->extractValueFromFormattedSize("10GB")
PMA_Util::extractValueFromFormattedSize("10GB")
);
}
@ -35,7 +35,7 @@ class PMA_extractValueFromFormattedSize_test extends PHPUnit_Framework_TestCase
{
$this->assertEquals(
15728640,
PMA_CommonFunctions::getInstance()->extractValueFromFormattedSize("15MB")
PMA_Util::extractValueFromFormattedSize("15MB")
);
}
@ -43,7 +43,7 @@ class PMA_extractValueFromFormattedSize_test extends PHPUnit_Framework_TestCase
{
$this->assertEquals(
262144,
PMA_CommonFunctions::getInstance()->extractValueFromFormattedSize("256K")
PMA_Util::extractValueFromFormattedSize("256K")
);
}
}

View File

@ -35,7 +35,7 @@ class PMA_IsForeignKeySupportedTest extends PHPUnit_Framework_TestCase
public function testForeignkeySupported($a, $e)
{
$this->assertEquals(
$e, PMA_CommonFunctions::getInstance()->isForeignKeySupported($a)
$e, PMA_Util::isForeignKeySupported($a)
);
}
}

View File

@ -72,7 +72,7 @@ class PMA_formatNumberByteDown_test extends PHPUnit_Framework_TestCase
{
$this->assertEquals(
$d,
(string) PMA_CommonFunctions::getInstance()->formatNumber(
(string) PMA_Util::formatNumber(
$a, $b, $c, false
)
);
@ -102,7 +102,7 @@ class PMA_formatNumberByteDown_test extends PHPUnit_Framework_TestCase
*/
public function testFormatByteDown($a, $b, $c, $e)
{
$result = PMA_CommonFunctions::getInstance()->formatByteDown($a, $b, $c);
$result = PMA_Util::formatByteDown($a, $b, $c);
$result[0] = trim($result[0]);
$this->assertEquals($e, $result);
}

View File

@ -51,7 +51,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$sql = "SELECT * FROM tTable;";
$this->assertEquals(
"<pre>\n$sql\n</pre>",
PMA_CommonFunctions::getInstance()->formatSql($sql)
PMA_Util::formatSql($sql)
);
}
@ -89,7 +89,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$this->assertEquals(
$expected,
PMA_CommonFunctions::getInstance()->formatSql($sql, $unparsed)
PMA_Util::formatSql($sql, $unparsed)
);
}
@ -139,7 +139,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$expected = '<span class="syntax"><span class="inner_sql"><span class="syntax_alpha syntax_alpha_reservedWord">SELECT</span></a> <span class="syntax_punct">*</span> <br /><span class="syntax_alpha syntax_alpha_reservedWord">FROM</span> <span class="syntax_quote syntax_quote_backtick">`tTable`</span> <span class="syntax_punct syntax_punct_queryend">;</span><br /><br /></span></span>';
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql, $unparsed)
$expected, PMA_Util::formatSql($sql, $unparsed)
);
}
@ -277,7 +277,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$expected = '<span class="syntax"><span class="inner_sql"><span class="syntax_alpha syntax_alpha_reservedWord">SELECT</span></a> <span class="syntax_punct">*</span> <br /><span class="syntax_alpha syntax_alpha_reservedWord">FROM</span> <span class="syntax_quote syntax_quote_backtick">`tTable_A`</span> <span class="syntax_alpha syntax_alpha_identifier">A</span><br /><span class="syntax_alpha syntax_alpha_reservedWord">INNER</span> <span class="syntax_alpha syntax_alpha_reservedWord">JOIN</span> <span class="syntax_quote syntax_quote_backtick">`tTable_B`</span> <span class="syntax_alpha syntax_alpha_identifier">B</span> <span class="syntax_alpha syntax_alpha_reservedWord">ON</span> <span class="syntax_alpha syntax_alpha_identifier">B</span><span class="syntax_punct syntax_punct_qualifier">.</span><span class="syntax_alpha syntax_alpha_identifier">ID</span> <span class="syntax_punct">=</span></a> <span class="syntax_alpha syntax_alpha_identifier">A</span><span class="syntax_punct syntax_punct_qualifier">.</span><span class="syntax_alpha syntax_alpha_identifier">ID</span><span class="syntax_punct syntax_punct_queryend">;</span><br /><br /></span></span>';
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql, $unparsed)
$expected, PMA_Util::formatSql($sql, $unparsed)
);
}
@ -314,7 +314,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$expected = '<span class="inner_sql">SELECT</a> 1 ;<br /><br /></span>';
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql, $unparsed)
$expected, PMA_Util::formatSql($sql, $unparsed)
);
}
@ -364,7 +364,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$expected = '<span class="inner_sql">SELECT</a> * <br />FROM `tTable` ;<br /><br /></span>';
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql, $unparsed)
$expected, PMA_Util::formatSql($sql, $unparsed)
);
}
@ -501,7 +501,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$expected = '<span class="inner_sql">SELECT</a> * <br />FROM `tTable_A` A<br />INNER JOIN `tTable_B` B ON B.ID =</a> A.ID;<br /><br /></span>';
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql, $unparsed)
$expected, PMA_Util::formatSql($sql, $unparsed)
);
}
@ -538,12 +538,12 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$expected = "<span class=\"inner_sql\"><pre>\nSELECT 1;\n</pre></span>";
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql, $unparsed)
$expected, PMA_Util::formatSql($sql, $unparsed)
);
$expected = "SELECT 1;";
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql)
$expected, PMA_Util::formatSql($sql)
);
}
@ -593,12 +593,12 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$expected = "<span class=\"inner_sql\"><pre>\nSELECT * from `tTable`;\n</pre></span>";
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql, $unparsed)
$expected, PMA_Util::formatSql($sql, $unparsed)
);
$expected = "SELECT * from `tTable`;";
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql)
$expected, PMA_Util::formatSql($sql)
);
}
@ -735,12 +735,12 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$expected = "<span class=\"inner_sql\"><pre>\nSELECT * FROM `tTable_A` A INNER JOIN `tTable_B` B ON B.ID = A.ID;\n</pre></span>";
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql, $unparsed)
$expected, PMA_Util::formatSql($sql, $unparsed)
);
$expected = 'SELECT * FROM `tTable_A` A INNER JOIN `tTable_B` B ON B.ID = A.ID;';
$this->assertEquals(
$expected, PMA_CommonFunctions::getInstance()->formatSql($sql)
$expected, PMA_Util::formatSql($sql)
);
}
@ -772,7 +772,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
),
'len' => 3,
);
$this->assertEmpty(PMA_CommonFunctions::getInstance()->formatSql($sql));
$this->assertEmpty(PMA_Util::formatSql($sql));
}
function testFormatSQLError()
@ -782,7 +782,7 @@ class PMA_formatSql_test extends PHPUnit_Framework_TestCase
$sql = array("raw" => "& \" < >");
$this->assertEquals(
"&amp; &quot; &lt; &gt;",
PMA_CommonFunctions::getInstance()->formatSql($sql)
PMA_Util::formatSql($sql)
);
$SQP_errorString = false;
}

View File

@ -37,7 +37,7 @@ class PMA_generateHiddenMaxFileSize_test extends PHPUnit_Framework_TestCase
function test_generateHiddenMaxFileSize($size)
{
$this->assertEquals(
PMA_CommonFunctions::getInstance()->generateHiddenMaxFileSize($size),
PMA_Util::generateHiddenMaxFileSize($size),
'<input type="hidden" name="MAX_FILE_SIZE" value="' . $size . '" />'
);
}

View File

@ -20,7 +20,7 @@ class PMA_GetCheckboxTest extends PHPUnit_Framework_TestCase
$label = "text_label_for_checkbox";
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getCheckbox($name, $label, false, false),
PMA_Util::getCheckbox($name, $label, false, false),
'<input type="checkbox" name="' . $name . '" id="' . $name . '" /><label for="' . $name . '">' . $label . '</label>'
);
}
@ -31,7 +31,7 @@ class PMA_GetCheckboxTest extends PHPUnit_Framework_TestCase
$label = "text_label_for_checkbox";
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getCheckbox($name, $label, true, false),
PMA_Util::getCheckbox($name, $label, true, false),
'<input type="checkbox" name="' . $name . '" id="' . $name . '" checked="checked" /><label for="' . $name . '">' . $label . '</label>'
);
}
@ -42,7 +42,7 @@ class PMA_GetCheckboxTest extends PHPUnit_Framework_TestCase
$label = "text_label_for_checkbox";
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getCheckbox($name, $label, false, true),
PMA_Util::getCheckbox($name, $label, false, true),
'<input type="checkbox" name="' . $name . '" id="' . $name . '" class="autosubmit" /><label for="' . $name . '">' . $label . '</label>'
);
}
@ -53,7 +53,7 @@ class PMA_GetCheckboxTest extends PHPUnit_Framework_TestCase
$label = "text_label_for_checkbox";
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getCheckbox($name, $label, true, true),
PMA_Util::getCheckbox($name, $label, true, true),
'<input type="checkbox" name="' . $name . '" id="' . $name . '" checked="checked" class="autosubmit" /><label for="' . $name . '">' . $label . '</label>'
);
}

View File

@ -30,7 +30,7 @@ class PMA_getDbLink_test extends PHPUnit_Framework_TestCase
function testGetDbLinkEmpty()
{
$GLOBALS['db'] = null;
$this->assertEmpty(PMA_CommonFunctions::getInstance()->getDbLink());
$this->assertEmpty(PMA_Util::getDbLink());
}
function testGetDbLinkNull()
@ -43,7 +43,7 @@ class PMA_getDbLink_test extends PHPUnit_Framework_TestCase
. '&amp;server=99&amp;lang=en&amp;token=token" title="Jump to database &quot;'
. htmlspecialchars($database) . '&quot;.">'
. htmlspecialchars($database) . '</a>',
PMA_CommonFunctions::getInstance()->getDbLink()
PMA_Util::getDbLink()
);
}
@ -56,7 +56,7 @@ class PMA_getDbLink_test extends PHPUnit_Framework_TestCase
. '&amp;server=99&amp;lang=en&amp;token=token" title="Jump to database &quot;'
. htmlspecialchars($database) . '&quot;.">'
. htmlspecialchars($database) . '</a>',
PMA_CommonFunctions::getInstance()->getDbLink($database)
PMA_Util::getDbLink($database)
);
}
@ -70,7 +70,7 @@ class PMA_getDbLink_test extends PHPUnit_Framework_TestCase
. '&amp;server=99&amp;lang=en&amp;token=token" title="Jump to database &quot;'
. htmlspecialchars($database) . '&quot;.">'
. htmlspecialchars($database) . '</a>',
PMA_CommonFunctions::getInstance()->getDbLink($database)
PMA_Util::getDbLink($database)
);
}
}

View File

@ -23,7 +23,7 @@ class PMA_GetDivForSliderEffectTest extends PHPUnit_Framework_TestCase
$message = "test_message";
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getDivForSliderEffect($id, $message),
PMA_Util::getDivForSliderEffect($id, $message),
'<div id="' . $id . '" class="pma_auto_slider" title="' . htmlspecialchars($message) . '">'
);
}
@ -37,7 +37,7 @@ class PMA_GetDivForSliderEffectTest extends PHPUnit_Framework_TestCase
$message = "test_message";
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getDivForSliderEffect($id, $message),
PMA_Util::getDivForSliderEffect($id, $message),
'<div id="' . $id . '" style="display: none; overflow:auto;" class="pma_auto_slider" title="' . htmlspecialchars($message) . '">'
);
@ -52,7 +52,7 @@ class PMA_GetDivForSliderEffectTest extends PHPUnit_Framework_TestCase
$message = "test_message";
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getDivForSliderEffect($id, $message),
PMA_Util::getDivForSliderEffect($id, $message),
'<div id="' . $id . '">'
);
}

View File

@ -25,7 +25,7 @@ class PMA_GetDropdownTest extends PHPUnit_Framework_TestCase
$this->assertEquals(
$result,
PMA_CommonFunctions::getInstance()->getDropdown(
PMA_Util::getDropdown(
$name, $choices, $active_choice, $id
)
);
@ -50,7 +50,7 @@ class PMA_GetDropdownTest extends PHPUnit_Framework_TestCase
$this->assertEquals(
$result,
PMA_CommonFunctions::getInstance()->getDropdown(
PMA_Util::getDropdown(
$name, $choices, $active_choice, $id
)
);
@ -75,7 +75,7 @@ class PMA_GetDropdownTest extends PHPUnit_Framework_TestCase
$this->assertEquals(
$result,
PMA_CommonFunctions::getInstance()->getDropdown(
PMA_Util::getDropdown(
$name, $choices, $active_choice, $id
)
);

View File

@ -40,7 +40,7 @@ class PMA_getFormattedMaximumUploadSize_test extends PHPUnit_Framework_TestCase
{
$this->assertEquals(
"(" . __('Max: '). $res . $unit .")",
PMA_CommonFunctions::getInstance()->getFormattedMaximumUploadSize($size)
PMA_Util::getFormattedMaximumUploadSize($size)
);
}

View File

@ -26,7 +26,7 @@ class PMA_getIcon_test extends PHPUnit_Framework_TestCase
$this->assertEquals(
'<span class="nowrap"></span>',
PMA_CommonFunctions::getInstance()->getIcon('b_comment.png')
PMA_Util::getIcon('b_comment.png')
);
}
@ -36,7 +36,7 @@ class PMA_getIcon_test extends PHPUnit_Framework_TestCase
$this->assertEquals(
'<span class="nowrap"><img src="themes/dot.gif" title="" alt="" class="icon ic_b_comment" /></span>',
PMA_CommonFunctions::getInstance()->getIcon('b_comment.png')
PMA_Util::getIcon('b_comment.png')
);
}
@ -48,7 +48,7 @@ class PMA_getIcon_test extends PHPUnit_Framework_TestCase
$this->assertEquals(
'<span class="nowrap"><img src="themes/dot.gif" title="' . $alternate_text . '" alt="' . $alternate_text
. '" class="icon ic_b_comment" /></span>',
PMA_CommonFunctions::getInstance()->getIcon('b_comment.png', $alternate_text)
PMA_Util::getIcon('b_comment.png', $alternate_text)
);
}
@ -60,7 +60,7 @@ class PMA_getIcon_test extends PHPUnit_Framework_TestCase
$this->assertEquals(
'<span class="nowrap"><img src="themes/dot.gif" title="' . $alternate_text . '" alt="' . $alternate_text
. '" class="icon ic_b_comment" /> ' . $alternate_text . '</span>',
PMA_CommonFunctions::getInstance()->getIcon('b_comment.png', $alternate_text, true)
PMA_Util::getIcon('b_comment.png', $alternate_text, true)
);
}

View File

@ -20,7 +20,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
$choices = array();
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getRadioFields($name, $choices),
PMA_Util::getRadioFields($name, $choices),
""
);
}
@ -41,7 +41,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
}
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getRadioFields($name, $choices),
PMA_Util::getRadioFields($name, $choices),
$out
);
}
@ -66,7 +66,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
}
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getRadioFields(
PMA_Util::getRadioFields(
$name, $choices, $checked_choice
),
$out
@ -96,7 +96,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
}
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getRadioFields(
PMA_Util::getRadioFields(
$name, $choices, $checked_choice, true, false, $class
),
$out
@ -122,7 +122,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
}
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getRadioFields(
PMA_Util::getRadioFields(
$name, $choices, $checked_choice, false
),
$out
@ -149,7 +149,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
}
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getRadioFields(
PMA_Util::getRadioFields(
$name, $choices, $checked_choice, true, true
),
$out
@ -176,7 +176,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
}
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getRadioFields(
PMA_Util::getRadioFields(
$name, $choices, $checked_choice, true, false
),
$out
@ -206,7 +206,7 @@ class PMA_GetRadioFieldsTest extends PHPUnit_Framework_TestCase
}
$this->assertEquals(
PMA_CommonFunctions::getInstance()->getRadioFields(
PMA_Util::getRadioFields(
$name, $choices, $checked_choice, true, true, $class
),
$out

View File

@ -38,7 +38,7 @@ class PMA_getTitleForTarget_test extends PHPUnit_Framework_TestCase
function testGetTitleForTarget($target, $result)
{
$this->assertEquals(
$result, PMA_CommonFunctions::getInstance()->getTitleForTarget($target)
$result, PMA_Util::getTitleForTarget($target)
);
}

View File

@ -72,7 +72,7 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase
public function testLocalisedDate($a, $b, $e)
{
$this->assertEquals(
$e, PMA_CommonFunctions::getInstance()->localisedDate($a, $b)
$e, PMA_Util::localisedDate($a, $b)
);
}
@ -98,7 +98,7 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase
$GLOBALS['timespanfmt'] = '%s days, %s hours, %s minutes and %s seconds';
$this->assertEquals(
$e, PMA_CommonFunctions::getInstance()->timespanFormat($a)
$e, PMA_Util::timespanFormat($a)
);
}
}

View File

@ -18,7 +18,7 @@ class PMA_pow_test extends PHPUnit_Framework_TestCase
{
$this->assertEquals(
'1267650600228229401496703205376',
PMA_CommonFunctions::getInstance()->pow(2, 100)
PMA_Util::pow(2, 100)
);
}
@ -27,7 +27,7 @@ class PMA_pow_test extends PHPUnit_Framework_TestCase
if (function_exists('bcpow')) {
$this->assertEquals(
'1267650600228229401496703205376',
PMA_CommonFunctions::getInstance()->pow(2, 100, 'bcpow')
PMA_Util::pow(2, 100, 'bcpow')
);
} else {
$this->markTestSkipped('function bcpow() does not exist');
@ -39,7 +39,7 @@ class PMA_pow_test extends PHPUnit_Framework_TestCase
if (function_exists('gmp_pow')) {
$this->assertEquals(
'1267650600228229401496703205376',
PMA_CommonFunctions::getInstance()->pow(2, 100, 'gmp_pow')
PMA_Util::pow(2, 100, 'gmp_pow')
);
} else {
$this->markTestSkipped('function gmp_pow() does not exist');
@ -50,7 +50,7 @@ class PMA_pow_test extends PHPUnit_Framework_TestCase
{
$this->assertEquals(
0.25,
PMA_CommonFunctions::getInstance()->pow(2, -2)
PMA_Util::pow(2, -2)
);
}
@ -59,7 +59,7 @@ class PMA_pow_test extends PHPUnit_Framework_TestCase
if (function_exists('pow')) {
$this->assertEquals(
0.25,
PMA_CommonFunctions::getInstance()->pow(2, -2, 'pow')
PMA_Util::pow(2, -2, 'pow')
);
} else {
$this->markTestSkipped('function pow() does not exist');
@ -71,7 +71,7 @@ class PMA_pow_test extends PHPUnit_Framework_TestCase
if (function_exists('bcpow')) {
$this->assertEquals(
0.25,
PMA_CommonFunctions::getInstance()->pow(2, -2, 'bcpow')
PMA_Util::pow(2, -2, 'bcpow')
);
} else {
$this->markTestSkipped('function bcpow() does not exist');
@ -83,7 +83,7 @@ class PMA_pow_test extends PHPUnit_Framework_TestCase
if (function_exists('gmp_pow')) {
$this->assertEquals(
0.25,
PMA_CommonFunctions::getInstance()->pow(2, -2, 'gmp_pow')
PMA_Util::pow(2, -2, 'gmp_pow')
);
} else {
$this->markTestSkipped('function gmp_pow() does not exist');

Some files were not shown because too many files have changed in this diff Show More