Merge remote-tracking branch 'origin/master'

This commit is contained in:
Hugues Peccatte 2015-11-21 14:59:47 +01:00
commit 3afe570435
137 changed files with 108682 additions and 108121 deletions

View File

@ -11,6 +11,17 @@ phpMyAdmin - ChangeLog
- issue Tracking does not make sense for information_schema
- issue #11550 Regression in Find and replace
+ issue #11619 TokuDB Tables Show Size as "unknown"
+ issue #11654 Use a slider for Internal relations
+ issue #11641 Ability to disable the navigationhiding Feature
- issue #11647 Restrict configuration NavigationTreeDbSeparator to strings
- issue #11667 Disable the tooltip in the navigation panel's filter box
+ issue Copy results to clipboard
4.5.3.0 (not yet released)
- issue #11664 Online syntax verifier bug - "IF" on SELECT statement
- issue #11665 Format breaks query with COUNT()
- issue Undefinex index: SendErrorReports
- issue Incorrect script name in include
4.5.2.0 (not yet released)
- issue #11589 Incorrect parameter in mysqli_fetch_fields()
@ -33,6 +44,14 @@ phpMyAdmin - ChangeLog
- issue Profiling checkbox is missing
- issue #11642 Properly handle session expiry after POST requests
- issue #11648 Notice in ./export.php#214 Undefined index: quick_or_custom
- issue #11646 Unrecognized keywords
- issue #11635 Sql not executed properly
- issue #11631 Linter warnings when creating new user
- issue #11626 wrong row count for query results
- issue #11608 Analyzer doesn't recognize GRANT statements
- issue #11602 Parser warnings (subqueries)
- issue #11658 Collation column is empty in table Structure
- issue #11661 Error changing table's column encoding
4.5.1.0 (2015-10-23)
- issue Invalid argument supplied for foreach()

View File

@ -26,9 +26,6 @@ Code status
:alt: Buildtime Trend badge
:target: https://buildtimetrend.herokuapp.com/dashboard/phpmyadmin/phpmyadmin
.. image:: https://img.shields.io/sourceforge/dm/phpmyadmin.svg
:target: https://www.phpmyadmin.net/downloads/
Download
--------

View File

@ -139,6 +139,8 @@ if (! $result) {
. urlencode($current['SCHEMA_NAME'])
);
} else {
include_once '' . $cfg['DefaultTabDatabase'];
include_once '' . PMA_Util::getScriptNameForOption(
$GLOBALS['cfg']['DefaultTabDatabase'], 'database'
);
}
}

View File

@ -8,7 +8,7 @@
namespace PMA;
use PMA\libraries\controllers\DatabaseStructureController;
use PMA\libraries\controllers\database\DatabaseStructureController;
use PMA\libraries\Response;
use PMA\libraries\Util;
@ -28,10 +28,10 @@ list(
) = Util::getDbInfo($GLOBALS['db'], isset($sub_part) ? $sub_part : '');
$container = libraries\di\Container::getDefaultContainer();
$container->factory('PMA\libraries\controllers\DatabaseStructureController');
$container->factory('PMA\libraries\controllers\database\DatabaseStructureController');
$container->alias(
'DatabaseStructureController',
'PMA\libraries\controllers\DatabaseStructureController'
'PMA\libraries\controllers\database\DatabaseStructureController'
);
$container->set('PMA\libraries\Response', Response::getInstance());
$container->alias('response', 'PMA\libraries\Response');

View File

@ -502,7 +502,7 @@ Server connection settings
.. _bookmark:
.. config:option:: $cfg['Servers'][$i]['bookmarktable']
:type: string
:type: string or false
:default: ``''``
Since release 2.2.0 phpMyAdmin allows users to bookmark queries. This
@ -512,11 +512,12 @@ Server connection settings
* set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
* enter the table name in :config:option:`$cfg['Servers'][$i]['bookmarktable']`
This feature can be disabled by setting the configuration to ``false``.
.. _relation:
.. config:option:: $cfg['Servers'][$i]['relation']
:type: string
:type: string or false
:default: ``''``
Since release 2.2.4 you can describe, in a special 'relation' table,
@ -546,6 +547,8 @@ Server connection settings
where you want to use this feature, click :guilabel:`Structure/Relation view/`
and choose foreign columns.
This feature can be disabled by setting the configuration to ``false``.
.. note::
In the current version, ``master_db`` must be the same as ``foreign_db``.
@ -555,7 +558,7 @@ Server connection settings
.. _table_info:
.. config:option:: $cfg['Servers'][$i]['table_info']
:type: string
:type: string or false
:default: ``''``
Since release 2.3.0 you can describe, in a special 'table\_info'
@ -571,17 +574,19 @@ Server connection settings
"Structure/Relation view/Choose column to display" to choose the
column.
This feature can be disabled by setting the configuration to ``false``.
.. seealso:: :ref:`faqdisplay`
.. _table_coords:
.. config:option:: $cfg['Servers'][$i]['table_coords']
:type: string
:type: string or false
:default: ``''``
.. config:option:: $cfg['Servers'][$i]['pdf_pages']
:type: string
:type: string or false
:default: ``''``
Since release 2.3.0 you can have phpMyAdmin create :term:`PDF` pages
@ -598,12 +603,14 @@ Server connection settings
:config:option:`$cfg['Servers'][$i]['table\_coords']` and
:config:option:`$cfg['Servers'][$i]['pdf\_pages']`
This feature can be disabled by setting either of the configurations to ``false``.
.. seealso:: :ref:`faqpdf`.
.. _col_com:
.. config:option:: $cfg['Servers'][$i]['column_info']
:type: string
:type: string or false
:default: ``''``
This part requires a content update! Since release 2.3.0 you can
@ -651,6 +658,8 @@ Server connection settings
* to update your PRE-4.3.0 Column\_info table manually use this
``./sql/upgrade_column_info_4_3_0+.sql`` SQL script.
This feature can be disabled by setting the configuration to ``false``.
.. note::
For auto-upgrade functionality to work, your
@ -662,7 +671,7 @@ Server connection settings
.. _history:
.. config:option:: $cfg['Servers'][$i]['history']
:type: string
:type: string or false
:default: ``''``
Since release 2.5.0 you can store your :term:`SQL` history, which means all
@ -684,10 +693,12 @@ Server connection settings
* put the table name in :config:option:`$cfg['Servers'][$i]['history']` (e.g.
``pma__history``)
This feature can be disabled by setting the configuration to ``false``.
.. _recent:
.. config:option:: $cfg['Servers'][$i]['recent']
:type: string
:type: string or false
:default: ``''``
Since release 3.5.0 you can show recently used tables in the
@ -707,10 +718,12 @@ Server connection settings
* put the table name in :config:option:`$cfg['Servers'][$i]['recent']` (e.g.
``pma__recent``)
This feature can be disabled by setting the configuration to ``false``.
.. _table_uiprefs:
.. config:option:: $cfg['Servers'][$i]['table_uiprefs']
:type: string
:type: string or false
:default: ``''``
Since release 3.5.0 phpMyAdmin can be configured to remember several
@ -725,15 +738,17 @@ Server connection settings
* put the table name in :config:option:`$cfg['Servers'][$i]['table\_uiprefs']` (e.g.
``pma__table_uiprefs``)
This feature can be disabled by setting the configuration to ``false``.
.. _configurablemenus:
.. config:option:: $cfg['Servers'][$i]['users']
:type: string
:type: string or false
:default: ``''``
.. config:option:: $cfg['Servers'][$i]['usergroups']
:type: string
:type: string or false
:default: ``''``
Since release 4.1.0 you can create different user groups with menu items
@ -749,10 +764,12 @@ Server connection settings
:config:option:`$cfg['Servers'][$i]['users']` (e.g. ``pma__users``) and
:config:option:`$cfg['Servers'][$i]['usergroups']` (e.g. ``pma__usergroups``)
This feature can be disabled by setting either of the configurations to ``false``.
.. _navigationhiding:
.. config:option:: $cfg['Servers'][$i]['navigationhiding']
:type: string
:type: string or false
:default: ``''``
Since release 4.1.0 you can hide/show items in the navigation tree.
@ -763,10 +780,12 @@ Server connection settings
* put the table name in :config:option:`$cfg['Servers'][$i]['navigationhiding']` (e.g.
``pma__navigationhiding``)
This feature can be disabled by setting the configuration to ``false``.
.. _central_columns:
.. config:option:: $cfg['Servers'][$i]['central_columns']
:type: string
:type: string or false
:default: ``''``
Since release 4.3.0 you can have a central list of columns per database.
@ -782,10 +801,12 @@ Server connection settings
* put the table name in :config:option:`$cfg['Servers'][$i]['central_columns']` (e.g.
``pma__central_columns``)
This feature can be disabled by setting the configuration to ``false``.
.. _designer_settings:
.. config:option:: $cfg['Servers'][$i]['designer_settings']
:type: string
:type: string or false
:default: ``''``
Since release 4.5.0 your designer settings can be remembered.
@ -798,10 +819,12 @@ Server connection settings
* put the table name in :config:option:`$cfg['Servers'][$i]['designer_settings']` (e.g.
``pma__designer_settings``)
This feature can be disabled by setting the configuration to ``false``.
.. _savedsearches:
.. config:option:: $cfg['Servers'][$i]['savedsearches']
:type: string
:type: string or false
:default: ``''``
Since release 4.2.0 you can save and load query-by-example searches from the Database > Query panel.
@ -812,10 +835,12 @@ Server connection settings
* put the table name in :config:option:`$cfg['Servers'][$i]['savedsearches']` (e.g.
``pma__savedsearches``)
This feature can be disabled by setting the configuration to ``false``.
.. _export_templates:
.. config:option:: $cfg['Servers'][$i]['export_templates']
:type: string
:type: string or false
:default: ``''``
Since release 4.5.0 you can save and load export templates.
@ -826,10 +851,12 @@ Server connection settings
* put the table name in :config:option:`$cfg['Servers'][$i]['export_templates']` (e.g.
``pma__export_templates``)
This feature can be disabled by setting the configuration to ``false``.
.. _tracking:
.. config:option:: $cfg['Servers'][$i]['tracking']
:type: string
:type: string or false
:default: ``''``
Since release 3.3.x a tracking mechanism is available. It helps you to
@ -858,6 +885,7 @@ Server connection settings
* put the table name in :config:option:`$cfg['Servers'][$i]['tracking']` (e.g.
``pma__tracking``)
This feature can be disabled by setting the configuration to ``false``.
.. _tracking2:
.. config:option:: $cfg['Servers'][$i]['tracking_version_auto_create']
@ -915,7 +943,7 @@ Server connection settings
.. _userconfig:
.. config:option:: $cfg['Servers'][$i]['userconfig']
:type: string
:type: string or false
:default: ``''``
Since release 3.4.x phpMyAdmin allows users to set most preferences by
@ -931,6 +959,8 @@ Server connection settings
* set up :config:option:`$cfg['Servers'][$i]['pmadb']` and the phpMyAdmin configuration storage
* put the table name in :config:option:`$cfg['Servers'][$i]['userconfig']`
This feature can be disabled by setting the configuration to ``false``.
.. config:option:: $cfg['Servers'][$i]['MaxTableUiprefs']
:type: integer
@ -1507,12 +1537,11 @@ Navigation panel setup
.. config:option:: $cfg['NavigationTreeDbSeparator']
:type: string or array
:type: string
:default: ``'_'``
The string used to separate the parts of the database name when
showing them in a tree. Alternatively you can specify more strings in
an array and all of them will be used as a separator.
showing them in a tree.
.. config:option:: $cfg['NavigationTreeTableSeparator']
@ -2276,130 +2305,8 @@ Web server settings
Theme settings
--------------
.. config:option:: $cfg['NaviWidth']
:type: integer
:default:
Navigation panel width in pixels. See
:file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['NaviBackground']
:type: string [CSS color for background]
:default:
.. config:option:: $cfg['MainBackground']
:type: string [CSS color for background]
:default:
The background styles used for both the frames. See
:file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['NaviPointerBackground']
:type: string [CSS color for background]
:default:
.. config:option:: $cfg['NaviPointerColor']
:type: string [CSS color]
:default:
The style used for the pointer in the navigation panel. See
:file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['Border']
:type: integer
:default:
The size of a table's border. See :file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['ThBackground']
:type: string [CSS color for background]
:default:
.. config:option:: $cfg['ThColor']
:type: string [CSS color]
:default:
The style used for table headers. See
:file:`themes/themename/layout.inc.php`.
.. _cfg_BgcolorOne:
.. config:option:: $cfg['BgOne']
:type: string [CSS color]
:default:
The color (HTML) #1 for table rows. See
:file:`themes/themename/layout.inc.php`.
.. _cfg_BgcolorTwo:
.. config:option:: $cfg['BgTwo']
:type: string [CSS color]
:default:
The color (HTML) #2 for table rows. See
:file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['BrowsePointerBackground']
:type: string [CSS color]
:default:
The background color used when hovering over a row in the Browse panel.
See :file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['BrowsePointerColor']
:type: string [CSS color]
:default:
The text color used when hovering over a row in the Browse panel.
Used when :config:option:`$cfg['BrowsePointerEnable']` is true.
See :file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['BrowseMarkerBackground']
:type: string [CSS color]
:default:
The background color used to highlight a row selected by checkbox in the Browse panel or
when a column is selected.
Used when :config:option:`$cfg['BrowsePointerEnable']` is true.
See :file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['BrowseMarkerColor']
:type: string [CSS color]
:default:
The color used when you visually mark a row or column in the Browse panel.
Rows can be marked by clicking the checkbox to the left of the row and columns can be
marked by clicking the column's header (outside of the header text).
See :file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['FontFamily']
:type: string
:default:
You put here a valid CSS font family value, for example ``arial, sans-
serif``. See :file:`themes/themename/layout.inc.php`.
.. config:option:: $cfg['FontFamilyFixed']
:type: string
:default:
You put here a valid CSS font family value, for example ``monospace``.
This one is used in textarea. See :file:`themes/themename/layout.inc.php`.
Please directly modify :file:`themes/themename/layout.inc.php`, although
your changes will be overwritten with the next update.
Design customization
--------------------

View File

@ -332,14 +332,14 @@ AJAX.registerOnload('db_structure.js', function () {
}); //end of Drop Table Ajax action
/**
* Attach Event Handler for 'Print View'
* Attach Event Handler for 'Print' link
*/
$(document).on('click', "#printView", function (event) {
event.preventDefault();
// Print the page
printPage();
}); //end of Print View action
}); //end of 'Print' action
//Calculate Real End for InnoDB
/**

View File

@ -4393,6 +4393,100 @@ function printPage()
}
}
/**
* Print button
*/
function copyToClipboard()
{
var textArea = document.createElement("textarea");
//
// *** This styling is an extra step which is likely not required. ***
//
// Why is it here? To ensure:
// 1. the element is able to have focus and selection.
// 2. if element was to flash render it has minimal visual impact.
// 3. less flakyness with selection and copying which **might** occur if
// the textarea element is not visible.
//
// The likelihood is the element won't even render, not even a flash,
// so some of these are just precautions. However in IE the element
// is visible whilst the popup box asking the user for permission for
// the web page to copy to the clipboard.
//
// Place in top-left corner of screen regardless of scroll position.
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
// Ensure it has a small width and height. Setting to 1px / 1em
// doesn't work as this gives a negative w/h on some browsers.
textArea.style.width = '2em';
textArea.style.height = '2em';
// We don't need padding, reducing the size if it does flash render.
textArea.style.padding = 0;
// Clean up any borders.
textArea.style.border = 'none';
textArea.style.outline = 'none';
textArea.style.boxShadow = 'none';
// Avoid flash of white box if rendered for any reason.
textArea.style.background = 'transparent';
textArea.value = '';
var elementList = $('#serverinfo a');
elementList.each(function(){
textArea.value += $(this).text().split(':')[1].trim() + '/';
});
textArea.value += '\t\t' + window.location.href;
textArea.value += '\n';
elementList = $('.notice,.success');
elementList.each(function(){
textArea.value += $(this).clone().children().remove().end().text() + '\n\n';
});
elementList = $('.sql pre');
elementList.each(function() {
textArea.value += $(this).text() + '\n\n';
});
elementList = $('.table_results .column_heading a');
elementList.each(function() {
textArea.value += $(this).clone().children().remove().end().text() + '\t';
});
textArea.value += '\n';
elementList = $('tbody .odd,tbody .even');
elementList.each(function() {
var childElementList = $(this).find('.data span');
childElementList.each(function(){
textArea.value += $(this).clone().children().remove().end().text() + '\t';
});
textArea.value += '\n';
});
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand('copy');
} catch (err) {
alert('Sorry! Unable to copy');
}
document.body.removeChild(textArea);
}
/**
* Unbind all event handlers before tearing down a page
*/

View File

@ -626,15 +626,6 @@ $js_messages['strHidePanel'] = __('Hide panel');
$js_messages['strUnhideNavItem'] = __('Show hidden navigation tree items.');
$js_messages['linkWithMain'] = __('Link with main panel');
$js_messages['unlinkWithMain'] = __('Unlink from main panel');
$js_messages['strHoverDbFastFilter']
= __('To filter all databases on server, press Enter after a search term');
$js_messages['strHoverFastFilter']
= __('To filter all %s in database, press Enter after a search term');
$js_messages['strTables'] = __('tables');
$js_messages['strViews'] = __('views');
$js_messages['strProcedures'] = __('procedures');
$js_messages['strEvents'] = __('events');
$js_messages['strFunctions'] = __('functions');
/* microhistory */
$js_messages['strInvalidPage']

View File

@ -305,7 +305,6 @@ $(function () {
$(document).on('focus', '#pma_navigation_tree li.fast_filter input.searchClause', PMA_fastFilter.events.focus);
$(document).on('blur', '#pma_navigation_tree li.fast_filter input.searchClause', PMA_fastFilter.events.blur);
$(document).on('keyup', '#pma_navigation_tree li.fast_filter input.searchClause', PMA_fastFilter.events.keyup);
$(document).on('mouseover', '#pma_navigation_tree li.fast_filter input.searchClause', PMA_fastFilter.events.mouseover);
/**
* Ajax handler for pagination
@ -1309,26 +1308,6 @@ var PMA_fastFilter = {
$obj.data('fastFilter').restore();
}
},
mouseover: function (event) {
var message = '';
if ($(this).closest('li.fast_filter').is('.db_fast_filter')) {
message = PMA_messages.strHoverDbFastFilter;
} else {
var node_type = $(this).siblings("input[name='pos2_name']").val();
var node_name = PMA_messages.strTables;
if (node_type == 'views') {
node_name = PMA_messages.strViews;
} else if (node_type == 'procedures') {
node_name = PMA_messages.strProcedures;
} else if (node_type == 'functions') {
node_name = PMA_messages.strFunctions;
} else if (node_type == 'events') {
node_name = PMA_messages.strEvents;
}
message = PMA_sprintf(PMA_messages.strHoverFastFilter, node_name);
}
PMA_tooltip($(this), 'input', message);
},
keyup: function (event) {
var $obj = $(this).closest('div.list_container');
var str = '';

View File

@ -193,14 +193,24 @@ AJAX.registerOnload('sql.js', function () {
}).trigger('keyup');
/**
* Attach Event Handler for 'Print View'
* Attach Event Handler for 'Copy to clipbpard
*/
$(document).on('click', "#copyToClipBoard", function (event) {
event.preventDefault();
// Print the page
copyToClipboard();
}); //end of Copy to Clipboard action
/**
* Attach Event Handler for 'Print' link
*/
$(document).on('click', "#printView", function (event) {
event.preventDefault();
// Print the page
printPage();
}); //end of Print View action
}); //end of 'Print' action
/**
* Attach the {@link makegrid} function to a custom event, which will be

View File

@ -251,14 +251,14 @@ AJAX.registerOnload('tbl_structure.js', function () {
}); //end of Drop Column Anchor action
/**
* Attach Event Handler for 'Print View'
* Attach Event Handler for 'Print' link
*/
$(document).on('click', "#printView", function (event) {
event.preventDefault();
// Print the page
printPage();
}); //end of Print View action
}); //end of 'Print' action
/**
* Ajax Event handler for adding keys

View File

@ -4987,6 +4987,29 @@ class DisplayResults
return $results_operations_html;
}
/**
* Get copy to clipboard links for results operations
*
* @return string $html
*
* @access private
*/
private function _getCopytoclipboardLinks()
{
$html = Util::linkOrButton(
'#',
Util::getIcon(
'b_insrow.png', __('Copy to clipboard'), true
),
array('id' => 'copyToClipBoard'),
true,
true,
'copy_to_clip_board'
);
return $html;
}
/**
* Get printview links for results operations
*
@ -4999,7 +5022,7 @@ class DisplayResults
$html = Util::linkOrButton(
'#',
Util::getIcon(
'b_print.png', __('Print view'), true
'b_print.png', __('Print'), true
),
array('id' => 'printView'),
true,
@ -5062,6 +5085,7 @@ class DisplayResults
// Displays "printable view" link if required
if ($displayParts['pview_lnk'] == '1') {
$results_operations_html .= $this->_getPrintviewLinks();
$results_operations_html .= $this->_getCopytoclipboardLinks();
} // end displays "printable view"
// Export link

View File

@ -288,6 +288,10 @@ class ErrorHandler
*/
public function getDispErrors()
{
// Not sure why but seen in reports.phpmyadmin.net
if (empty($GLOBALS['cfg']['SendErrorReports'])) {
$GLOBALS['cfg']['SendErrorReports'] = 'ask';
}
$retval = '';
// display errors if SendErrorReports is set to 'ask'.
if ($GLOBALS['cfg']['SendErrorReports'] != 'never') {

View File

@ -2,14 +2,15 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Holds the PMA\DatabaseStructureController
* Holds the PMA\libraries\controllers\database\DatabaseStructureController
*
* @package PMA
*/
namespace PMA\libraries\controllers;
namespace PMA\libraries\controllers\database;
use PMA\libraries\config\PageSettings;
use PMA\libraries\controllers\DatabaseController;
use PMA\libraries\Message;
use PMA\libraries\RecentFavoriteTable;
use PMA\libraries\Template;

File diff suppressed because it is too large Load Diff

View File

@ -314,11 +314,6 @@ class TableSearchController extends TableController
$GLOBALS['cfg']['DefaultTabTable'], 'table'
);
}
// Defines the url to return to in case of error in the next sql
// statement
$err_url = $goto . PMA_URL_getCommon(
array('db' => $this->db, 'table' => $this->table)
);
//Set default datalabel if not selected
if (!isset($_POST['zoom_submit']) || $_POST['dataLabel'] == '') {
@ -521,7 +516,6 @@ class TableSearchController extends TableController
* Add this to ensure following procedures included running correctly.
*/
$db = $this->db;
$table = $this->table;
/**
* Parse and analyze the query
*/
@ -561,7 +555,6 @@ class TableSearchController extends TableController
*/
public function displaySelectionFormAction()
{
//$err_url = 'tbl_select.php' . $err_url;
$this->url_query .= '&goto=tbl_select.php&back=tbl_select.php';
include_once 'libraries/tbl_info.inc.php';
@ -570,10 +563,6 @@ class TableSearchController extends TableController
$GLOBALS['cfg']['DefaultTabTable'], 'table'
);
}
// Defines the url to return to in case of error in the next sql statement
$err_url = $goto . PMA_URL_getCommon(
array('db' => $this->db, 'table' => $this->table)
);
// Displays the table search form
$this->response->addHTML(
Template::get('secondary_tabs')

View File

@ -544,7 +544,7 @@ class TableStructureController extends TableController
$partitionDetails = $this->_extractPartitionDetails();
}
include_once 'libraries/StorageEngine.class.php';
include_once 'libraries/StorageEngine.php';
$this->response->addHTML(
Template::get('table/structure/partition_definition_form')
->render(
@ -930,6 +930,13 @@ class TableStructureController extends TableController
PMA_previewSQL(count($changes) > 0 ? $sql_query : '');
}
$columns_with_index = $this->dbi
->getTable($this->db, $this->table)
->getColumnsWithIndex(
PMA_Index::PRIMARY | PMA_Index::UNIQUE | PMA_Index::INDEX
| PMA_Index::SPATIAL | PMA_Index::FULLTEXT
);
$changedToBlob = array();
// While changing the Column Collation
// First change to BLOB
@ -937,6 +944,7 @@ class TableStructureController extends TableController
if (isset($_REQUEST['field_collation'][$i])
&& isset($_REQUEST['field_collation_orig'][$i])
&& $_REQUEST['field_collation'][$i] !== $_REQUEST['field_collation_orig'][$i]
&& ! in_array($_REQUEST['field_orig'][$i], $columns_with_index)
) {
$secondary_query = 'ALTER TABLE ' . Util::backquote(
$this->table

View File

@ -102,7 +102,7 @@ function PMA_getHtmlForChangePassword($mode, $username, $hostname)
|| ($is_superuser && $mode == 'edit_other')
) {
$auth_plugin_dropdown = PMA_getHtmlForAuthPluginsDropdown(
$username, $hostname, $orig_auth_plugin, 'change_pw', 'new'
$orig_auth_plugin, 'change_pw', 'new'
);
$html .= '<tr class="vmiddle">'
@ -135,7 +135,7 @@ function PMA_getHtmlForChangePassword($mode, $username, $hostname)
}
} else {
$auth_plugin_dropdown = PMA_getHtmlForAuthPluginsDropdown(
$username, $hostname, $orig_auth_plugin, 'change_pw', 'old'
$orig_auth_plugin, 'change_pw', 'old'
);
$html .= '<tr class="vmiddle">'

View File

@ -1107,3 +1107,80 @@ function PMA_getExportDisplay(
$html .= '</form>';
return $html;
}
/**
* Handles export template actions
*
* @param array $cfgRelation Relation configuration
*
* @return void
*/
function PMA_handleExportTemplateActions($cfgRelation)
{
if (isset($_REQUEST['templateId'])) {
$id = PMA\libraries\Util::sqlAddSlashes($_REQUEST['templateId']);
} else {
$id = '';
}
$templateTable = PMA\libraries\Util::backquote($cfgRelation['db']) . '.'
. PMA\libraries\Util::backquote($cfgRelation['export_templates']);
$user = PMA\libraries\Util::sqlAddSlashes($GLOBALS['cfg']['Server']['user']);
switch ($_REQUEST['templateAction']) {
case 'create':
$query = "INSERT INTO " . $templateTable . "("
. " `username`, `export_type`,"
. " `template_name`, `template_data`"
. ") VALUES ("
. "'" . $user . "', "
. "'" . PMA\libraries\Util::sqlAddSlashes($_REQUEST['exportType'])
. "', '" . PMA\libraries\Util::sqlAddSlashes($_REQUEST['templateName'])
. "', '" . PMA\libraries\Util::sqlAddSlashes($_REQUEST['templateData'])
. "');";
break;
case 'load':
$query = "SELECT `template_data` FROM " . $templateTable
. " WHERE `id` = " . $id . " AND `username` = '" . $user . "'";
break;
case 'update':
$query = "UPDATE " . $templateTable . " SET `template_data` = "
. "'" . PMA\libraries\Util::sqlAddSlashes($_REQUEST['templateData']) . "'"
. " WHERE `id` = " . $id . " AND `username` = '" . $user . "'";
break;
case 'delete':
$query = "DELETE FROM " . $templateTable
. " WHERE `id` = " . $id . " AND `username` = '" . $user . "'";
break;
default:
$query = '';
break;
}
$result = PMA_queryAsControlUser($query, false);
$response = PMA\libraries\Response::getInstance();
if (! $result) {
$error = $GLOBALS['dbi']->getError($GLOBALS['controllink']);
$response->setRequestStatus(false);
$response->addJSON('message', $error);
exit;
}
$response->setRequestStatus(true);
if ('create' == $_REQUEST['templateAction']) {
$response->addJSON(
'data',
PMA_getOptionsForExportTemplates($_REQUEST['exportType'])
);
} elseif ('load' == $_REQUEST['templateAction']) {
$data = null;
while ($row = $GLOBALS['dbi']->fetchAssoc(
$result, $GLOBALS['controllink']
)) {
$data = $row['template_data'];
}
$response->addJSON('data', $data);
}
$GLOBALS['dbi']->freeResult($result);
}

View File

@ -1366,7 +1366,7 @@ class NavigationTree
$placeholder_key = 'placeholder';
}
$retval .= " $placeholder_key='"
. __('Filter databases by name or regex');
. __("Type to filter these, Enter to search all");
$retval .= "' />";
$retval .= '<span title="' . __('Clear fast filter') . '">X</span>';
$retval .= "</form>";
@ -1403,7 +1403,7 @@ class NavigationTree
$placeholder_key = 'placeholder';
}
$retval .= " $placeholder_key='"
. __('Filter by name or regex') . "' />";
. __("Type to filter these, Enter to search all") . "' />";
$retval .= "<span title='" . __('Clear fast filter') . "'>X</span>";
$retval .= "</form>";
$retval .= "</li>";

View File

@ -170,16 +170,13 @@ abstract class ExportPlugin
* @param string $db database being exported
* @param string|array $tables table(s) being exported
* @param array $metadataTypes types of metadata to export
* @param array $targetNames associative array of db and table names of
* target configuraton storage
*
* @return bool Whether it succeeded
*/
public function exportMetadata(
$db,
$tables,
$metadataTypes,
$targetNames = array()
$metadataTypes
) {
;
}

View File

@ -974,16 +974,13 @@ class ExportSql extends ExportPlugin
* @param string $db database being exported
* @param string|array $tables table(s) being exported
* @param array $metadataTypes types of metadata to export
* @param array $targetNames associative array of db and table names of
* target configuraton storage
*
* @return bool Whether it succeeded
*/
public function exportMetadata(
$db,
$tables,
$metadataTypes,
$targetNames = array()
$metadataTypes
) {
$cfgRelation = PMA_getRelationsParam();
if (!isset($cfgRelation['db'])) {
@ -1029,16 +1026,13 @@ class ExportSql extends ExportPlugin
* @param string $db database being exported
* @param string $table table being exported
* @param array $metadataTypes types of metadata to export
* @param array $targetNames associative array of db and table names of
* target configuraton storage
*
* @return bool Whether it succeeded
*/
private function _exportMetadata(
$db,
$table,
$metadataTypes,
$targetNames = array()
$metadataTypes
) {
$cfgRelation = PMA_getRelationsParam();
@ -1059,27 +1053,28 @@ class ExportSql extends ExportPlugin
}
$aliases = array();
foreach ($targetNames as $type => $targetName) {
if ($type == 'phpmyadmin') {
$aliases[$cfgRelation['db']] = $targetName;
continue;
}
if (isset($cfgRelation[$type])) {
$aliases[$cfgRelation['db']]['tables'][$cfgRelation[$type]]['alias']
= $targetName;
}
}
$comment = $this->_possibleCRLF()
. $this->_exportComment()
. $this->_exportComment(
sprintf(
__('Metadata for %s'),
isset($table) ? $table : $db
)
)
. $this->_exportComment();
if (isset($table)) {
$comment .= $this->_exportComment(
sprintf(
__('Metadata for table %s'),
$table
)
);
} else {
$comment .= $this->_exportComment(
sprintf(
__('Metadata for database %s'),
$db
)
);
}
$comment .= $this->_exportComment();
if (!PMA_exportOutputHandler($comment)) {
return false;
}

View File

@ -452,25 +452,31 @@ function PMA_checkRelationsParam()
$cfgRelation = array();
$cfgRelation['PMA_VERSION'] = PMA_VERSION;
$cfgRelation['relwork'] = false;
$cfgRelation['displaywork'] = false;
$cfgRelation['bookmarkwork'] = false;
$cfgRelation['pdfwork'] = false;
$cfgRelation['commwork'] = false;
$cfgRelation['mimework'] = false;
$cfgRelation['historywork'] = false;
$cfgRelation['recentwork'] = false;
$cfgRelation['favoritework'] = false;
$cfgRelation['uiprefswork'] = false;
$cfgRelation['trackingwork'] = false;
$cfgRelation['userconfigwork'] = false;
$cfgRelation['menuswork'] = false;
$cfgRelation['navwork'] = false;
$workToTable = array(
'relwork' => 'relation',
'displaywork' => array('relation', 'table_info'),
'bookmarkwork' => 'bookmarktable',
'pdfwork' => array('table_coords', 'pdf_pages'),
'commwork' => 'column_info',
'mimework' => 'column_info',
'historywork' => 'history',
'recentwork' => 'recent',
'favoritework' => 'favorite',
'uiprefswork' => 'table_uiprefs',
'trackingwork' => 'tracking',
'userconfigwork' => 'userconfig',
'menuswork' => array('users', 'usergroups'),
'navwork' => 'navigationhiding',
'savedsearcheswork' => 'savedsearches',
'centralcolumnswork' => 'central_columns',
'designersettingswork' => 'designer_settings',
'exporttemplateswork' => 'export_templates',
);
foreach ($workToTable as $work => $table) {
$cfgRelation[$work] = false;
}
$cfgRelation['allworks'] = false;
$cfgRelation['savedsearcheswork'] = false;
$cfgRelation['centralcolumnswork'] = false;
$cfgRelation['designersettingswork'] = false;
$cfgRelation['exporttemplateswork'] = false;
$cfgRelation['user'] = null;
$cfgRelation['db'] = null;
@ -553,10 +559,11 @@ function PMA_checkRelationsParam()
$GLOBALS['dbi']->freeResult($tab_rs);
if (isset($cfgRelation['relation'])) {
$cfgRelation['relwork'] = true;
if (isset($cfgRelation['table_info'])) {
$cfgRelation['displaywork'] = true;
}
$cfgRelation['relwork'] = true;
}
if (isset($cfgRelation['relation']) && isset($cfgRelation['table_info'])) {
$cfgRelation['displaywork'] = true;
}
if (isset($cfgRelation['table_coords']) && isset($cfgRelation['pdf_pages'])) {
@ -622,19 +629,34 @@ function PMA_checkRelationsParam()
$cfgRelation['exporttemplateswork'] = true;
}
if ($cfgRelation['relwork'] && $cfgRelation['displaywork']
&& $cfgRelation['pdfwork'] && $cfgRelation['commwork']
&& $cfgRelation['mimework'] && $cfgRelation['historywork']
&& $cfgRelation['recentwork'] && $cfgRelation['uiprefswork']
&& $cfgRelation['trackingwork'] && $cfgRelation['userconfigwork']
&& $cfgRelation['bookmarkwork'] && $cfgRelation['centralcolumnswork']
&& $cfgRelation['menuswork'] && $cfgRelation['navwork']
&& $cfgRelation['savedsearcheswork'] && $cfgRelation['favoritework']
&& $cfgRelation['designersettingswork']
&& $cfgRelation['exporttemplateswork']
) {
$cfgRelation['allworks'] = true;
$allWorks = true;
foreach ($workToTable as $work => $table) {
if (! $cfgRelation[$work]) {
if (is_string($table)) {
if (isset($GLOBALS['cfg']['Server'][$table])
&& $GLOBALS['cfg']['Server'][$table] !== false
) {
$allWorks = false;
break;
}
} else if (is_array($table)) {
$oneNull = false;
foreach ($table as $t) {
if (isset($GLOBALS['cfg']['Server'][$t])
&& $GLOBALS['cfg']['Server'][$t] === false
) {
$oneNull = true;
break;
}
}
if (! $oneNull) {
$allWorks = false;
break;
}
}
}
}
$cfgRelation['allworks'] = $allWorks;
return $cfgRelation;
} // end of the 'PMA_checkRelationsParam()' function

View File

@ -1517,8 +1517,6 @@ function PMA_getHtmlForGlobalPrivTableWithCheckboxes(
/**
* Gets the currently active authentication plugins
*
* @param string $username User name
* @param string $hostname Host name
* @param string $orig_auth_plugin Default Authentication plugin
* @param string $mode are we creating a new user or are we just
* changing one?
@ -1528,8 +1526,6 @@ function PMA_getHtmlForGlobalPrivTableWithCheckboxes(
* @return string $html_output
*/
function PMA_getHtmlForAuthPluginsDropdown(
$username,
$hostname,
$orig_auth_plugin,
$mode = 'new',
$versions = 'new'
@ -1868,7 +1864,6 @@ function PMA_getHtmlForLoginInformationFields(
. '<label for="select_authentication_plugin" >';
$serverType = Util::getServerType();
$auth_plugin_dropdown = '';
$orig_auth_plugin = PMA_getCurrentAuthenticationPlugin(
$mode,
$username,
@ -1884,13 +1879,13 @@ function PMA_getHtmlForLoginInformationFields(
. '</label><span class="options">&nbsp;</span>' . "\n";
$auth_plugin_dropdown = PMA_getHtmlForAuthPluginsDropdown(
$username, $hostname, $orig_auth_plugin, $mode, 'new'
$orig_auth_plugin, $mode, 'new'
);
} else {
$html_output .= __('Password Hashing Method')
. '</label><span class="options">&nbsp;</span>' . "\n";
$auth_plugin_dropdown = PMA_getHtmlForAuthPluginsDropdown(
$username, $hostname, $orig_auth_plugin, $mode, 'old'
$orig_auth_plugin, $mode, 'old'
);
}
$html_output .= $auth_plugin_dropdown;
@ -2224,7 +2219,6 @@ function PMA_getMessageAndSqlQueryForPrivilegesRevoke($dbname,
*/
function PMA_getRequireClause()
{
$require_clause = "";
if (isset($_POST['ssl_type']) && $_POST['ssl_type'] == 'specified') {
$require = array();
if (! empty($_POST['ssl_cipher'])) {
@ -3332,7 +3326,6 @@ function PMA_getHtmlForAllTableSpecificRights(
foreach ($db_rights as $row) {
$onePrivilege = array();
$paramDbName = '';
$paramTableName = '';
$paramRoutineName = '';

File diff suppressed because it is too large Load Diff

View File

@ -46,6 +46,7 @@ class Condition extends Component
'LIKE' => 1,
'NOT IN' => 1,
'NOT NULL' => 1,
'NOT' => 1,
'NULL' => 1,
'OR' => 1,
'XOR' => 1,

View File

@ -230,8 +230,9 @@ class Expression extends Component
break;
}
} elseif ($brackets < 0) {
$parser->error(__('Unexpected closing bracket.'), $token);
$brackets = 0;
// $parser->error(__('Unexpected closing bracket.'), $token);
// $brackets = 0;
break;
}
} elseif ($token->value === ',') {
if ($brackets === 0) {

View File

@ -70,6 +70,7 @@ class ExpressionArray extends Component
if (($token->type === Token::TYPE_KEYWORD)
&& ($token->flags & Token::FLAG_KEYWORD_RESERVED)
&& ((~$token->flags & Token::FLAG_KEYWORD_FUNCTION))
&& ($token->value !== 'DUAL')
) {
// No keyword is expected.

View File

@ -146,8 +146,8 @@ class OptionsArray extends Component
sprintf(
__('This option conflicts with "%1$s".'),
is_array($ret->options[$lastOptionId])
? $ret->options[$lastOptionId]['name']
: $ret->options[$lastOptionId]
? $ret->options[$lastOptionId]['name']
: $ret->options[$lastOptionId]
),
$token
);

View File

@ -151,7 +151,7 @@ class ContextMySql50000 extends Context
'RIGHT JOIN' => 7,
'LINEAR HASH' => 7,
'AND NO CHAIN' => 7, 'FOR EACH ROW' => 7, 'PARTITION BY' => 7,
'SQL SECURITY' => 7,
'SET PASSWORD' => 7, 'SQL SECURITY' => 7,
'CHARACTER SET' => 7, 'IF NOT EXISTS' => 7,
'DATA DIRECTORY' => 7,
'DEFAULT CHARSET' => 7, 'DEFAULT COLLATE' => 7, 'INDEX DIRECTORY' => 7,

View File

@ -164,7 +164,7 @@ class ContextMySql50100 extends Context
'RIGHT JOIN' => 7,
'LINEAR HASH' => 7,
'AND NO CHAIN' => 7, 'FOR EACH ROW' => 7, 'PARTITION BY' => 7,
'SQL SECURITY' => 7,
'SET PASSWORD' => 7, 'SQL SECURITY' => 7,
'CHARACTER SET' => 7, 'IF NOT EXISTS' => 7,
'DATA DIRECTORY' => 7,
'DEFAULT CHARSET' => 7, 'DEFAULT COLLATE' => 7, 'INDEX DIRECTORY' => 7,

View File

@ -169,7 +169,7 @@ class ContextMySql50500 extends Context
'RIGHT JOIN' => 7,
'LINEAR HASH' => 7,
'AND NO CHAIN' => 7, 'FOR EACH ROW' => 7, 'PARTITION BY' => 7,
'SQL SECURITY' => 7,
'SET PASSWORD' => 7, 'SQL SECURITY' => 7,
'CHARACTER SET' => 7, 'IF NOT EXISTS' => 7,
'DATA DIRECTORY' => 7,
'DEFAULT CHARSET' => 7, 'DEFAULT COLLATE' => 7, 'INDEX DIRECTORY' => 7,

View File

@ -174,7 +174,7 @@ class ContextMySql50600 extends Context
'RIGHT JOIN' => 7,
'LINEAR HASH' => 7,
'AND NO CHAIN' => 7, 'FOR EACH ROW' => 7, 'PARTITION BY' => 7,
'SQL SECURITY' => 7,
'SET PASSWORD' => 7, 'SQL SECURITY' => 7,
'CHARACTER SET' => 7, 'IF NOT EXISTS' => 7,
'DATA DIRECTORY' => 7,
'DEFAULT CHARSET' => 7, 'DEFAULT COLLATE' => 7, 'INDEX DIRECTORY' => 7,

View File

@ -182,7 +182,7 @@ class ContextMySql50700 extends Context
'RIGHT JOIN' => 7,
'LINEAR HASH' => 7,
'AND NO CHAIN' => 7, 'FOR EACH ROW' => 7, 'PARTITION BY' => 7,
'SQL SECURITY' => 7,
'SET PASSWORD' => 7, 'SQL SECURITY' => 7,
'CHARACTER SET' => 7, 'IF NOT EXISTS' => 7,
'DATA DIRECTORY' => 7,
'DEFAULT CHARSET' => 7, 'DEFAULT COLLATE' => 7, 'INDEX DIRECTORY' => 7,

View File

@ -37,9 +37,11 @@ class Parser
// MySQL Utility Statements
'EXPLAIN' => 'SqlParser\\Statements\\ExplainStatement',
'DESCRIBE' => 'SqlParser\\Statements\\ExplainStatement',
'GRANT' => '',
'HELP' => '',
'USE' => '',
'SET PASSWORD' => '',
'STATUS' => '',
'USE' => '',
// Table Maintenance Statements
// https://dev.mysql.com/doc/refman/5.7/en/table-maintenance-sql.html
@ -296,6 +298,13 @@ class Parser
*/
public $statements = array();
/**
* The number of opened brackets.
*
* @var int
*/
public $brackets = 0;
/**
* Constructor.
*
@ -380,6 +389,12 @@ class Parser
continue;
}
// Counting the brackets around statements.
if ($token->value === '(') {
++$this->brackets;
continue;
}
// Statements can start with keywords only.
// Comments, whitespaces, etc. are ignored.
if ($token->type !== Token::TYPE_KEYWORD) {

View File

@ -122,7 +122,14 @@ abstract class Statement
*/
$built = array();
foreach (static::$CLAUSES as $clause) {
/**
* Statement's clauses.
*
* @var array
*/
$clauses = $this->getClauses();
foreach ($clauses as $clause) {
/**
* The name of the clause.
*
@ -224,6 +231,13 @@ abstract class Statement
break;
}
// Checking if this closing bracket is the pair for a bracket
// outside the statement.
if (($token->value === ')') && ($parser->brackets > 0)) {
--$parser->brackets;
continue;
}
// Only keywords are relevant here. Other parts of the query are
// processed in the functions below.
if ($token->type !== Token::TYPE_KEYWORD) {
@ -363,6 +377,16 @@ abstract class Statement
}
/**
* Gets the clauses of this statement.
*
* @return array
*/
public function getClauses()
{
return static::$CLAUSES;
}
/**
* Builds the string representation of this statement.
*

View File

@ -314,6 +314,11 @@ class CreateStatement extends Statement
. Expression::build($this->name) . ' '
. ParameterDefinition::build($this->parameters) . ' '
. $tmp . ' ' . TokensList::build($this->body);
} else {
return 'CREATE '
. OptionsArray::build($this->options) . ' '
. Expression::build($this->name) . ' '
. TokensList::build($this->body);
}
return '';
}
@ -547,6 +552,14 @@ class CreateStatement extends Statement
$token = $list->tokens[$list->idx];
$this->body[] = $token;
}
} else {
for (; $list->idx < $list->count; ++$list->idx) {
$token = $list->tokens[$list->idx];
if ($token->type === Token::TYPE_DELIMITER) {
break;
}
$this->body[] = $token;
}
}
}
}

View File

@ -11,6 +11,7 @@ namespace SqlParser\Statements;
use SqlParser\Statement;
use SqlParser\Components\IntoKeyword;
use SqlParser\Components\Array2d;
use SqlParser\Components\ArrayObj;
/**
* `INSERT` statement.
@ -76,7 +77,17 @@ class InsertStatement extends Statement
/**
* Values to be inserted.
*
* @var Array2d
* @var ArrayObj[]
*/
public $values;
/**
* @return string
*/
public function build()
{
return 'INSERT ' . $this->options
. ' INTO ' . $this->into
. ' VALUES ' . ArrayObj::build($this->values);
}
}

View File

@ -195,4 +195,25 @@ class SelectStatement extends Statement
* @var SelectStatement[]
*/
public $union = array();
/**
* Gets the clauses of this statement.
*
* @return array
*/
public function getClauses()
{
// This is a cheap fix for `SELECT` statements that contain `UNION`.
// The `ORDER BY` and `LIMIT` clauses should be at the end of the
// statement.
if (!empty($this->union)) {
$clauses = static::$CLAUSES;
unset($clauses['ORDER BY']);
unset($clauses['LIMIT']);
$clauses['ORDER BY'] = array('ORDER BY', 3);
$clauses['LIMIT'] = array('LIMIT', 3);
return $clauses;
}
return static::$CLAUSES;
}
}

View File

@ -283,6 +283,10 @@ class BufferedQuery
* `strtoupper(substr($this->query, $i, 9)) === 'DELIMITER'`
*
* This optimization makes the code about 3 times faster.
*
* `DELIMITER` is not being considered a keyword. The only context
* it has a special meaning is when it is the beginning of a
* statement. This is the reason for the last condition.
*/
if (($i + 9 < $len)
&& (($this->query[$i ] === 'D') || ($this->query[$i ] === 'd'))
@ -295,6 +299,7 @@ class BufferedQuery
&& (($this->query[$i + 7] === 'E') || ($this->query[$i + 7] === 'e'))
&& (($this->query[$i + 8] === 'R') || ($this->query[$i + 8] === 'r'))
&& (Context::isWhitespace($this->query[$i + 9]))
&& (trim($this->current) === '')
) {
// Saving the current index to be able to revert any parsing
// done in this block.

View File

@ -304,7 +304,9 @@ class Formatter
if (($this->options['parts_newline'])
&& (!$formattedOptions)
&& (empty(self::$INLINE_CLAUSES[$lastClause]))
&& ($curr->type != Token::TYPE_KEYWORD)
&& (($curr->type !== Token::TYPE_KEYWORD)
|| (($curr->type === Token::TYPE_KEYWORD)
&& ($curr->flags & Token::FLAG_KEYWORD_FUNCTION)))
) {
$formattedOptions = true;
$lineEnded = true;
@ -334,8 +336,8 @@ class Formatter
// Formatting fragments delimited by comma.
if (($prev->type === Token::TYPE_OPERATOR) && ($prev->value === ',')) {
// Fragments delimited by a comma are broken into multiple
// pieces only if the clause if the clause is not inlined or
// this fragment is between brackets that were on new line.
// pieces only if the clause is not inlined or this fragment
// is between brackets that are on new line.
if (((empty(self::$INLINE_CLAUSES[$lastClause]))
&& ($this->options['parts_newline']))
|| (end($blocksLineEndings) === true)
@ -401,8 +403,7 @@ class Formatter
$comment = '';
}
// Saving the next token as the one that will be processed during
// the next iteration.
// Iteration finished, consider current token as previous.
$prev = $curr;
}

View File

@ -295,7 +295,14 @@ class Query
$flags['is_export'] = true;
}
foreach ($statement->expr as $expr) {
$expressions = $statement->expr;
if (!empty($statement->join)) {
foreach ($statement->join as $join) {
$expressions[] = $join->expr;
}
}
foreach ($expressions as $expr) {
if (!empty($expr->function)) {
if ($expr->function === 'COUNT') {
$flags['is_count'] = true;
@ -539,15 +546,7 @@ class Query
*
* @var array $clauses
*/
$clauses = array_flip(array_keys($statement::$CLAUSES));
// This is a cheap fix for `SELECT` statements that contain `UNION`.
// Replacing the `ORDER BY` or `LIMIT` clauses should replace the last
// clause.
if (($statement instanceof SelectStatement) && (!empty($statement->union))) {
$clauses['ORDER BY'] = count($clauses) + 1;
$clauses['LIMIT'] = count($clauses) + 2;
}
$clauses = array_flip(array_keys($statement->getClauses()));
/**
* Lexer used for lexing the clause.

2547
po/af.po

File diff suppressed because it is too large Load Diff

2563
po/ar.po

File diff suppressed because it is too large Load Diff

2555
po/az.po

File diff suppressed because it is too large Load Diff

2597
po/be.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2571
po/bg.po

File diff suppressed because it is too large Load Diff

2539
po/bn.po

File diff suppressed because it is too large Load Diff

2555
po/br.po

File diff suppressed because it is too large Load Diff

2511
po/brx.po

File diff suppressed because it is too large Load Diff

2561
po/bs.po

File diff suppressed because it is too large Load Diff

2550
po/ca.po

File diff suppressed because it is too large Load Diff

2559
po/ckb.po

File diff suppressed because it is too large Load Diff

2585
po/cs.po

File diff suppressed because it is too large Load Diff

2563
po/cy.po

File diff suppressed because it is too large Load Diff

2545
po/da.po

File diff suppressed because it is too large Load Diff

2566
po/de.po

File diff suppressed because it is too large Load Diff

2564
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2511
po/eo.po

File diff suppressed because it is too large Load Diff

2553
po/es.po

File diff suppressed because it is too large Load Diff

2562
po/et.po

File diff suppressed because it is too large Load Diff

2563
po/eu.po

File diff suppressed because it is too large Load Diff

2597
po/fa.po

File diff suppressed because it is too large Load Diff

2778
po/fi.po

File diff suppressed because it is too large Load Diff

2560
po/fr.po

File diff suppressed because it is too large Load Diff

2545
po/fy.po

File diff suppressed because it is too large Load Diff

2562
po/gl.po

File diff suppressed because it is too large Load Diff

2563
po/he.po

File diff suppressed because it is too large Load Diff

2559
po/hi.po

File diff suppressed because it is too large Load Diff

2597
po/hr.po

File diff suppressed because it is too large Load Diff

2543
po/hu.po

File diff suppressed because it is too large Load Diff

2557
po/hy.po

File diff suppressed because it is too large Load Diff

2595
po/ia.po

File diff suppressed because it is too large Load Diff

2545
po/id.po

File diff suppressed because it is too large Load Diff

2572
po/it.po

File diff suppressed because it is too large Load Diff

2571
po/ja.po

File diff suppressed because it is too large Load Diff

2569
po/ka.po

File diff suppressed because it is too large Load Diff

2560
po/kk.po

File diff suppressed because it is too large Load Diff

2518
po/km.po

File diff suppressed because it is too large Load Diff

2513
po/kn.po

File diff suppressed because it is too large Load Diff

2539
po/ko.po

File diff suppressed because it is too large Load Diff

2520
po/ksh.po

File diff suppressed because it is too large Load Diff

2509
po/ky.po

File diff suppressed because it is too large Load Diff

2511
po/li.po

File diff suppressed because it is too large Load Diff

2561
po/lt.po

File diff suppressed because it is too large Load Diff

2557
po/lv.po

File diff suppressed because it is too large Load Diff

2561
po/mk.po

File diff suppressed because it is too large Load Diff

2531
po/ml.po

File diff suppressed because it is too large Load Diff

2571
po/mn.po

File diff suppressed because it is too large Load Diff

2552
po/ms.po

File diff suppressed because it is too large Load Diff

2590
po/nb.po

File diff suppressed because it is too large Load Diff

2528
po/ne.po

File diff suppressed because it is too large Load Diff

2559
po/nl.po

File diff suppressed because it is too large Load Diff

2511
po/pa.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2691
po/pl.po

File diff suppressed because it is too large Load Diff

2544
po/pt.po

File diff suppressed because it is too large Load Diff

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