Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
47e79dea1f
@ -66,7 +66,7 @@ if (strlen($db) && (! empty($_REQUEST['db_rename']) || ! empty($_REQUEST['db_cop
|
||||
|
||||
$tables_full = PMA_DBI_get_tables_full($db);
|
||||
|
||||
require_once "libraries/plugin_interface.lib.php";
|
||||
include_once "libraries/plugin_interface.lib.php";
|
||||
// remove all foreign key constraints, otherwise we can get errors
|
||||
$export_sql_plugin = PMA_getPlugin(
|
||||
"export",
|
||||
@ -77,8 +77,8 @@ if (strlen($db) && (! empty($_REQUEST['db_rename']) || ! empty($_REQUEST['db_cop
|
||||
'export_type' => 'database'
|
||||
)
|
||||
);
|
||||
$GLOBALS['sql_constraints_query_full_db'] =
|
||||
PMA_getSqlConstraintsQueryForFullDb(
|
||||
$GLOBALS['sql_constraints_query_full_db']
|
||||
= PMA_getSqlConstraintsQueryForFullDb(
|
||||
$tables_full, $export_sql_plugin, $move, $db
|
||||
);
|
||||
|
||||
|
||||
@ -271,9 +271,9 @@ foreach ($tables as $keyname => $current_table) {
|
||||
|
||||
list($html_output, $odd_row) = PMA_getHtmlForStructureTableRow(
|
||||
$i, $odd_row, $table_is_view, $current_table, $checked,
|
||||
$browse_table_label, $tracking_icon,$server_slave_status,
|
||||
$browse_table_label, $tracking_icon, $server_slave_status,
|
||||
$browse_table, $tbl_url_query, $search_table, $db_is_information_schema,
|
||||
$titles, $empty_table,$drop_query, $drop_message, $collation,
|
||||
$titles, $empty_table, $drop_query, $drop_message, $collation,
|
||||
$formatted_size, $unit, $overhead,
|
||||
(isset ($create_time) ? $create_time : ''),
|
||||
(isset ($update_time) ? $update_time : ''),
|
||||
|
||||
@ -442,7 +442,7 @@ $sql_data = array('valid_sql' => array(), 'valid_queries' => 0);
|
||||
|
||||
if (! $error) {
|
||||
// Check for file existance
|
||||
require_once("libraries/plugin_interface.lib.php");
|
||||
include_once "libraries/plugin_interface.lib.php";
|
||||
$import_plugin = PMA_getPlugin(
|
||||
"import",
|
||||
$format,
|
||||
|
||||
@ -142,10 +142,10 @@ $(document).ready(function() {
|
||||
$('#tableFieldsId tr:eq(1) td:eq(1)').html(data.field_collation);
|
||||
$('#tableFieldsId tr:eq(1) td:eq(2)').html(data.field_operators);
|
||||
$('#tableFieldsId tr:eq(1) td:eq(3)').html(data.field_value);
|
||||
xLabel = $('#tableid_0').val();
|
||||
$('#types_0').val(data.field_type);
|
||||
xLabel = $('#tableid_0').val();
|
||||
$('#types_0').val(data.field_type);
|
||||
xType = data.field_type;
|
||||
$('#collations_0').val(data.field_collations);
|
||||
$('#collations_0').val(data.field_collations);
|
||||
addDateTimePicker();
|
||||
});
|
||||
});
|
||||
@ -153,7 +153,7 @@ $(document).ready(function() {
|
||||
// second column choice corresponds to the Y axis
|
||||
$('#tableid_1').change(function() {
|
||||
//AJAX request for field type, collation, operators, and value field
|
||||
$.post('tbl_zoom_select.php',{
|
||||
$.post('tbl_zoom_select.php',{
|
||||
'ajax_request' : true,
|
||||
'change_tbl_info' : true,
|
||||
'db' : window.parent.db,
|
||||
@ -166,17 +166,17 @@ $(document).ready(function() {
|
||||
$('#tableFieldsId tr:eq(3) td:eq(1)').html(data.field_collation);
|
||||
$('#tableFieldsId tr:eq(3) td:eq(2)').html(data.field_operators);
|
||||
$('#tableFieldsId tr:eq(3) td:eq(3)').html(data.field_value);
|
||||
yLabel = $('#tableid_1').val();
|
||||
$('#types_1').val(data.field_type);
|
||||
yLabel = $('#tableid_1').val();
|
||||
$('#types_1').val(data.field_type);
|
||||
yType = data.field_type;
|
||||
$('#collations_1').val(data.field_collations);
|
||||
$('#collations_1').val(data.field_collations);
|
||||
addDateTimePicker();
|
||||
});
|
||||
});
|
||||
|
||||
$('#tableid_2').change(function() {
|
||||
//AJAX request for field type, collation, operators, and value field
|
||||
$.post('tbl_zoom_select.php',{
|
||||
$.post('tbl_zoom_select.php',{
|
||||
'ajax_request' : true,
|
||||
'change_tbl_info' : true,
|
||||
'db' : window.parent.db,
|
||||
@ -189,15 +189,15 @@ $(document).ready(function() {
|
||||
$('#tableFieldsId tr:eq(6) td:eq(1)').html(data.field_collation);
|
||||
$('#tableFieldsId tr:eq(6) td:eq(2)').html(data.field_operators);
|
||||
$('#tableFieldsId tr:eq(6) td:eq(3)').html(data.field_value);
|
||||
$('#types_2').val(data.field_type);
|
||||
$('#collations_2').val(data.field_collations);
|
||||
$('#types_2').val(data.field_type);
|
||||
$('#collations_2').val(data.field_collations);
|
||||
addDateTimePicker();
|
||||
});
|
||||
});
|
||||
|
||||
$('#tableid_3').change(function() {
|
||||
//AJAX request for field type, collation, operators, and value field
|
||||
$.post('tbl_zoom_select.php',{
|
||||
$.post('tbl_zoom_select.php',{
|
||||
'ajax_request' : true,
|
||||
'change_tbl_info' : true,
|
||||
'db' : window.parent.db,
|
||||
@ -210,8 +210,8 @@ $(document).ready(function() {
|
||||
$('#tableFieldsId tr:eq(8) td:eq(1)').html(data.field_collation);
|
||||
$('#tableFieldsId tr:eq(8) td:eq(2)').html(data.field_operators);
|
||||
$('#tableFieldsId tr:eq(8) td:eq(3)').html(data.field_value);
|
||||
$('#types_3').val(data.field_type);
|
||||
$('#collations_3').val(data.field_collations);
|
||||
$('#types_3').val(data.field_type);
|
||||
$('#collations_3').val(data.field_collations);
|
||||
addDateTimePicker();
|
||||
});
|
||||
});
|
||||
|
||||
@ -3514,7 +3514,7 @@ class PMA_CommonFunctions
|
||||
/* Optional escaping */
|
||||
if (! is_null($escape)) {
|
||||
if (is_array($escape)) {
|
||||
require_once $escape[2];
|
||||
include_once $escape[2];
|
||||
$escape_class = new $escape[1];
|
||||
$escape_method = $escape[0];
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ class PMA_Tracker
|
||||
}
|
||||
|
||||
// get Export SQL instance
|
||||
require_once "libraries/plugin_interface.lib.php";
|
||||
include_once "libraries/plugin_interface.lib.php";
|
||||
$export_sql_plugin = PMA_getPlugin(
|
||||
"export",
|
||||
"sql",
|
||||
|
||||
@ -14,7 +14,7 @@ if (! defined('TESTSUITE')) {
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
}
|
||||
|
||||
include_once 'libraries/Response.class.php';
|
||||
require_once 'libraries/Response.class.php';
|
||||
PMA_Response::getInstance()->disable();
|
||||
|
||||
?>
|
||||
|
||||
@ -496,7 +496,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
} elseif ($query_type == 'drop_tbl') {
|
||||
PMA_clearTransformations($db, $selected[$i]);
|
||||
} else if ($query_type == 'drop_fld') {
|
||||
PMA_clearTransformations($db, $table ,$selected[$i]);
|
||||
PMA_clearTransformations($db, $table, $selected[$i]);
|
||||
}
|
||||
|
||||
} // end if
|
||||
|
||||
@ -150,8 +150,7 @@ function PMA_replication_print_status_table($type, $hidden = false, $title = tru
|
||||
'Replicate_Wild_Do_Table', 'Replicate_Wild_Ignore_Table');
|
||||
if (in_array($variable, $variables_wrap)) {
|
||||
echo str_replace(',', ', ', ${"server_{$type}_replication"}[0][$variable]);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
echo ${"server_{$type}_replication"}[0][$variable];
|
||||
}
|
||||
echo '</span>';
|
||||
|
||||
@ -264,7 +264,7 @@ function PMA_RTN_parseRoutineDefiner($parsed_query)
|
||||
function PMA_RTN_handleEditor()
|
||||
{
|
||||
global $_GET, $_POST, $_REQUEST, $GLOBALS, $db, $errors;
|
||||
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
|
||||
if (! empty($_REQUEST['editor_process_add'])
|
||||
@ -443,7 +443,7 @@ function PMA_RTN_handleEditor()
|
||||
function PMA_RTN_getDataFromRequest()
|
||||
{
|
||||
global $_REQUEST, $param_directions, $param_sqldataaccess;
|
||||
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
|
||||
$retval = array();
|
||||
@ -689,7 +689,7 @@ function PMA_RTN_getDataFromName($name, $type, $all = true)
|
||||
function PMA_RTN_getParameterRow($routine = array(), $index = null, $class = '')
|
||||
{
|
||||
global $param_directions, $param_opts_num, $titles;
|
||||
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
|
||||
if ($index === null) {
|
||||
@ -1045,7 +1045,7 @@ function PMA_RTN_getQueryFromRequest()
|
||||
{
|
||||
global $_REQUEST, $errors, $param_sqldataaccess, $param_directions;
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$_REQUEST['item_type'] = isset($_REQUEST['item_type'])
|
||||
? $_REQUEST['item_type'] : '';
|
||||
|
||||
@ -1202,7 +1202,7 @@ function PMA_RTN_getQueryFromRequest()
|
||||
function PMA_RTN_handleExecute()
|
||||
{
|
||||
global $_GET, $_POST, $_REQUEST, $GLOBALS, $db;
|
||||
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
|
||||
/**
|
||||
@ -1253,26 +1253,26 @@ function PMA_RTN_handleExecute()
|
||||
. "(" . implode(', ', $args) . ") "
|
||||
. "AS " . $common_functions->backquote($routine['item_name']) . ";\n";
|
||||
}
|
||||
|
||||
|
||||
// Get all the queries as one SQL statement
|
||||
$multiple_query = implode("", $queries);
|
||||
|
||||
|
||||
$outcome = true;
|
||||
$affected = 0;
|
||||
|
||||
|
||||
// Execute query
|
||||
if (! PMA_DBI_try_multi_query($multiple_query)) {
|
||||
$outcome = false;
|
||||
}
|
||||
|
||||
|
||||
// Generate output
|
||||
if ($outcome) {
|
||||
|
||||
|
||||
// Pass the SQL queries through the "pretty printer"
|
||||
$output = '<code class="sql" style="margin-bottom: 1em;">';
|
||||
$output .= PMA_SQP_formatHtml(PMA_SQP_parse(implode($queries)));
|
||||
$output .= '</code>';
|
||||
|
||||
|
||||
// Display results
|
||||
$output .= "<fieldset><legend>";
|
||||
$output .= sprintf(
|
||||
@ -1280,26 +1280,26 @@ function PMA_RTN_handleExecute()
|
||||
$common_functions->backquote(htmlspecialchars($routine['item_name']))
|
||||
);
|
||||
$output .= "</legend>";
|
||||
|
||||
|
||||
$num_of_rusults_set_to_display = 0;
|
||||
|
||||
|
||||
do {
|
||||
|
||||
|
||||
$result = PMA_DBI_store_result();
|
||||
$num_rows = PMA_DBI_num_rows($result);
|
||||
|
||||
|
||||
if (($result !== false) && ($num_rows > 0)) {
|
||||
|
||||
$output .= "<table><tr>";
|
||||
|
||||
$output .= "<table><tr>";
|
||||
foreach (PMA_DBI_get_fields_meta($result) as $key => $field) {
|
||||
$output .= "<th>";
|
||||
$output .= htmlspecialchars($field->name);
|
||||
$output .= "</th>";
|
||||
}
|
||||
}
|
||||
$output .= "</tr>";
|
||||
|
||||
|
||||
$color_class = 'odd';
|
||||
|
||||
|
||||
while ($row = PMA_DBI_fetch_assoc($result)) {
|
||||
$output .= "<tr>";
|
||||
foreach ($row as $key => $value) {
|
||||
@ -1313,30 +1313,30 @@ function PMA_RTN_handleExecute()
|
||||
$output .= "</tr>";
|
||||
$color_class = ($color_class == 'odd') ? 'even' : 'odd';
|
||||
}
|
||||
|
||||
|
||||
$output .= "</table>";
|
||||
$num_of_rusults_set_to_display++;
|
||||
$affected = $num_rows;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (! PMA_DBI_more_results()) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$output .= "<br/>";
|
||||
|
||||
|
||||
PMA_DBI_free_result($result);
|
||||
|
||||
|
||||
} while (PMA_DBI_next_result());
|
||||
|
||||
|
||||
$output .= "</fieldset>";
|
||||
|
||||
|
||||
$message = __('Your SQL query has been executed successfully');
|
||||
if ($routine['item_type'] == 'PROCEDURE') {
|
||||
$message .= '<br />';
|
||||
|
||||
// TODO : message need to be modified according to the
|
||||
|
||||
// TODO : message need to be modified according to the
|
||||
// output from the routine
|
||||
$message .= sprintf(
|
||||
_ngettext(
|
||||
@ -1348,12 +1348,12 @@ function PMA_RTN_handleExecute()
|
||||
);
|
||||
}
|
||||
$message = PMA_message::success($message);
|
||||
|
||||
|
||||
if ($num_of_rusults_set_to_display == 0) {
|
||||
$notice = __('MySQL returned an empty result set (i.e. zero rows).');
|
||||
$output .= PMA_message::notice($notice)->getDisplay();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$output = '';
|
||||
$message = PMA_message::error(
|
||||
@ -1365,7 +1365,7 @@ function PMA_RTN_handleExecute()
|
||||
. __('MySQL said: ') . PMA_DBI_getError(null)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Print/send output
|
||||
if ($GLOBALS['is_ajax_request']) {
|
||||
$response = PMA_Response::getInstance();
|
||||
@ -1449,7 +1449,7 @@ function PMA_RTN_handleExecute()
|
||||
function PMA_RTN_getExecuteForm($routine)
|
||||
{
|
||||
global $db, $cfg;
|
||||
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
|
||||
// Escape special characters
|
||||
|
||||
@ -64,7 +64,7 @@ function PMA_getHtmlForActionLinks($current_table, $table_is_view, $tbl_url_quer
|
||||
$empty_table .= ' href="sql.php?' . $tbl_url_query
|
||||
. '&sql_query=';
|
||||
$empty_table .= urlencode(
|
||||
'TRUNCATE ' . $common_functions->backquote($current_table['TABLE_NAME'])
|
||||
'TRUNCATE ' . $common_functions->backquote($current_table['TABLE_NAME'])
|
||||
);
|
||||
$empty_table .= '&message_to_show='
|
||||
. urlencode(
|
||||
|
||||
@ -146,7 +146,7 @@ function PMA_getTransformationDescription($file, $html_formatted = true)
|
||||
$class_name = $class_name[0];
|
||||
|
||||
// include and instantiate the class
|
||||
require_once 'libraries/plugins/transformations/' . $file;
|
||||
include_once 'libraries/plugins/transformations/' . $file;
|
||||
return $class_name::getInfo();
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation,
|
||||
$transformation = strtolower($transformation);
|
||||
$transformation = str_replace(".class.php", ".inc.php", $transformation);
|
||||
$last_pos = strrpos($transformation, "_");
|
||||
$transformation = substr($transformation , 0, $last_pos) . "_"
|
||||
$transformation = substr($transformation, 0, $last_pos) . "_"
|
||||
. substr($transformation, $last_pos);
|
||||
|
||||
$test_qry = '
|
||||
|
||||
14
po/pa.po
14
po/pa.po
@ -8,10 +8,10 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-08-28 14:48+0200\n"
|
||||
"PO-Revision-Date: 2012-08-25 06:45+0200\n"
|
||||
"PO-Revision-Date: 2012-08-30 16:42+0200\n"
|
||||
"Last-Translator: gurjit dhillon <dhillon616@gmail.com>\n"
|
||||
"Language-Team: Panjabi <http://l10n.cihar.com/projects/phpmyadmin/master/pa/"
|
||||
">\n"
|
||||
"Language-Team: Punjabi "
|
||||
"<http://l10n.cihar.com/projects/phpmyadmin/master/pa/>\n"
|
||||
"Language: pa\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@ -23,7 +23,7 @@ msgstr ""
|
||||
#: libraries/DisplayResults.class.php:816
|
||||
#: libraries/server_privileges.lib.php:2640
|
||||
msgid "Show all"
|
||||
msgstr "login"
|
||||
msgstr "ਸਾਰੇ ਦਿਖ਼ਾਓ"
|
||||
|
||||
#: browse_foreigners.php:77 libraries/CommonFunctions.class.php:2675
|
||||
#: libraries/PDF.class.php:50
|
||||
@ -32,7 +32,7 @@ msgstr "login"
|
||||
#: libraries/schema/User_Schema.class.php:417
|
||||
#: libraries/select_lang.lib.php:510
|
||||
msgid "Page number:"
|
||||
msgstr ""
|
||||
msgstr "ਪੰਨਾ ਨੰਬਰ"
|
||||
|
||||
#: browse_foreigners.php:94
|
||||
msgid ""
|
||||
@ -47,7 +47,7 @@ msgstr ""
|
||||
#: libraries/CommonFunctions.class.php:3665 libraries/Menu.class.php:264
|
||||
#: libraries/Menu.class.php:353
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
msgstr "ਲੱਭੋ"
|
||||
|
||||
#: browse_foreigners.php:171 gis_data_editor.php:304 js/messages.php:231
|
||||
#: libraries/DbSearch.class.php:479 libraries/DisplayResults.class.php:1666
|
||||
@ -85,7 +85,7 @@ msgstr ""
|
||||
#: tbl_tracking.php:497 tbl_tracking.php:639 view_create.php:221
|
||||
#: view_operations.php:96
|
||||
msgid "Go"
|
||||
msgstr ""
|
||||
msgstr "ਚੱਲੋ"
|
||||
|
||||
#: browse_foreigners.php:186 browse_foreigners.php:190
|
||||
#: libraries/Index.class.php:463 tbl_tracking.php:373
|
||||
|
||||
@ -4,8 +4,8 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-08-28 14:48+0200\n"
|
||||
"PO-Revision-Date: 2012-08-29 21:15+0200\n"
|
||||
"Last-Translator: Alexander Luiz Marinho <apaetmk@allva.com.br>\n"
|
||||
"PO-Revision-Date: 2012-08-30 13:47+0200\n"
|
||||
"Last-Translator: Guto Rocha <grgutorocha@gmail.com>\n"
|
||||
"Language-Team: Portuguese (Brazil) "
|
||||
"<http://l10n.cihar.com/projects/phpmyadmin/master/pt_BR/>\n"
|
||||
"Language: pt_BR\n"
|
||||
@ -10155,9 +10155,8 @@ msgid "subquery"
|
||||
msgstr "na consulta"
|
||||
|
||||
#: pmd_general.php:521 pmd_general.php:617
|
||||
#, fuzzy
|
||||
msgid "Rename to"
|
||||
msgstr "Renomear a tabela para "
|
||||
msgstr "Renomear para "
|
||||
|
||||
#: pmd_general.php:523 pmd_general.php:622
|
||||
#, fuzzy
|
||||
|
||||
8
sql.php
8
sql.php
@ -773,7 +773,7 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
|
||||
|| ($analyzed_sql[0]['querytype'] == 'DROP'))
|
||||
) {
|
||||
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
include_once 'libraries/transformations.lib.php';
|
||||
if ($analyzed_sql[0]['querytype'] == 'ALTER') {
|
||||
|
||||
if (stripos($analyzed_sql[0]['unsorted_query'], 'DROP') !== false) {
|
||||
@ -1275,8 +1275,8 @@ function PMA_getNewDatabase($sql, $databases)
|
||||
{
|
||||
$db = '';
|
||||
// loop through all the databases
|
||||
foreach ($databases as $database){
|
||||
if (strpos($sql,$database['SCHEMA_NAME']) !== false) {
|
||||
foreach ($databases as $database) {
|
||||
if (strpos($sql, $database['SCHEMA_NAME']) !== false) {
|
||||
$db = $database;
|
||||
break;
|
||||
}
|
||||
@ -1301,7 +1301,7 @@ function PMA_getTableNameBySQL($sql, $tables)
|
||||
|
||||
// loop through all the tables in the database
|
||||
foreach ($tables as $tbl) {
|
||||
if (strpos($sql,$tbl)) {
|
||||
if (strpos($sql, $tbl)) {
|
||||
$table .= ' ' . $tbl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -343,14 +343,17 @@ foreach ($rows as $row_id => $current_row) {
|
||||
$html_output .= ' <td>' . "\n";
|
||||
// Will be used by js/tbl_change.js to set the default value
|
||||
// for the "Continue insertion" feature
|
||||
$html_output .= '<span class="default_value hide">' . $special_chars . '</span>';
|
||||
$html_output .= '<span class="default_value hide">'
|
||||
. $special_chars . '</span>';
|
||||
|
||||
$html_output .= PMA_getValueColumn(
|
||||
$column, $backup_field, $column_name_appendix, $unnullify_trigger,$tabindex,
|
||||
$tabindex_for_value, $idindex, $data,$special_chars, $foreignData, $odd_row,
|
||||
$paramTableDbArray,$rownumber_param, $titles, $text_dir, $special_chars_encoded,
|
||||
$vkey,$is_upload, $biggest_max_file_size, $default_char_editing,
|
||||
$no_support_types, $gis_data_types, $extracted_columnspec);
|
||||
$column, $backup_field, $column_name_appendix, $unnullify_trigger,
|
||||
$tabindex, $tabindex_for_value, $idindex, $data, $special_chars,
|
||||
$foreignData, $odd_row, $paramTableDbArray, $rownumber_param, $titles,
|
||||
$text_dir, $special_chars_encoded, $vkey, $is_upload,
|
||||
$biggest_max_file_size, $default_char_editing,
|
||||
$no_support_types, $gis_data_types, $extracted_columnspec
|
||||
);
|
||||
|
||||
$html_output .= '</td>'
|
||||
. '</tr>';
|
||||
|
||||
@ -118,8 +118,7 @@ if (isset($_REQUEST['submitoptions'])) {
|
||||
) = PMA_setGlobalVariablesForEngine($tbl_storage_engine);
|
||||
|
||||
if ($is_aria) {
|
||||
$transactional =
|
||||
(isset($transactional) && $transactional == '0')
|
||||
$transactional = (isset($transactional) && $transactional == '0')
|
||||
? '0'
|
||||
: '1';
|
||||
$page_checksum = (isset($page_checksum)) ? $page_checksum : '';
|
||||
@ -325,8 +324,8 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
|
||||
($tbl_is_view
|
||||
? __('View %s has been dropped')
|
||||
: __('Table %s has been dropped')
|
||||
)
|
||||
, htmlspecialchars($table)
|
||||
),
|
||||
htmlspecialchars($table)
|
||||
),
|
||||
// table name is needed to avoid running
|
||||
// PMA_relationsCleanupDatabase() on the whole db later
|
||||
|
||||
@ -315,7 +315,7 @@ foreach ($fields as $row) {
|
||||
PMA_getHtmlTableStructureRow($row, $rownum, $checked,
|
||||
$displayed_field_name, $type_nowrap, $extracted_columnspec,
|
||||
$type_mime, $field_charset, $attribute, $tbl_is_view,
|
||||
$db_is_information_schema,$url_query, $field_encoded, $titles, $table
|
||||
$db_is_information_schema, $url_query, $field_encoded, $titles, $table
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -292,8 +292,8 @@ if (isset($_REQUEST['snapshot'])) {
|
||||
// Print SQL code
|
||||
echo $common_functions->getMessage(
|
||||
sprintf(
|
||||
__('Version %s snapshot (SQL code)')
|
||||
, htmlspecialchars($_REQUEST['version'])
|
||||
__('Version %s snapshot (SQL code)'),
|
||||
htmlspecialchars($_REQUEST['version'])
|
||||
),
|
||||
$drop_create_statements
|
||||
);
|
||||
|
||||
@ -135,7 +135,7 @@ class PMA_List_Database_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['LeftFrameDBSeparator'] = array('|',',');
|
||||
|
||||
$this->assertEquals(
|
||||
$this->object->getHtmlListGrouped(true,5,5),
|
||||
$this->object->getHtmlListGrouped(true, 5, 5),
|
||||
'<ul id="databaseList" lang="en" dir="ltr">
|
||||
</ul>'
|
||||
);
|
||||
|
||||
@ -79,9 +79,9 @@ class PMA_Theme_Manager_test extends PHPUnit_Framework_TestCase
|
||||
$this->assertNull(
|
||||
$tm->makeBc()
|
||||
);
|
||||
$this->assertEquals($GLOBALS['theme'],'pmahomme');
|
||||
$this->assertEquals($GLOBALS['pmaThemePath'],'./themes/pmahomme');
|
||||
$this->assertEquals($GLOBALS['pmaThemeImage'],'./themes/pmahomme/img/');
|
||||
$this->assertEquals($GLOBALS['theme'], 'pmahomme');
|
||||
$this->assertEquals($GLOBALS['pmaThemePath'], './themes/pmahomme');
|
||||
$this->assertEquals($GLOBALS['pmaThemeImage'], './themes/pmahomme/img/');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ class PMA_ThemeTest extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['PMA_Config']->enableBc();
|
||||
$GLOBALS['cfg']['SQP']['fmtColor'] = array('fake' => 'red');
|
||||
$GLOBALS['text_dir'] = 'ltr';
|
||||
require 'themes/pmahomme/layout.inc.php';
|
||||
include 'themes/pmahomme/layout.inc.php';
|
||||
$_SESSION[' PMA_token '] = 'token';
|
||||
$GLOBALS['lang'] = 'en';
|
||||
$GLOBALS['server'] = '99';
|
||||
@ -254,7 +254,7 @@ class PMA_ThemeTest extends PHPUnit_Framework_TestCase
|
||||
'14px'
|
||||
);
|
||||
|
||||
$GLOBALS['PMA_Config']->set('fontsize','12px');
|
||||
$GLOBALS['PMA_Config']->set('fontsize', '12px');
|
||||
$this->assertEquals(
|
||||
$this->object->getFontSize(),
|
||||
'12px'
|
||||
|
||||
@ -172,17 +172,20 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
|
||||
* @param type $image
|
||||
* @param type $output
|
||||
*
|
||||
*@dataProvider providerForPrepareRowAsPng
|
||||
* @dataProvider providerForPrepareRowAsPng
|
||||
* @return void
|
||||
*/
|
||||
public function testPrepareRowAsPng($spatial, $label, $line_color, $scale_data, $image, $output)
|
||||
{
|
||||
|
||||
$return = $this->object->prepareRowAsPng($spatial, $label, $line_color, $scale_data, $image);
|
||||
public function testPrepareRowAsPng($spatial, $label, $line_color,
|
||||
$scale_data, $image, $output
|
||||
) {
|
||||
$return = $this->object->prepareRowAsPng(
|
||||
$spatial, $label, $line_color, $scale_data, $image
|
||||
);
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
public function providerForPrepareRowAsPng(){
|
||||
|
||||
public function providerForPrepareRowAsPng()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'LINESTRING(12 35,48 75,69 23,25 45,14 53,35 78)',
|
||||
@ -194,10 +197,9 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
|
||||
'scale' => 2,
|
||||
'height' => 150
|
||||
),
|
||||
imagecreatetruecolor('120','150'),
|
||||
imagecreatetruecolor('120', '150'),
|
||||
''
|
||||
)
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
@ -209,17 +211,20 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
|
||||
* @param type $scale_data
|
||||
* @param type $pdf
|
||||
*
|
||||
*@dataProvider providerForPrepareRowAsPdf
|
||||
* @dataProvider providerForPrepareRowAsPdf
|
||||
* @return void
|
||||
*/
|
||||
public function testPrepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf)
|
||||
{
|
||||
|
||||
$return = $this->object->prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf);
|
||||
public function testPrepareRowAsPdf($spatial, $label, $line_color,
|
||||
$scale_data, $pdf
|
||||
) {
|
||||
$return = $this->object->prepareRowAsPdf(
|
||||
$spatial, $label, $line_color, $scale_data, $pdf
|
||||
);
|
||||
$this->assertTrue($return instanceof TCPDF);
|
||||
}
|
||||
|
||||
public function providerForPrepareRowAsPdf(){
|
||||
|
||||
public function providerForPrepareRowAsPdf()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'LINESTRING(12 35,48 75,69 23,25 45,14 53,35 78)',
|
||||
@ -244,18 +249,20 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
|
||||
* @param type $scale_data
|
||||
* @param type $output
|
||||
*
|
||||
*@dataProvider providerForPrepareRowAsSvg
|
||||
* @dataProvider providerForPrepareRowAsSvg
|
||||
* @return void
|
||||
*/
|
||||
public function testPrepareRowAsSvg($spatial, $label, $line_color, $scale_data, $output)
|
||||
{
|
||||
|
||||
$string = $this->object->prepareRowAsSvg($spatial, $label, $line_color, $scale_data);
|
||||
public function testPrepareRowAsSvg($spatial, $label, $line_color,
|
||||
$scale_data, $output
|
||||
) {
|
||||
$string = $this->object->prepareRowAsSvg(
|
||||
$spatial, $label, $line_color, $scale_data
|
||||
);
|
||||
$this->assertEquals(1, preg_match($output, $string));
|
||||
//$this->assertEquals($this->object->prepareRowAsSvg($spatial, $label, $line_color, $scale_data) , $output);
|
||||
}
|
||||
|
||||
public function providerForPrepareRowAsSvg(){
|
||||
|
||||
public function providerForPrepareRowAsSvg()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'LINESTRING(12 35,48 75,69 23,25 45,14 53,35 78)',
|
||||
@ -281,16 +288,22 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
|
||||
* @param type $scale_data
|
||||
* @param type $output
|
||||
*
|
||||
*@dataProvider providerForPrepareRowAsOl
|
||||
* @dataProvider providerForPrepareRowAsOl
|
||||
* @return void
|
||||
*/
|
||||
public function testPrepareRowAsOl($spatial, $srid, $label, $line_color, $scale_data, $output)
|
||||
{
|
||||
|
||||
$this->assertEquals($this->object->prepareRowAsOl($spatial, $srid, $label, $line_color, $scale_data) , $output);
|
||||
public function testPrepareRowAsOl($spatial, $srid, $label,
|
||||
$line_color, $scale_data, $output
|
||||
) {
|
||||
$this->assertEquals(
|
||||
$this->object->prepareRowAsOl(
|
||||
$spatial, $srid, $label, $line_color, $scale_data
|
||||
),
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
public function providerForPrepareRowAsOl(){
|
||||
|
||||
public function providerForPrepareRowAsOl()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'LINESTRING(12 35,48 75,69 23,25 45,14 53,35 78)',
|
||||
|
||||
@ -45,7 +45,7 @@ class PMA_bookmark_test extends PHPUnit_Framework_TestCase
|
||||
$GLOBALS['cfg']['Server']['bookmarktable'] = 'pma_bookmark';
|
||||
$GLOBALS['server'] = 1;
|
||||
|
||||
require_once 'libraries/bookmark.lib.php';
|
||||
include_once 'libraries/bookmark.lib.php';
|
||||
}
|
||||
/**
|
||||
* Test for PMA_Bookmark_getParams
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Tests for displaing results
|
||||
* Tests for displaying results
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
@ -12,16 +12,20 @@
|
||||
require_once 'libraries/zip_extension.lib.php';
|
||||
require_once 'libraries/php-gettext/gettext.inc';
|
||||
|
||||
class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
|
||||
|
||||
class PMA_zip_extension_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Test zip file content
|
||||
*
|
||||
* @param string $file zip file
|
||||
* @param string $specific_entry regular expression to match a file
|
||||
* @param $output
|
||||
* @param mixed $output expected output
|
||||
*
|
||||
* @dataProvider providerForTestGetZipContents
|
||||
* @return void
|
||||
*/
|
||||
public function testGetZipContents($file, $specific_entry, $output){
|
||||
public function testGetZipContents($file, $specific_entry, $output)
|
||||
{
|
||||
$this->assertEquals(
|
||||
PMA_getZipContents($file, $specific_entry),
|
||||
$output
|
||||
@ -30,8 +34,11 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
|
||||
|
||||
/**
|
||||
* Provider for testGetZipContents
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerForTestGetZipContents(){
|
||||
public function providerForTestGetZipContents()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'./test/test_data/test.zip',
|
||||
@ -53,13 +60,17 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Find file in Zip Archive
|
||||
*
|
||||
* @param string $file_regexp regular expression for the file name to match
|
||||
* @param string $file zip archive
|
||||
* @param $output
|
||||
* @param mixed $output expected output
|
||||
*
|
||||
* @dataProvider providerForTestFindFileFromZipArchive
|
||||
* @return void
|
||||
*/
|
||||
public function testFindFileFromZipArchive($file_regexp, $file, $output){
|
||||
public function testFindFileFromZipArchive($file_regexp, $file, $output)
|
||||
{
|
||||
$this->assertEquals(
|
||||
PMA_findFileFromZipArchive($file_regexp, $file),
|
||||
$output
|
||||
@ -68,8 +79,11 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
|
||||
|
||||
/**
|
||||
* Provider for testFindFileFromZipArchive
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function providerForTestFindFileFromZipArchive(){
|
||||
public function providerForTestFindFileFromZipArchive()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'/test/',
|
||||
@ -81,8 +95,11 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
|
||||
|
||||
/**
|
||||
* Test for PMA_getNoOfFilesInZip
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testGetNoOfFilesInZip(){
|
||||
public function testGetNoOfFilesInZip()
|
||||
{
|
||||
$this->assertEquals(
|
||||
PMA_getNoOfFilesInZip('./test/test_data/test.zip'),
|
||||
1
|
||||
@ -91,10 +108,15 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
|
||||
|
||||
/**
|
||||
* Test for PMA_zipExtract
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testZipExtract(){
|
||||
public function testZipExtract()
|
||||
{
|
||||
$this->assertEquals(
|
||||
PMA_zipExtract('./test/test_data/test.zip', './test/test_data/', 'wrongName'),
|
||||
PMA_zipExtract(
|
||||
'./test/test_data/test.zip', './test/test_data/', 'wrongName'
|
||||
),
|
||||
true
|
||||
);
|
||||
}
|
||||
@ -102,12 +124,14 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
|
||||
/**
|
||||
* Test for PMA_getZipError
|
||||
*
|
||||
* @param $code error code
|
||||
* @param $output
|
||||
* @param int $code error code
|
||||
* @param mixed $output expected output
|
||||
*
|
||||
* @dataProvider providerForTestGetZipError
|
||||
* @return void
|
||||
*/
|
||||
public function testGetZipError($code, $output){
|
||||
public function testGetZipError($code, $output)
|
||||
{
|
||||
$this->assertEquals(
|
||||
PMA_getZipError($code),
|
||||
$output
|
||||
@ -116,8 +140,11 @@ class PMA_zip_extension_test extends PHPUnit_Framework_TestCase {
|
||||
|
||||
/**
|
||||
* Provider for testGetZipError
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function providerForTestGetZipError(){
|
||||
public function providerForTestGetZipError()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
1,
|
||||
|
||||
@ -64,7 +64,7 @@ if (isset($_REQUEST['createview'])) {
|
||||
|
||||
if (PMA_DBI_try_query($sql_query)) {
|
||||
|
||||
require_once './libraries/tbl_views.lib.php';
|
||||
include_once './libraries/tbl_views.lib.php';
|
||||
|
||||
// If different column names defined for VIEW
|
||||
$view_columns = array();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user