Permalink
Browse files

Renamed ->method() with PMA_Util::method()

  • Loading branch information...
1 parent 0829709 commit e6894be57f5735ab525a2f758ad842aacb8ef7bc @Chanaka Chanaka committed Sep 16, 2012
Showing with 1,453 additions and 1,453 deletions.
  1. +6 −6 db_operations.php
  2. +11 −11 db_printview.php
  3. +3 −3 db_structure.php
  4. +6 −6 db_tables_search.php
  5. +11 −11 db_tracking.php
  6. +10 −10 export.php
  7. +4 −4 import.php
  8. +6 −6 libraries/Index.class.php
  9. +2 −2 libraries/List_Database.class.php
  10. +36 −36 libraries/Table.class.php
  11. +4 −4 libraries/TableSearch.class.php
  12. +46 −46 libraries/Tracker.class.php
  13. +21 −21 libraries/bookmark.lib.php
  14. +5 −5 libraries/build_html_for_db.lib.php
  15. +13 −13 libraries/check_user_privileges.lib.php
  16. +54 −54 libraries/database_interface.lib.php
  17. +9 −9 libraries/db_info.inc.php
  18. +5 −5 libraries/display_export.lib.php
  19. +2 −2 libraries/display_git_revision.lib.php
  20. +7 −7 libraries/display_import.lib.php
  21. +14 −14 libraries/engines/innodb.lib.php
  22. +1 −1 libraries/engines/pbxt.lib.php
  23. +3 −3 libraries/gis/pma_gis_polygon.php
  24. +15 −15 libraries/import.lib.php
  25. +24 −24 libraries/insert_edit.lib.php
  26. +36 −36 libraries/mult_submits.inc.php
  27. +17 −17 libraries/mysql_charsets.lib.php
  28. +6 −6 libraries/navigation_header.inc.php
  29. +32 −32 libraries/operations.lib.php
  30. +5 −5 libraries/plugins/auth/AuthenticationCookie.class.php
  31. +4 −4 libraries/plugins/export/ExportCodegen.class.php
  32. +6 −6 libraries/plugins/export/ExportLatex.class.php
  33. +48 −48 libraries/plugins/export/ExportSql.class.php
  34. +5 −5 libraries/plugins/export/ExportXml.class.php
  35. +4 −4 libraries/plugins/import/ImportCsv.class.php
  36. +14 −14 libraries/plugins/import/ImportDocsql.class.php
  37. +5 −5 libraries/plugins/import/ImportLdi.class.php
  38. +77 −77 libraries/relation.lib.php
  39. +50 −50 libraries/relation_cleanup.lib.php
  40. +17 −17 libraries/rte/rte_events.lib.php
  41. +4 −4 libraries/rte/rte_footer.lib.php
  42. +8 −8 libraries/rte/rte_list.lib.php
  43. +37 −37 libraries/rte/rte_routines.lib.php
  44. +4 −4 libraries/rte/rte_triggers.lib.php
  45. +6 −6 libraries/schema/Dia_Relation_Schema.class.php
  46. +6 −6 libraries/schema/Eps_Relation_Schema.class.php
  47. +4 −4 libraries/schema/Export_Relation_Schema.class.php
  48. +6 −6 libraries/schema/Svg_Relation_Schema.class.php
  49. +5 −5 libraries/schema/Visio_Relation_Schema.class.php
  50. +97 −97 libraries/server_privileges.lib.php
  51. +60 −60 libraries/server_synchronize.lib.php
  52. +6 −6 libraries/sql_query_form.lib.php
  53. +17 −17 libraries/sqlparser.lib.php
  54. +104 −104 libraries/structure.lib.php
  55. +13 −13 libraries/tbl_properties.inc.php
  56. +6 −6 libraries/tbl_views.lib.php
  57. +27 −27 libraries/transformations.lib.php
  58. +10 −10 libraries/user_preferences.lib.php
  59. +4 −4 main.php
  60. +17 −17 navigation.php
  61. +11 −11 pmd_display_field.php
  62. +12 −12 pmd_pdf.php
  63. +19 −19 pmd_relation_new.php
  64. +12 −12 pmd_relation_upd.php
  65. +12 −12 pmd_save_pos.php
  66. +4 −4 querywindow.php
  67. +4 −4 schema_edit.php
  68. +4 −4 server_binlog.php
  69. +7 −7 server_databases.php
  70. +3 −3 server_engines.php
  71. +13 −13 server_privileges.php
  72. +8 −8 server_replication.php
  73. +54 −54 server_status.php
  74. +11 −11 server_variables.php
  75. +19 −19 sql.php
  76. +11 −11 tbl_addfield.php
  77. +10 −10 tbl_alter.php
  78. +7 −7 tbl_change.php
  79. +22 −22 tbl_create.php
  80. +6 −6 tbl_get_field.php
  81. +7 −7 tbl_indexes.php
  82. +6 −6 tbl_move_copy.php
  83. +5 −5 tbl_operations.php
  84. +17 −17 tbl_printview.php
  85. +58 −58 tbl_relation.php
  86. +4 −4 tbl_replace.php
  87. +7 −7 tbl_structure.php
  88. +13 −13 tbl_tracking.php
  89. +2 −2 user_password.php
View
@@ -122,7 +122,7 @@
PMA_relationsCleanupDatabase($db);
// if someday the RENAME DATABASE reappears, do not DROP
- $local_query = 'DROP DATABASE ' . $common_functions->backquote($db) . ';';
+ $local_query = 'DROP DATABASE ' . PMA_Util::backquote($db) . ';';
$sql_query .= "\n" . $local_query;
PMA_DBI_query($local_query);
@@ -166,7 +166,7 @@
$response->addJSON('newname', $_REQUEST['newname']);
$response->addJSON(
'sql_query',
- $common_functions->getMessage(null, $sql_query)
+ PMA_Util::getMessage(null, $sql_query)
);
exit;
}
@@ -200,7 +200,7 @@
echo "\n";
if (isset($message)) {
- echo $common_functions->getMessage($message, $sql_query);
+ echo PMA_Util::getMessage($message, $sql_query);
unset($message);
}
}
@@ -279,9 +279,9 @@
// We only show this if we find something in the new pdf_pages table
$test_query = '
SELECT *
- FROM ' . $common_functions->backquote($GLOBALS['cfgRelation']['db'])
- . '.' . $common_functions->backquote($cfgRelation['pdf_pages']) . '
- WHERE db_name = \'' . $common_functions->sqlAddSlashes($db) . '\'';
+ FROM ' . PMA_Util::backquote($GLOBALS['cfgRelation']['db'])
+ . '.' . PMA_Util::backquote($cfgRelation['pdf_pages']) . '
+ WHERE db_name = \'' . PMA_Util::sqlAddSlashes($db) . '\'';
$test_rs = PMA_queryAsControlUser($test_query, null, PMA_DBI_QUERY_STORE);
/*
View
@@ -14,7 +14,7 @@
$header = $response->getHeader();
$header->enablePrintView();
-$common_functions->checkParameters(array('db'));
+PMA_Util::checkParameters(array('db'));
/**
* Defines the url to return to in case of error in a sql statement
@@ -132,9 +132,9 @@
<td class="right">
<?php
if ($merged_size) {
- echo '<i>' . $common_functions->formatNumber($sts_data['TABLE_ROWS'], 0) . '</i>' . "\n";
+ echo '<i>' . PMA_Util::formatNumber($sts_data['TABLE_ROWS'], 0) . '</i>' . "\n";
} else {
- echo $common_functions->formatNumber($sts_data['TABLE_ROWS'], 0) . "\n";
+ echo PMA_Util::formatNumber($sts_data['TABLE_ROWS'], 0) . "\n";
}
?>
</td>
@@ -146,7 +146,7 @@
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
$sum_size += $tblsize;
list($formated_size, $unit)
- = $common_functions->formatByteDown($tblsize, 3, 1);
+ = PMA_Util::formatByteDown($tblsize, 3, 1);
?>
<td class="right nowrap">
<?php echo $formated_size . ' ' . $unit; ?>
@@ -183,7 +183,7 @@
?>
<tr>
<td class="right"><?php echo __('Creation') . ': '; ?></td>
- <td class="right"><?php echo $common_functions->localisedDate(strtotime($sts_data['Create_time'])); ?></td>
+ <td class="right"><?php echo PMA_Util::localisedDate(strtotime($sts_data['Create_time'])); ?></td>
</tr>
<?php
}
@@ -192,7 +192,7 @@
?>
<tr>
<td class="right"><?php echo __('Last update') . ': '; ?></td>
- <td class="right"><?php echo $common_functions->localisedDate(strtotime($sts_data['Update_time'])); ?></td>
+ <td class="right"><?php echo PMA_Util::localisedDate(strtotime($sts_data['Update_time'])); ?></td>
</tr>
<?php
}
@@ -201,7 +201,7 @@
?>
<tr>
<td class="right"><?php echo __('Last check') . ': '; ?></td>
- <td class="right"><?php echo $common_functions->localisedDate(strtotime($sts_data['Check_time'])); ?></td>
+ <td class="right"><?php echo PMA_Util::localisedDate(strtotime($sts_data['Check_time'])); ?></td>
</tr>
<?php
}
@@ -217,18 +217,18 @@
?>
<tr>
<th class="center">
- <?php echo sprintf(_ngettext('%s table', '%s tables', $num_tables), $common_functions->formatNumber($num_tables, 0)); ?>
+ <?php echo sprintf(_ngettext('%s table', '%s tables', $num_tables), PMA_Util::formatNumber($num_tables, 0)); ?>
</th>
<th class="right nowrap">
- <?php echo $common_functions->formatNumber($sum_entries, 0); ?>
+ <?php echo PMA_Util::formatNumber($sum_entries, 0); ?>
</th>
<th class="center">
--
</th>
<?php
if ($cfg['ShowStats']) {
list($sum_formated, $unit)
- = $common_functions->formatByteDown($sum_size, 3, 1);
+ = PMA_Util::formatByteDown($sum_size, 3, 1);
?>
<th class="right nowrap">
<?php echo $sum_formated . ' ' . $unit; ?>
@@ -246,7 +246,7 @@
/**
* Displays the footer
*/
-echo $common_functions->getButton();
+echo PMA_Util::getButton();
echo "<div id='PMA_disable_floating_menubar'></div>\n";
?>
View
@@ -77,7 +77,7 @@
require_once 'libraries/mysql_charsets.lib.php';
$db_collation = PMA_getDbCollation($db);
-$titles = $common_functions->buildActionTitles();
+$titles = PMA_Util::buildActionTitles();
// 1. No tables
@@ -117,7 +117,7 @@
}
$response->addHTML(
- $common_functions->getListNavigator(
+ PMA_Util::getListNavigator(
$total_num_tables, $pos, $_url_params, 'db_structure.php',
'frame_content', $GLOBALS['cfg']['MaxTableList']
)
@@ -307,7 +307,7 @@
// display again the table list navigator
$response->addHTML(
- $common_functions->getListNavigator(
+ PMA_Util::getListNavigator(
$total_num_tables, $pos, $_url_params, 'db_structure.php',
'frame_content', $GLOBALS['cfg']['MaxTableList']
)
View
@@ -12,7 +12,7 @@
$db = $_GET['db'];
$table_term = $_GET['table'];
$common_url_query = PMA_generate_common_url($GLOBALS['db']);
-$tables_full = $common_functions->getTableList($db);
+$tables_full = PMA_Util::getTableList($db);
$tables_response = array();
foreach ($tables_full as $key => $table) {
@@ -21,7 +21,7 @@
. htmlspecialchars($link_title)
. ': ' . htmlspecialchars($table['Comment'])
. ' ('
- . $common_functions->formatNumber($table['Rows'], 0)
+ . PMA_Util::formatNumber($table['Rows'], 0)
. ' ' . __('Rows') . ')"' . ' id="quick_'
. htmlspecialchars($table_db . '.' . $table['Name']) . '"'
. ' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?'
@@ -33,11 +33,11 @@
'id' => 'icon_' . htmlspecialchars($table_db . '.' . $table['Name'])
);
if (PMA_Table::isView($table_db, $table['Name'])) {
- $link .= $common_functions->getImage(
+ $link .= PMA_Util::getImage(
's_views.png', htmlspecialchars($link_title), $attr
);
} else {
- $link .= $common_functions->getImage(
+ $link .= PMA_Util::getImage(
'b_browse.png', htmlspecialchars($link_title), $attr
);
}
@@ -48,12 +48,12 @@
. urlencode($table['Name']) . '&amp;pos=0';
$link .= '<a href="' . $href . '" title="'
. htmlspecialchars(
- $common_functions->getTitleForTarget(
+ PMA_Util::getTitleForTarget(
$GLOBALS['cfg']['DefaultTabTable']
)
. ': ' . $table['Comment']
. ' (' .
- $common_functions->formatNumber($table['Rows'], 0)
+ PMA_Util::formatNumber($table['Rows'], 0)
. ' ' . __('Rows') . ')'
)
. '" id="' . htmlspecialchars($table_db . '.' . $table['Name'])
View
@@ -60,9 +60,9 @@
// Prepare statement to get HEAD version
$all_tables_query = ' SELECT table_name, MAX(version) as version FROM ' .
- $common_functions->backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' .
- $common_functions->backquote($GLOBALS['cfg']['Server']['tracking']) .
- ' WHERE db_name = \'' . $common_functions->sqlAddSlashes($_REQUEST['db']) . '\' ' .
+ PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' .
+ PMA_Util::backquote($GLOBALS['cfg']['Server']['tracking']) .
+ ' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($_REQUEST['db']) . '\' ' .
' GROUP BY table_name' .
' ORDER BY table_name ASC';
@@ -94,7 +94,7 @@
$drop_image_or_text = '';
if (true == $GLOBALS['cfg']['PropertiesIconic']) {
- $drop_image_or_text .= $common_functions->getImage(
+ $drop_image_or_text .= PMA_Util::getImage(
'b_drop.png',
__('Delete tracking data for this table')
);
@@ -109,10 +109,10 @@
while ($one_result = PMA_DBI_fetch_array($all_tables_result)) {
list($table_name, $version_number) = $one_result;
$table_query = ' SELECT * FROM ' .
- $common_functions->backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' .
- $common_functions->backquote($GLOBALS['cfg']['Server']['tracking']) .
- ' WHERE `db_name` = \'' . $common_functions->sqlAddSlashes($_REQUEST['db'])
- . '\' AND `table_name` = \'' . $common_functions->sqlAddSlashes($table_name)
+ PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb']) . '.' .
+ PMA_Util::backquote($GLOBALS['cfg']['Server']['tracking']) .
+ ' WHERE `db_name` = \'' . PMA_Util::sqlAddSlashes($_REQUEST['db'])
+ . '\' AND `table_name` = \'' . PMA_Util::sqlAddSlashes($table_name)
. '\' AND `version` = \'' . $version_number . '\'';
$table_result = PMA_queryAsControlUser($table_query);
@@ -159,7 +159,7 @@
$sep = $GLOBALS['cfg']['LeftFrameTableSeparator'];
// Get list of tables
-$table_list = $common_functions->getTableList($GLOBALS['db']);
+$table_list = PMA_Util::getTableList($GLOBALS['db']);
// For each table try to get the tracking version
foreach ($table_list as $key => $value) {
@@ -211,7 +211,7 @@
if (PMA_Tracker::getVersion($GLOBALS['db'], $tablename) == -1) {
$my_link = '<a href="tbl_tracking.php?' . $url_query
. '&amp;table=' . htmlspecialchars($tablename) .'">';
- $my_link .= $common_functions->getIcon('eye.png', __('Track table'));
+ $my_link .= PMA_Util::getIcon('eye.png', __('Track table'));
$my_link .= '</a>';
?>
<tr class="noclick <?php echo $style;?>">
@@ -239,7 +239,7 @@
$log .= '# ' . $entry['date'] . ' ' . $entry['username'] . "\n"
. $entry['statement'] . "\n";
}
- echo $common_functions->getMessage(__('Database Log'), $log);
+ echo PMA_Util::getMessage(__('Database Log'), $log);
}
?>
View
@@ -21,7 +21,7 @@
$GLOBALS[$one_post_param] = $one_post_value;
}
-$common_functions->checkParameters(array('what', 'export_type'));
+PMA_Util::checkParameters(array('what', 'export_type'));
// export class instance, not array of properties, as before
$export_plugin = PMA_getPlugin(
@@ -248,7 +248,7 @@ function PMA_exportOutputHandler($line)
if ($what == 'sql') {
$crlf = "\n";
} else {
- $crlf = $common_functions->whichCrlf();
+ $crlf = PMA_Util::whichCrlf();
}
$output_kanji_conversion = function_exists('PMA_kanji_str_conv') && $type != 'xls';
@@ -318,7 +318,7 @@ function PMA_exportOutputHandler($line)
);
}
}
- $filename = $common_functions->expandUserString($filename_template);
+ $filename = PMA_Util::expandUserString($filename_template);
$filename = PMA_sanitizeFilename($filename);
// Grab basic dump extension and mime type
@@ -350,7 +350,7 @@ function PMA_exportOutputHandler($line)
// Open file on server if needed
if ($save_on_server) {
- $save_filename = $common_functions->userDir($cfg['SaveDir'])
+ $save_filename = PMA_Util::userDir($cfg['SaveDir'])
. preg_replace('@[/\\\\]@', '_', $filename);
unset($message);
if (file_exists($save_filename)
@@ -535,8 +535,8 @@ function PMA_exportOutputHandler($line)
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data')
&& ! ($is_view || PMA_Table::isMerge($current_db, $table))
) {
- $local_query = 'SELECT * FROM ' . $common_functions->backquote($current_db)
- . '.' . $common_functions->backquote($table);
+ $local_query = 'SELECT * FROM ' . PMA_Util::backquote($current_db)
+ . '.' . PMA_Util::backquote($table);
if (! $export_plugin->exportData($current_db, $table, $crlf, $err_url, $local_query)) {
break 3;
}
@@ -614,8 +614,8 @@ function PMA_exportOutputHandler($line)
|| $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data')
&& ! ($is_view || PMA_Table::isMerge($db, $table))
) {
- $local_query = 'SELECT * FROM ' . $common_functions->backquote($db)
- . '.' . $common_functions->backquote($table);
+ $local_query = 'SELECT * FROM ' . PMA_Util::backquote($db)
+ . '.' . PMA_Util::backquote($table);
if (! $export_plugin->exportData($db, $table, $crlf, $err_url, $local_query)) {
break 2;
}
@@ -694,8 +694,8 @@ function PMA_exportOutputHandler($line)
$local_query = $sql_query . $add_query;
PMA_DBI_select_db($db);
} else {
- $local_query = 'SELECT * FROM ' . $common_functions->backquote($db)
- . '.' . $common_functions->backquote($table) . $add_query;
+ $local_query = 'SELECT * FROM ' . PMA_Util::backquote($db)
+ . '.' . PMA_Util::backquote($table) . $add_query;
}
if (! $export_plugin->exportData($db, $table, $crlf, $err_url, $local_query)) {
break;
View
@@ -121,7 +121,7 @@
}
// Check needed parameters
-$common_functions->checkParameters(array('import_type', 'format'));
+PMA_Util::checkParameters(array('import_type', 'format'));
// We don't want anything special in format
$format = PMA_securePath($format);
@@ -215,7 +215,7 @@
if (isset($bookmark_variable) && ! empty($bookmark_variable)) {
$import_text = preg_replace(
'|/\*(.*)\[VARIABLE\](.*)\*/|imsU',
- '${1}' . $common_functions->sqlAddSlashes($bookmark_variable) . '${2}',
+ '${1}' . PMA_Util::sqlAddSlashes($bookmark_variable) . '${2}',
$import_text
);
}
@@ -299,7 +299,7 @@
// sanitize $local_import_file as it comes from a POST
$local_import_file = PMA_securePath($local_import_file);
- $import_file = $common_functions->userDir($cfg['UploadDir'])
+ $import_file = PMA_Util::userDir($cfg['UploadDir'])
. $local_import_file;
} elseif (empty($import_file) || ! is_uploaded_file($import_file)) {
@@ -550,7 +550,7 @@
// There was an error?
if (isset($my_die)) {
foreach ($my_die AS $key => $die) {
- $common_functions->mysqlDie(
+ PMA_Util::mysqlDie(
$die['error'], $die['sql'], '', $err_url, $error
);
}
Oops, something went wrong.

0 comments on commit e6894be

Please sign in to comment.