Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
773dd2fac5
@ -97,7 +97,7 @@ if (! empty($sql_query)) {
|
||||
'/^(CREATE|ALTER)\s+(VIEW|TABLE|DATABASE|SCHEMA)\s+/i',
|
||||
$sql_query
|
||||
)) {
|
||||
$ajax_reload['reload'] = true;
|
||||
$ajax_reload = array('reload' => true);
|
||||
}
|
||||
|
||||
// do a dynamic reload if table is RENAMED
|
||||
@ -107,8 +107,8 @@ if (! empty($sql_query)) {
|
||||
$sql_query,
|
||||
$rename_table_names
|
||||
)) {
|
||||
$ajax_reload = array('reload' => true);
|
||||
$ajax_reload['table_name'] = PMA_Util::unQuote($rename_table_names[2]);
|
||||
$ajax_reload['reload'] = true;
|
||||
}
|
||||
|
||||
$sql_query = '';
|
||||
@ -299,6 +299,9 @@ if (! empty($id_bookmark)) {
|
||||
$import_text
|
||||
)
|
||||
) {
|
||||
if (! isset($ajax_reload)) {
|
||||
$ajax_reload = array();
|
||||
}
|
||||
$ajax_reload['reload'] = true;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -87,15 +87,15 @@ class PMA_Console
|
||||
{
|
||||
$output = '';
|
||||
$cfgBookmark = PMA_Bookmark_getParams();
|
||||
if($cfgBookmark) {
|
||||
if ($cfgBookmark) {
|
||||
|
||||
$tpl_bookmark_actions =
|
||||
'<span class="action collapse">' . __('Collapse') . '</span> '
|
||||
. '<span class="action expand">' . __('Expand') . '</span> '
|
||||
. '<span class="action requery">' . __('Requery') . '</span> '
|
||||
. '<span class="action reedit">' . __('Reedit') . '</span> '
|
||||
$tpl_bookmark_actions
|
||||
= '<span class="action collapse">' . __('Collapse') . '</span> '
|
||||
. '<span class="action expand">' . __('Expand') . '</span> '
|
||||
. '<span class="action requery">' . __('Requery') . '</span> '
|
||||
. '<span class="action reedit">' . __('Reedit') . '</span> '
|
||||
// . '<span class="action bookmark">' . __('Delete') . '</span> '
|
||||
. '<span class="text targetdb">' . __('Database') . ': <span>%s</span></span>';
|
||||
. '<span class="text targetdb">' . __('Database') . ': <span>%s</span></span>';
|
||||
|
||||
$bookmarks = PMA_Bookmark_getList();
|
||||
$output .= '<div class="message welcome"><span>'
|
||||
@ -129,7 +129,7 @@ class PMA_Console
|
||||
public function getDisplay()
|
||||
{
|
||||
$output = '';
|
||||
if((! $this->_isAjax) && $this->_isEnabled) {
|
||||
if ((! $this->_isAjax) && $this->_isEnabled) {
|
||||
$cfgBookmark = PMA_Bookmark_getParams();
|
||||
$this->_scripts->addFile('codemirror/lib/codemirror.js');
|
||||
$this->_scripts->addFile('codemirror/mode/sql/sql.js');
|
||||
@ -141,15 +141,15 @@ class PMA_Console
|
||||
// The templates, use sprintf() to output them
|
||||
// There're white space at the end of every <span>,
|
||||
// for double-click selection
|
||||
$tpl_query_actions =
|
||||
'<span class="action collapse">' . __('Collapse') . '</span> '
|
||||
. '<span class="action expand">' . __('Expand') . '</span> '
|
||||
. '<span class="action requery">' . __('Requery') . '</span> '
|
||||
. '<span class="action reedit">' . __('Reedit') . '</span> '
|
||||
$tpl_query_actions
|
||||
= '<span class="action collapse">' . __('Collapse') . '</span> '
|
||||
. '<span class="action expand">' . __('Expand') . '</span> '
|
||||
. '<span class="action requery">' . __('Requery') . '</span> '
|
||||
. '<span class="action reedit">' . __('Reedit') . '</span> '
|
||||
// . ($cfgBookmark ? '<span class="action bookmark">' . __('Bookmark') . '</span> ' : '')
|
||||
. '<span class="text failed">' . __('Query failed') . '</span> '
|
||||
. '<span class="text targetdb">' . __('Database') . ': <span>%s</span></span> '
|
||||
. '<span class="text query_time">' . __('Queried time') . ': <span>%s</span></span> ';
|
||||
. '<span class="text failed">' . __('Query failed') . '</span> '
|
||||
. '<span class="text targetdb">' . __('Database') . ': <span>%s</span></span> '
|
||||
. '<span class="text query_time">' . __('Queried time') . ': <span>%s</span></span> ';
|
||||
|
||||
// Console toolbar
|
||||
$output .= '<div class="toolbar collapsed">';
|
||||
@ -167,7 +167,7 @@ class PMA_Console
|
||||
$output .= '<div class="button options"><span>'
|
||||
. __('Options') . '</span></div>';
|
||||
|
||||
if($cfgBookmark) {
|
||||
if ($cfgBookmark) {
|
||||
$output .= '<div class="button bookmarks"><span>'
|
||||
. __('Bookmarks') . '</span></div>';
|
||||
}
|
||||
@ -183,16 +183,22 @@ class PMA_Console
|
||||
|
||||
// History support
|
||||
$_sql_history = PMA_getHistory($GLOBALS['cfg']['Server']['user']);
|
||||
if($_sql_history) {
|
||||
if ($_sql_history) {
|
||||
foreach (array_reverse($_sql_history) as $record) {
|
||||
$output .= '<div class="message history collapsed hide" targetdb="'
|
||||
. $record['db'] . '" targettable="' . $record['table']
|
||||
. '""><div class="action_content">'
|
||||
. sprintf($tpl_query_actions, $record['db'],
|
||||
(isset($record['timevalue']) ? $record['timevalue'] : __('During current session')))
|
||||
. '</div><span class="query">'
|
||||
. $record['sqlquery']
|
||||
. '</span></div>';
|
||||
. $record['db'] . '" targettable="' . $record['table']
|
||||
. '""><div class="action_content">'
|
||||
. sprintf(
|
||||
$tpl_query_actions,
|
||||
$record['db'],
|
||||
(isset($record['timevalue'])
|
||||
? $record['timevalue']
|
||||
: __('During current session')
|
||||
)
|
||||
)
|
||||
. '</div><span class="query">'
|
||||
. $record['sqlquery']
|
||||
. '</span></div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,7 +211,7 @@ class PMA_Console
|
||||
|
||||
// Bookmarks card:
|
||||
|
||||
if($cfgBookmark) {
|
||||
if ($cfgBookmark) {
|
||||
$output .= '<div class="card" id="pma_bookmarks">';
|
||||
$output .= '<div class="toolbar">'
|
||||
. '<div class="switch_button"><span>' . __('Bookmarks')
|
||||
|
||||
@ -118,7 +118,7 @@ class PMA_DbQbe
|
||||
* Minimum width of a column
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
* @var int
|
||||
*/
|
||||
private $_form_column_width;
|
||||
/**
|
||||
|
||||
@ -20,7 +20,7 @@ class PMA_Menu
|
||||
* Server id
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
* @var int
|
||||
*/
|
||||
private $_server;
|
||||
/**
|
||||
|
||||
@ -86,7 +86,7 @@ class PMA_Response
|
||||
* Workaround for PHP bug
|
||||
*
|
||||
* @access private
|
||||
* @var bool
|
||||
* @var string|bool
|
||||
*/
|
||||
private $_CWD;
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ class ConfigFile
|
||||
|
||||
/**
|
||||
* Result for {@link _flattenArray()}
|
||||
* @var array
|
||||
* @var array|null
|
||||
*/
|
||||
private $_flattenArrayResult;
|
||||
|
||||
|
||||
@ -240,7 +240,7 @@ class ExportPdf extends ExportPlugin
|
||||
/**
|
||||
* Instantiates the PMA_ExportPdf class
|
||||
*
|
||||
* @param string $pdf PMA_ExportPdf instance
|
||||
* @param PMA_ExportPdf $pdf The instance
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@ -958,7 +958,7 @@ function PMA_getHistory($username)
|
||||
* history, use it
|
||||
*/
|
||||
if (! $GLOBALS['cfg']['QueryHistoryDB']) {
|
||||
if(isset($_SESSION['sql_history'])) {
|
||||
if (isset($_SESSION['sql_history'])) {
|
||||
return array_reverse($_SESSION['sql_history']);
|
||||
}
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user