Merge branch 'master' of github.com:phpmyadmin/phpmyadmin
This commit is contained in:
commit
2ff57f5d36
26
.github/ISSUE_TEMPLATE.md
vendored
Normal file
26
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
### Steps to reproduce
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
### Expected behaviour
|
||||
Tell us what should happen
|
||||
|
||||
### Actual behaviour
|
||||
Tell us what happens instead
|
||||
|
||||
### Server configuration
|
||||
**Operating system**:
|
||||
|
||||
**Web server:**
|
||||
|
||||
**Database:**
|
||||
|
||||
**PHP version:**
|
||||
|
||||
**phpMyAdmin version:**
|
||||
|
||||
### Client configuration
|
||||
**Browser:**
|
||||
|
||||
**Operating system:**
|
||||
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
Before submitting pull request, please check that every commit:
|
||||
|
||||
- [ ] Has proper Signed-Off-By
|
||||
- [ ] Has commit message which describes it
|
||||
- [ ] Is needed on it's own, if you have just minor fixes to previous commits, you can squash them
|
||||
@ -48,6 +48,8 @@ phpMyAdmin - ChangeLog
|
||||
- issue #11880 Fixed rendering of missing extension error
|
||||
- issue #11923 Errors on Structure tab when user only has select access on certain columns
|
||||
- issue #11972 Missing documentation for $cfg['Servers'][$i]['favorite'] and $cfg['NumFavoriteTables']
|
||||
- issue #11907 Avoid displaying UPDATE query twice
|
||||
- issue #11850 Fixed CSV import
|
||||
|
||||
4.5.5.0 (not yet released)
|
||||
- issue Undefined index: is_ajax_request
|
||||
|
||||
@ -41,7 +41,7 @@ Basic settings
|
||||
:type: string
|
||||
:default: ``''``
|
||||
|
||||
.. versionremoved:: 4.6.0
|
||||
.. deprecated:: 4.6.0
|
||||
|
||||
This setting is no longer available since phpMyAdmin 4.6.0. Please
|
||||
adjust your webserver instead.
|
||||
@ -1306,7 +1306,7 @@ Generic settings
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
.. versionremoved:: 4.6.0
|
||||
.. deprecated:: 4.6.0
|
||||
|
||||
This setting is no longer available since phpMyAdmin 4.6.0. Please
|
||||
adjust your webserver instead.
|
||||
|
||||
@ -627,6 +627,7 @@ A list of files and corresponding functionality which degrade gracefully when re
|
||||
* :file:`./setup/` (setup script)
|
||||
* :file:`./examples/`
|
||||
* :file:`./sql/` (SQL scripts to configure advanced functionality)
|
||||
* :file:`./js/openlayers/` (GIS visualization)
|
||||
|
||||
.. _faqconfig:
|
||||
|
||||
|
||||
@ -782,6 +782,8 @@ are always ways to make your installation more secure:
|
||||
* If you are afraid of automated attacks, enabling Captcha by
|
||||
:config:option:`$cfg['CaptchaLoginPublicKey']` and
|
||||
:config:option:`$cfg['CaptchaLoginPrivateKey']` might be an option.
|
||||
* Alternative approach might be using using fail2ban as phpMyAdmin logs failed
|
||||
authentication attempts to syslog (if available)
|
||||
|
||||
Known issues
|
||||
++++++++++++
|
||||
|
||||
12
import.php
12
import.php
@ -670,12 +670,16 @@ if (! empty($id_bookmark) && $_REQUEST['action_bookmark'] == 2) {
|
||||
htmlspecialchars($_POST['bkm_label'])
|
||||
);
|
||||
} elseif ($finished && ! $error) {
|
||||
if ($import_type == 'query') {
|
||||
$message = PMA\libraries\Message::success();
|
||||
} else {
|
||||
// Do not display the query with message, we do it separately
|
||||
$display_query = ';';
|
||||
if ($import_type != 'query') {
|
||||
$message = PMA\libraries\Message::success(
|
||||
'<em>'
|
||||
. __('Import has been successfully finished, %d queries executed.')
|
||||
. _ngettext(
|
||||
'Import has been successfully finished, %d query executed.',
|
||||
'Import has been successfully finished, %d queries executed.',
|
||||
$executed_queries
|
||||
)
|
||||
. '</em>'
|
||||
);
|
||||
$message->addParam($executed_queries);
|
||||
|
||||
@ -95,32 +95,14 @@ class Console
|
||||
$output .= '<div class="message welcome"><span>';
|
||||
$count_bookmarks = count($bookmarks);
|
||||
if ($count_bookmarks > 0) {
|
||||
$bookmarks_message = sprintf(
|
||||
$output .= sprintf(
|
||||
_ngettext(
|
||||
'Total %d bookmark',
|
||||
'Total %d bookmarks',
|
||||
'Showing %1$d bookmark (both private and shared)',
|
||||
'Showing %1$d bookmarks (both private and shared)',
|
||||
$count_bookmarks
|
||||
),
|
||||
$count_bookmarks
|
||||
);
|
||||
$private_message = sprintf(
|
||||
'<span class="bookmark_label">%1$s</span>',
|
||||
__('private')
|
||||
);
|
||||
$shared_message = sprintf(
|
||||
'<span class="bookmark_label shared">%1$s</span>',
|
||||
__('shared')
|
||||
);
|
||||
$output .= sprintf(
|
||||
/* l10n: First parameter will be replaced with the translation
|
||||
for Total and the number of bookmarks, second one with the
|
||||
translation for private and the third one, with the translation
|
||||
for shared */
|
||||
__('%1$s, %2$s and %3$s bookmarks included'),
|
||||
$bookmarks_message,
|
||||
$private_message,
|
||||
$shared_message
|
||||
);
|
||||
} else {
|
||||
$output .= __('No bookmarks');
|
||||
}
|
||||
|
||||
@ -1092,18 +1092,18 @@ class Util
|
||||
}
|
||||
}
|
||||
|
||||
$render_sql = $cfg['ShowSQL'] == true && ! empty($sql_query) && $sql_query !== ';';
|
||||
|
||||
if (isset($GLOBALS['using_bookmark_message'])) {
|
||||
$retval .= $GLOBALS['using_bookmark_message']->getDisplay();
|
||||
unset($GLOBALS['using_bookmark_message']);
|
||||
}
|
||||
|
||||
// In an Ajax request, $GLOBALS['cell_align_left'] may not be defined. Hence,
|
||||
// check for it's presence before using it
|
||||
$retval .= '<div class="result_query"'
|
||||
. ( isset($GLOBALS['cell_align_left'])
|
||||
? ' style="text-align: ' . $GLOBALS['cell_align_left'] . '"'
|
||||
: '' )
|
||||
. '>' . "\n";
|
||||
if ($render_sql) {
|
||||
$retval .= '<div class="result_query"'
|
||||
. ' style="text-align: ' . $GLOBALS['cell_align_left'] . '"'
|
||||
. '>' . "\n";
|
||||
}
|
||||
|
||||
if ($message instanceof Message) {
|
||||
if (isset($GLOBALS['special_message'])) {
|
||||
@ -1121,7 +1121,7 @@ class Util
|
||||
$retval .= '</div>';
|
||||
}
|
||||
|
||||
if ($cfg['ShowSQL'] == true && ! empty($sql_query) && $sql_query !== ';') {
|
||||
if ($render_sql) {
|
||||
// Html format the query to be displayed
|
||||
// If we want to show some sql code it is easiest to create it here
|
||||
/* SQL-Parser-Analyzer */
|
||||
@ -1342,9 +1342,10 @@ class Util
|
||||
$retval .= $inline_edit_link . $edit_link . $explain_link . $php_link
|
||||
. $refresh_link;
|
||||
$retval .= '</div>';
|
||||
|
||||
$retval .= '</div>';
|
||||
}
|
||||
|
||||
$retval .= '</div>';
|
||||
|
||||
return $retval;
|
||||
} // end of the 'getMessage()' function
|
||||
|
||||
@ -293,6 +293,11 @@ function PMA_analyseShowGrant()
|
||||
$GLOBALS['dbs_where_create_table_allowed']
|
||||
);
|
||||
PMA\libraries\Util::cacheSet('dbs_to_test', $GLOBALS['dbs_to_test']);
|
||||
|
||||
PMA\libraries\Util::cacheSet('proc_priv', $GLOBALS['proc_priv']);
|
||||
PMA\libraries\Util::cacheSet('table_priv', $GLOBALS['table_priv']);
|
||||
PMA\libraries\Util::cacheSet('col_priv', $GLOBALS['col_priv']);
|
||||
PMA\libraries\Util::cacheSet('db_priv', $GLOBALS['db_priv']);
|
||||
} // end function
|
||||
|
||||
$user = $GLOBALS['dbi']->fetchValue("SELECT CURRENT_USER();");
|
||||
|
||||
@ -974,6 +974,7 @@ $import_notice = null;
|
||||
* @param array &$analyses Analyses of the tables
|
||||
* @param array &$additional_sql Additional SQL statements to be executed
|
||||
* @param array $options Associative array of options
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
@ -981,7 +982,7 @@ $import_notice = null;
|
||||
* @link http://wiki.phpmyadmin.net/pma/Import
|
||||
*/
|
||||
function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
&$additional_sql = null, $options = null
|
||||
&$additional_sql = null, $options = null, &$sql_data
|
||||
) {
|
||||
/* Take care of the options */
|
||||
if (isset($options['db_collation'])&& ! is_null($options['db_collation'])) {
|
||||
@ -1021,7 +1022,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
/* Execute the SQL statements create above */
|
||||
$sql_len = count($sql);
|
||||
for ($i = 0; $i < $sql_len; ++$i) {
|
||||
PMA_importRunQuery($sql[$i], $sql[$i]);
|
||||
PMA_importRunQuery($sql[$i], $sql[$i], $sql_data);
|
||||
}
|
||||
|
||||
/* No longer needed */
|
||||
@ -1056,7 +1057,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
$additional_sql[$i]
|
||||
);
|
||||
/* Execute the resulting statements */
|
||||
PMA_importRunQuery($additional_sql[$i], $additional_sql[$i]);
|
||||
PMA_importRunQuery($additional_sql[$i], $additional_sql[$i], $sql_data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1108,7 +1109,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
* after it is formed so that we don't have
|
||||
* to store them in a (possibly large) buffer
|
||||
*/
|
||||
PMA_importRunQuery($tempSQLStr, $tempSQLStr);
|
||||
PMA_importRunQuery($tempSQLStr, $tempSQLStr, $sql_data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1199,7 +1200,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = null,
|
||||
* after it is formed so that we don't have
|
||||
* to store them in a (possibly large) buffer
|
||||
*/
|
||||
PMA_importRunQuery($tempSQLStr, $tempSQLStr);
|
||||
PMA_importRunQuery($tempSQLStr, $tempSQLStr, $sql_data);
|
||||
}
|
||||
|
||||
/* No longer needed */
|
||||
|
||||
@ -22,10 +22,12 @@ function PMA_logUser($user, $status = 'ok')
|
||||
apache_note('userID', $user);
|
||||
apache_note('userStatus', $status);
|
||||
}
|
||||
if (function_exists('syslog')) {
|
||||
if (function_exists('syslog') && $status != 'ok') {
|
||||
@openlog('phpMyAdmin', LOG_NDELAY | LOG_PID, LOG_AUTHPRIV);
|
||||
@syslog(
|
||||
LOG_AUTHPRIV,
|
||||
'phpMyAdmin: ' . $user . ' (' . $status . ') from ' . $_SERVER['REMOTE_ADDR']
|
||||
LOG_WARNING,
|
||||
'user denied: ' . $user . ' (' . $status . ') from ' .
|
||||
$_SERVER['REMOTE_ADDR']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,9 +90,11 @@ class ImportCsv extends AbstractImportCsv
|
||||
/**
|
||||
* Handles the whole import logic
|
||||
*
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function doImport()
|
||||
public function doImport(&$sql_data = array())
|
||||
{
|
||||
global $db, $table, $csv_terminated, $csv_enclosed, $csv_escaped,
|
||||
$csv_new_line, $csv_columns, $err_url;
|
||||
@ -569,7 +571,7 @@ class ImportCsv extends AbstractImportCsv
|
||||
* @todo maybe we could add original line to verbose
|
||||
* SQL in comment
|
||||
*/
|
||||
PMA_importRunQuery($sql, $sql);
|
||||
PMA_importRunQuery($sql, $sql, $sql_data);
|
||||
}
|
||||
|
||||
$line++;
|
||||
@ -645,14 +647,14 @@ class ImportCsv extends AbstractImportCsv
|
||||
$create = null;
|
||||
|
||||
/* Created and execute necessary SQL statements from data */
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options, $sql_data);
|
||||
|
||||
unset($tables);
|
||||
unset($analyses);
|
||||
}
|
||||
|
||||
// Commit any possible data in buffers
|
||||
PMA_importRunQuery();
|
||||
PMA_importRunQuery('', '', $sql_data);
|
||||
|
||||
if (count($values) != 0 && !$error) {
|
||||
$message = PMA\libraries\Message::error(
|
||||
|
||||
@ -90,9 +90,11 @@ class ImportLdi extends AbstractImportCsv
|
||||
/**
|
||||
* Handles the whole import logic
|
||||
*
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function doImport()
|
||||
public function doImport(&$sql_data = array())
|
||||
{
|
||||
global $finished, $import_file, $compression, $charset_conversion, $table;
|
||||
global $ldi_local_option, $ldi_replace, $ldi_ignore, $ldi_terminated,
|
||||
@ -164,8 +166,8 @@ class ImportLdi extends AbstractImportCsv
|
||||
$sql .= ')';
|
||||
}
|
||||
|
||||
PMA_importRunQuery($sql, $sql);
|
||||
PMA_importRunQuery();
|
||||
PMA_importRunQuery($sql, $sql, $sql_data);
|
||||
PMA_importRunQuery('', '', $sql_data);
|
||||
$finished = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,9 +61,11 @@ class ImportMediawiki extends ImportPlugin
|
||||
/**
|
||||
* Handles the whole import logic
|
||||
*
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function doImport()
|
||||
public function doImport(&$sql_data = array())
|
||||
{
|
||||
global $error, $timeout_passed, $finished;
|
||||
|
||||
@ -231,7 +233,7 @@ class ImportMediawiki extends ImportPlugin
|
||||
);
|
||||
|
||||
// Import the current table data into the database
|
||||
$this->_importDataOneTable($current_table);
|
||||
$this->_importDataOneTable($current_table, $sql_data);
|
||||
|
||||
// Reset table name
|
||||
$cur_table_name = "";
|
||||
@ -282,18 +284,20 @@ class ImportMediawiki extends ImportPlugin
|
||||
/**
|
||||
* Imports data from a single table
|
||||
*
|
||||
* @param array $table containing all table info:
|
||||
* <code>
|
||||
* $table[0] - string containing table name
|
||||
* $table[1] - array[] of table headers
|
||||
* $table[2] - array[][] of table content rows
|
||||
* </code>
|
||||
* @param array $table containing all table info:
|
||||
* <code>
|
||||
* $table[0] - string containing table name
|
||||
* $table[1] - array[] of table headers
|
||||
* $table[2] - array[][] of table content rows
|
||||
* </code>
|
||||
*
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @global bool $analyze whether to scan for column types
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _importDataOneTable($table)
|
||||
private function _importDataOneTable($table, &$sql_data)
|
||||
{
|
||||
$analyze = $this->_getAnalyze();
|
||||
if ($analyze) {
|
||||
@ -311,11 +315,11 @@ class ImportMediawiki extends ImportPlugin
|
||||
$analyses = array();
|
||||
$analyses [] = PMA_analyzeTable($tables[0]);
|
||||
|
||||
$this->_executeImportTables($tables, $analyses);
|
||||
$this->_executeImportTables($tables, $analyses, $sql_data);
|
||||
}
|
||||
|
||||
// Commit any possible data in buffers
|
||||
PMA_importRunQuery();
|
||||
PMA_importRunQuery('', '', $sql_data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -368,12 +372,13 @@ class ImportMediawiki extends ImportPlugin
|
||||
* $analyses = array(
|
||||
* array(array() column_types, array() column_sizes)
|
||||
* )
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @global string $db name of the database to import in
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _executeImportTables(&$tables, &$analyses)
|
||||
private function _executeImportTables(&$tables, &$analyses, &$sql_data)
|
||||
{
|
||||
global $db;
|
||||
|
||||
@ -387,7 +392,7 @@ class ImportMediawiki extends ImportPlugin
|
||||
$create = null;
|
||||
|
||||
// Create and execute necessary SQL statements from data
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options, $sql_data);
|
||||
|
||||
unset($tables);
|
||||
unset($analyses);
|
||||
|
||||
@ -95,9 +95,11 @@ class ImportOds extends ImportPlugin
|
||||
/**
|
||||
* Handles the whole import logic
|
||||
*
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function doImport()
|
||||
public function doImport(&$sql_data = array())
|
||||
{
|
||||
global $db, $error, $timeout_passed, $finished;
|
||||
|
||||
@ -371,13 +373,13 @@ class ImportOds extends ImportPlugin
|
||||
$create = null;
|
||||
|
||||
/* Created and execute necessary SQL statements from data */
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options, $sql_data);
|
||||
|
||||
unset($tables);
|
||||
unset($analyses);
|
||||
|
||||
/* Commit any possible data in buffers */
|
||||
PMA_importRunQuery();
|
||||
PMA_importRunQuery('', '', $sql_data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -57,9 +57,11 @@ class ImportShp extends ImportPlugin
|
||||
/**
|
||||
* Handles the whole import logic
|
||||
*
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function doImport()
|
||||
public function doImport(&$sql_data = array())
|
||||
{
|
||||
global $db, $error, $finished, $compression,
|
||||
$import_file, $local_import_file, $message;
|
||||
@ -287,7 +289,7 @@ class ImportShp extends ImportPlugin
|
||||
|
||||
// Created and execute necessary SQL statements from data
|
||||
$null_param = null;
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $null_param, $options);
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $null_param, $options, $sql_data);
|
||||
|
||||
unset($tables);
|
||||
unset($analyses);
|
||||
@ -296,7 +298,7 @@ class ImportShp extends ImportPlugin
|
||||
$error = false;
|
||||
|
||||
// Commit any possible data in buffers
|
||||
PMA_importRunQuery();
|
||||
PMA_importRunQuery('', '', $sql_data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -52,9 +52,11 @@ class ImportXml extends ImportPlugin
|
||||
/**
|
||||
* Handles the whole import logic
|
||||
*
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function doImport()
|
||||
public function doImport(&$sql_data = array())
|
||||
{
|
||||
global $error, $timeout_passed, $finished, $db;
|
||||
|
||||
@ -355,13 +357,13 @@ class ImportXml extends ImportPlugin
|
||||
}
|
||||
|
||||
/* Created and execute necessary SQL statements from data */
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options, $sql_data);
|
||||
|
||||
unset($analyses);
|
||||
unset($tables);
|
||||
unset($create);
|
||||
|
||||
/* Commit any possible data in buffers */
|
||||
PMA_importRunQuery();
|
||||
PMA_importRunQuery('', '', $sql_data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,9 +96,11 @@ class Import[Name] extends PMA\libraries\plugins\ImportPlugin
|
||||
/**
|
||||
* Handles the whole import logic
|
||||
*
|
||||
* @param array &$sql_data 2-element array with sql data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function doImport()
|
||||
public function doImport(&$sql_data = array())
|
||||
{
|
||||
// get globals (others are optional)
|
||||
global $error, $timeout_passed, $finished;
|
||||
@ -117,10 +119,10 @@ class Import[Name] extends PMA\libraries\plugins\ImportPlugin
|
||||
$buffer .= $data;
|
||||
}
|
||||
// PARSE $buffer here, post sql queries using:
|
||||
PMA_importRunQuery($sql, $verbose_sql_with_comments);
|
||||
PMA_importRunQuery($sql, $verbose_sql_with_comments, $sql_data);
|
||||
} // End of import loop
|
||||
// Commit any possible data in buffers
|
||||
PMA_importRunQuery();
|
||||
PMA_importRunQuery('', '', $sql_data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
1456
po/be@latin.po
1456
po/be@latin.po
File diff suppressed because it is too large
Load Diff
1444
po/en_GB.po
1444
po/en_GB.po
File diff suppressed because it is too large
Load Diff
1427
po/phpmyadmin.pot
1427
po/phpmyadmin.pot
File diff suppressed because it is too large
Load Diff
1467
po/pt_BR.po
1467
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1448
po/sr@latin.po
1448
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
1448
po/uz@latin.po
1448
po/uz@latin.po
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user