Skip to content
Browse files

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

  • Loading branch information...
1 parent e6894be commit 6971295e9616aa6809ffd58dceb6e6735090f57d @Chanaka Chanaka committed Sep 16, 2012
Showing with 291 additions and 291 deletions.
  1. +2 −2 browse_foreigners.php
  2. +3 −3 db_create.php
  3. +5 −5 db_datadict.php
  4. +4 −4 db_printview.php
  5. +1 −1 db_search.php
  6. +2 −2 index.php
  7. +3 −3 libraries/Advisor.class.php
  8. +1 −1 libraries/DisplayResults.class.php
  9. +1 −1 libraries/File.class.php
  10. +1 −1 libraries/Footer.class.php
  11. +2 −2 libraries/Header.class.php
  12. +1 −1 libraries/PDF.class.php
  13. +3 −3 libraries/RecentTable.class.php
  14. +3 −3 libraries/StorageEngine.class.php
  15. +3 −3 libraries/Table.class.php
  16. +1 −1 libraries/TableSearch.class.php
  17. +1 −1 libraries/common.inc.php
  18. +1 −1 libraries/config/FormDisplay.tpl.php
  19. +1 −1 libraries/core.lib.php
  20. +4 −4 libraries/database_interface.lib.php
  21. +2 −2 libraries/db_common.inc.php
  22. +2 −2 libraries/db_table_exists.lib.php
  23. +3 −3 libraries/display_create_database.lib.php
  24. +1 −1 libraries/display_create_table.lib.php
  25. +1 −1 libraries/display_select_lang.lib.php
  26. +2 −2 libraries/import.lib.php
  27. +12 −12 libraries/insert_edit.lib.php
  28. +1 −1 libraries/ip_allow_deny.lib.php
  29. +1 −1 libraries/js_escape.lib.php
  30. +10 −10 libraries/operations.lib.php
  31. +3 −3 libraries/plugin_interface.lib.php
  32. +1 −1 libraries/plugins/auth/AuthenticationConfig.class.php
  33. +2 −2 libraries/plugins/auth/AuthenticationCookie.class.php
  34. +1 −1 libraries/plugins/auth/AuthenticationSignon.class.php
  35. +1 −1 libraries/plugins/export/ExportHtmlword.class.php
  36. +2 −2 libraries/plugins/export/ExportLatex.class.php
  37. +2 −2 libraries/plugins/export/ExportMediawiki.class.php
  38. +1 −1 libraries/plugins/export/ExportOdt.class.php
  39. +3 −3 libraries/plugins/export/ExportPhparray.class.php
  40. +2 −2 libraries/plugins/export/ExportSql.class.php
  41. +1 −1 libraries/plugins/export/ExportTexytext.class.php
  42. +1 −1 libraries/plugins/import/ImportCsv.class.php
  43. +1 −1 libraries/plugins/import/ImportLdi.class.php
  44. +1 −1 libraries/plugins/import/ImportXml.class.php
  45. +1 −1 libraries/plugins/transformations/abstract/DateFormatTransformationsPlugin.class.php
  46. +3 −3 libraries/pmd_common.php
  47. +1 −1 libraries/relation.lib.php
  48. +1 −1 libraries/replication_gui.lib.php
  49. +1 −1 libraries/rte/rte_events.lib.php
  50. +2 −2 libraries/rte/rte_export.lib.php
  51. +1 −1 libraries/rte/rte_footer.lib.php
  52. +3 −3 libraries/rte/rte_list.lib.php
  53. +1 −1 libraries/rte/rte_main.inc.php
  54. +3 −3 libraries/rte/rte_routines.lib.php
  55. +6 −6 libraries/rte/rte_triggers.lib.php
  56. +1 −1 libraries/schema/Visio_Relation_Schema.class.php
  57. +1 −1 libraries/server_common.inc.php
  58. +14 −14 libraries/server_privileges.lib.php
  59. +2 −2 libraries/server_synchronize.lib.php
  60. +2 −2 libraries/sql_query_form.lib.php
  61. +6 −6 libraries/structure.lib.php
  62. +1 −1 libraries/tbl_common.inc.php
  63. +1 −1 libraries/tbl_info.inc.php
  64. +1 −1 libraries/tbl_properties.inc.php
  65. +2 −2 libraries/user_preferences.inc.php
  66. +1 −1 main.php
  67. +1 −1 pmd_general.php
  68. +2 −2 prefs_manage.php
  69. +1 −1 server_collations.php
  70. +2 −2 server_plugins.php
  71. +2 −2 server_synchronize.php
  72. +1 −1 tbl_alter.php
  73. +1 −1 tbl_export.php
  74. +1 −1 tbl_indexes.php
  75. +1 −1 tbl_printview.php
  76. +1 −1 tbl_relation.php
  77. +1 −1 tbl_zoom_select.php
  78. +1 −1 test/libraries/common/PMA_browseUploadFile_test.php
  79. +19 −19 test/libraries/common/PMA_cache_test.php
  80. +2 −2 test/libraries/common/PMA_checkParameters_test.php
  81. +1 −1 test/libraries/common/PMA_contains_nonprintable_ascii_test.php
  82. +1 −1 test/libraries/common/PMA_convert_bit_default_value_test.php
  83. +2 −2 test/libraries/common/PMA_escapeMySqlWildcards_test.php
  84. +2 −2 test/libraries/common/PMA_expandUserString_test.php
  85. +1 −1 test/libraries/common/PMA_extractColumnSpec_test.php
  86. +4 −4 test/libraries/common/PMA_extractValueFromFormattedSize_test.php
  87. +1 −1 test/libraries/common/PMA_foreignKeySupported_test.php
  88. +2 −2 test/libraries/common/PMA_formatNumberByteDown_test.php
  89. +15 −15 test/libraries/common/PMA_formatSql_test.php
  90. +1 −1 test/libraries/common/PMA_generateHiddenMaxFileSize_test.php
  91. +4 −4 test/libraries/common/PMA_getCheckbox_test.php
  92. +4 −4 test/libraries/common/PMA_getDbLink_test.php
  93. +3 −3 test/libraries/common/PMA_getDivForSliderEffect_test.php
  94. +3 −3 test/libraries/common/PMA_getDropdown_test.php
  95. +1 −1 test/libraries/common/PMA_getFormattedMaximumUploadSize_test.php
  96. +4 −4 test/libraries/common/PMA_getIcon_test.php
  97. +8 −8 test/libraries/common/PMA_getRadioFields_test.php
  98. +1 −1 test/libraries/common/PMA_getTitleForTarget_test.php
  99. +2 −2 test/libraries/common/PMA_localisedDateTimespan_test.php
  100. +7 −7 test/libraries/common/PMA_pow_test.php
  101. +1 −1 test/libraries/common/PMA_printableBitValue_test.php
  102. +9 −9 test/libraries/common/PMA_quoting_slashing_test.php
  103. +1 −1 test/libraries/common/PMA_showDocu_test.php
  104. +2 −2 test/libraries/common/PMA_showMessage_test_disabled.php
  105. +1 −1 test/libraries/common/PMA_showPHPDocu_test.php
  106. +4 −4 test/libraries/common/PMA_stringOperations_test.php
  107. +1 −1 test/libraries/common/PMA_unsupportedDatatypes_test.php
  108. +4 −4 test/libraries/common/PMA_whichCrlf_test.php
  109. +1 −1 test/libraries/core/PMA_headerLocation_test.php
  110. +1 −1 test/theme.php
  111. +2 −2 transformation_wrapper.php
  112. +2 −2 user_password.php
  113. +3 −3 view_create.php
  114. +1 −1 view_operations.php
View
4 browse_foreigners.php
@@ -11,7 +11,7 @@
$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 @@
$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
6 db_create.php
@@ -29,7 +29,7 @@
}
}
-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 @@
/**
* 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 @@
$response->addJSON('new_db_string', $new_db_string);
$response->addJSON(
'sql_query',
- PMA_CommonFunctions::getInstance()->getMessage(
+ PMA_Util::getMessage(
null, $sql_query, 'success'
)
);
View
10 db_datadict.php
@@ -27,7 +27,7 @@
/**
* 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 @@
// 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 @@
$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 @@
/**
* Displays the footer
*/
-echo PMA_CommonFunctions::getInstance()->getButton();
+echo PMA_Util::getButton();
?>
View
8 db_printview.php
@@ -35,7 +35,7 @@
// 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 @@
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 (! 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
2 db_search.php
@@ -26,7 +26,7 @@
// 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
4 index.php
@@ -107,8 +107,8 @@
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
6 libraries/Advisor.class.php
@@ -437,20 +437,20 @@ 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";
}
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
2 libraries/DisplayResults.class.php
@@ -2797,7 +2797,7 @@ private function _getRowValues(
) {
$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
2 libraries/File.class.php
@@ -426,7 +426,7 @@ function setLocalSelectedFile($name)
}
$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
2 libraries/Footer.class.php
@@ -196,7 +196,7 @@ private function _getSelfLink($url_params)
$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
4 libraries/Header.class.php
@@ -169,7 +169,7 @@ private function _addDefaultScripts()
);
$this->_scripts->addFile('functions.js');
$this->_scripts->addCode(
- PMA_CommonFunctions::getInstance()->getReloadNavigationScript(true)
+ PMA_Util::getReloadNavigationScript(true)
);
}
@@ -452,7 +452,7 @@ private function _getPageTitle()
$temp_title = $GLOBALS['cfg']['TitleDefault'];
}
$this->_title = htmlspecialchars(
- PMA_CommonFunctions::getInstance()->expandUserString($temp_title)
+ PMA_Util::expandUserString($temp_title)
);
} else {
$this->_title = 'phpMyAdmin';
View
2 libraries/PDF.class.php
@@ -48,7 +48,7 @@ function Footer()
$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
6 libraries/RecentTable.class.php
@@ -47,8 +47,8 @@ public function __construct()
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 @@ public function saveToDb()
$sql_query
= " REPLACE INTO " . $this->pma_table . " (`username`, `tables`)" .
" VALUES ('" . $username . "', '"
- . PMA_CommonFunctions::getInstance()->sqlAddSlashes(
+ . PMA_Util::sqlAddSlashes(
json_encode($this->tables)
) . "')";
View
6 libraries/StorageEngine.class.php
@@ -186,7 +186,7 @@ function getHtmlVariables()
. ' <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 @@ function getHtmlVariables()
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 @@ function getHtmlVariables()
*/
function resolveTypeSize($value)
{
- return PMA_CommonFunctions::getInstance()->formatByteDown($value);
+ return PMA_Util::formatByteDown($value);
}
/**
View
6 libraries/Table.class.php
@@ -548,8 +548,8 @@ static public function countRecords($db, $table, $force_exact = false,
// 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 @@ static public function generateAlter($oldcol, $newcol, $type, $length,
$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
2 libraries/TableSearch.class.php
@@ -1114,7 +1114,7 @@ public function getSelectionForm($goto, $dataLabel = null)
$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
2 libraries/common.inc.php
@@ -1027,7 +1027,7 @@
* (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
2 libraries/config/FormDisplay.tpl.php
@@ -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
2 libraries/core.lib.php
@@ -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
8 libraries/database_interface.lib.php
@@ -59,7 +59,7 @@ function PMA_DBI_checkDbExtension($extension = 'mysql')
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 @@ function PMA_DBI_checkDbExtension($extension = 'mysql')
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
4 libraries/db_common.inc.php
@@ -14,7 +14,7 @@
*/
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($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
4 libraries/db_table_exists.lib.php
@@ -50,7 +50,7 @@
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 @@
* 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
6 libraries/display_create_database.lib.php
@@ -18,7 +18,7 @@
// 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 @@
} 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
2 libraries/display_create_table.lib.php
@@ -41,7 +41,7 @@
<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
2 libraries/display_select_lang.lib.php
@@ -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
4 libraries/import.lib.php
@@ -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
24 libraries/insert_edit.lib.php
@@ -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
2 libraries/ip_allow_deny.lib.php
@@ -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
2 libraries/js_escape.lib.php
@@ -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
20 libraries/operations.lib.php
@@ -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
6 libraries/plugin_interface.lib.php
@@ -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
2 libraries/plugins/auth/AuthenticationConfig.class.php
@@ -126,7 +126,7 @@ public function authFails()
), E_USER_WARNING
);
}
- PMA_CommonFunctions::getInstance()->mysqlDie(
+ PMA_Util::mysqlDie(
$conn_error, '', true, '', false
);
}
View
4 libraries/plugins/auth/AuthenticationCookie.class.php
@@ -173,7 +173,7 @@ public function auth()
<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 @@ public function authSetUser()
/**
* Clear user cache.
*/
- PMA_CommonFunctions::getInstance()->clearUserCache();
+ PMA_Util::clearUserCache();
PMA_Response::getInstance()->disable();
View
2 libraries/plugins/auth/AuthenticationSignon.class.php
@@ -186,7 +186,7 @@ public function authCheck()
/**
* Clear user cache.
*/
- PMA_CommonFunctions::getInstance()->clearUserCache();
+ PMA_Util::clearUserCache();
}
// Returns whether we get authentication settings or not
View
2 libraries/plugins/export/ExportHtmlword.class.php
@@ -598,7 +598,7 @@ protected function formatOneColumnDefinition(
$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
4 libraries/plugins/export/ExportLatex.class.php
@@ -220,7 +220,7 @@ public function exportHeader ()
}
$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 @@ public function exportStructure(
$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
4 libraries/plugins/export/ExportMediawiki.class.php
@@ -208,7 +208,7 @@ public function exportStructure(
// 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 @@ public function exportData(
) {
// 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
2 libraries/plugins/export/ExportOdt.class.php
@@ -699,7 +699,7 @@ protected function formatOneColumnDefinition($column)
. '</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
6 libraries/plugins/export/ExportPhparray.class.php
@@ -119,7 +119,7 @@ public function exportDBHeader ($db)
{
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 @@ public function exportData($db, $table, $crlf, $error_url, $sql_query)
// 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
4 libraries/plugins/export/ExportSql.class.php
@@ -606,7 +606,7 @@ public function exportHeader()
$head .=
$this->_exportComment(
__('Generation Time') . ': '
- . PMA_CommonFunctions::getInstance()->localisedDate()
+ . PMA_Util::localisedDate()
)
. $this->_exportComment(
__('Server version') . ': ' . PMA_MYSQL_STR_VERSION
@@ -759,7 +759,7 @@ public function exportDBHeader($db)
. $this->_exportComment(
__('Database') . ': '
. (isset($GLOBALS['sql_backquotes'])
- ? PMA_CommonFunctions::getInstance()->backquoteCompat($db, $compat)
+ ? PMA_Util::backquoteCompat($db, $compat)
: '\'' . $db . '\'')
)
. $this->_exportComment();
View
2 libraries/plugins/export/ExportTexytext.class.php
@@ -535,7 +535,7 @@ function formatOneColumnDefinition(
$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
2 libraries/plugins/import/ImportCsv.class.php
@@ -124,7 +124,7 @@ protected function setProperties()
$leaf->setName("columns");
$leaf->setText(
__('Column names: ')
- . PMA_CommonFunctions::getInstance()->showHint($hint)
+ . PMA_Util::showHint($hint)
);
$generalOptions->addProperty($leaf);
}
View
2 libraries/plugins/import/ImportLdi.class.php
@@ -153,7 +153,7 @@ public function doImport()
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
2 libraries/plugins/import/ImportXml.class.php
@@ -219,7 +219,7 @@ public function doImport()
*/
$attrs = $val2->attributes();
$create[] = "USE "
- . PMA_CommonFunctions::getInstance()->backquote(
+ . PMA_Util::backquote(
$attrs["name"]
);
View
2 libraries/plugins/transformations/abstract/DateFormatTransformationsPlugin.class.php
@@ -130,7 +130,7 @@ public function applyTransformation($buffer, $options = array(), $meta = '')
$timestamp -= $options[0] * 60 * 60;
$source = $buffer;
if ($options[2] == 'local') {
- $text = PMA_CommonFunctions::getInstance()->localisedDate(
+ $text = PMA_Util::localisedDate(
$timestamp,
$options[1]
);
View
6 libraries/pmd_common.php
@@ -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
2 libraries/relation.lib.php
@@ -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
2 libraries/replication_gui.lib.php
@@ -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
2 libraries/rte/rte_events.lib.php
@@ -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
4 libraries/rte/rte_export.lib.php
@@ -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
2 libraries/rte/rte_footer.lib.php
@@ -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
6 libraries/rte/rte_list.lib.php
@@ -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
2 libraries/rte/rte_main.inc.php
@@ -63,7 +63,7 @@
/**
* Create labels for the list
*/
-$titles = PMA_CommonFunctions::getInstance()->buildActionTitles();
+$titles = PMA_Util::buildActionTitles();
/**
* Keep a list of errors that occured while
View
6 libraries/rte/rte_routines.lib.php
@@ -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
12 libraries/rte/rte_triggers.lib.php
@@ -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
2 libraries/schema/Visio_Relation_Schema.class.php
@@ -282,7 +282,7 @@ function __construct($tableName, $pageNumber, &$same_wide_width, $showKeys = fal
// 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
2 libraries/server_common.inc.php
@@ -50,7 +50,7 @@
PMA_DBI_QUERY_STORE
);
-PMA_CommonFunctions::getInstance()->checkParameters(
+PMA_Util::checkParameters(
array('is_superuser', 'url_query'), false
);
?>
View
28 libraries/server_privileges.lib.php
@@ -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
4 libraries/server_synchronize.lib.php
@@ -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
4 libraries/sql_query_form.lib.php
@@ -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
12 libraries/structure.lib.php
@@ -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')
);