Merge branch 'QA_4_8'
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
commit
235dac6667
@ -29,6 +29,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #14636 Move operation causes SELECT * FROM `undefined`
|
||||
- issue #14630 Enum '0' produces incorrect search SQL
|
||||
- issue #14223 Fix TypeError in database designer
|
||||
- issue #13621 QBE selenium tests broken since merge of #13342
|
||||
|
||||
4.8.3 (2018-08-22)
|
||||
- issue #14314 Error when naming a database '0'
|
||||
|
||||
21
db_qbe.php
21
db_qbe.php
@ -13,6 +13,7 @@ use PhpMyAdmin\Relation;
|
||||
use PhpMyAdmin\Response;
|
||||
use PhpMyAdmin\SavedSearches;
|
||||
use PhpMyAdmin\Sql;
|
||||
use PhpMyAdmin\Template;
|
||||
use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
@ -22,9 +23,10 @@ use PhpMyAdmin\Util;
|
||||
require_once 'libraries/common.inc.php';
|
||||
|
||||
$response = Response::getInstance();
|
||||
$relation = new Relation($GLOBALS['dbi']);
|
||||
$template = new Template();
|
||||
|
||||
// Gets the relation settings
|
||||
$relation = new Relation($GLOBALS['dbi']);
|
||||
$cfgRelation = $relation->getRelationsParam();
|
||||
|
||||
$savedSearchList = [];
|
||||
@ -140,6 +142,23 @@ unset($message_to_display);
|
||||
// create new qbe search instance
|
||||
$db_qbe = new Qbe($GLOBALS['dbi'], $GLOBALS['db'], $savedSearchList, $savedSearch);
|
||||
|
||||
$secondaryTabs = [
|
||||
'multi' => [
|
||||
'link' => 'db_multi_table_query.php',
|
||||
'text' => __('Multi-table query'),
|
||||
],
|
||||
'qbe' => [
|
||||
'link' => 'db_qbe.php',
|
||||
'text' => __('Query by example'),
|
||||
],
|
||||
];
|
||||
$response->addHTML(
|
||||
$template->render('secondary_tabs', [
|
||||
'url_params' => $url_params,
|
||||
'sub_tabs' => $secondaryTabs,
|
||||
])
|
||||
);
|
||||
|
||||
$url = 'db_designer.php' . Url::getCommon(
|
||||
array_merge(
|
||||
$url_params,
|
||||
|
||||
@ -37,6 +37,7 @@ class Core
|
||||
'db_export.php',
|
||||
'db_importdocsql.php',
|
||||
'db_multi_table_query.php',
|
||||
'db_qbe.php',
|
||||
'db_structure.php',
|
||||
'db_import.php',
|
||||
'db_operations.php',
|
||||
|
||||
@ -480,11 +480,18 @@ class Menu
|
||||
$tabs['search']['warning'] = __('Database seems to be empty!');
|
||||
}
|
||||
|
||||
$tabs['multi_table_query']['text'] = __('Query');
|
||||
$tabs['multi_table_query']['icon'] = 's_db';
|
||||
$tabs['multi_table_query']['link'] = 'db_multi_table_query.php';
|
||||
$tabs['query']['text'] = __('Query');
|
||||
$tabs['query']['icon'] = 's_db';
|
||||
$tabs['query']['link'] = 'db_multi_table_query.php';
|
||||
$tabs['query']['active'] = in_array(
|
||||
basename($GLOBALS['PMA_PHP_SELF']),
|
||||
array(
|
||||
'db_multi_table_query.php',
|
||||
'db_qbe.php',
|
||||
)
|
||||
);
|
||||
if ($num_tables == 0) {
|
||||
$tabs['qbe']['warning'] = __('Database seems to be empty!');
|
||||
$tabs['query']['warning'] = __('Database seems to be empty!');
|
||||
}
|
||||
|
||||
$tabs['export']['text'] = __('Export');
|
||||
|
||||
@ -4051,7 +4051,7 @@ class Util
|
||||
'structure' => __('Structure'),
|
||||
'sql' => __('SQL'),
|
||||
'search' => __('Search'),
|
||||
'multi_table_query' => __('Query'),
|
||||
'query' => __('Query'),
|
||||
'export' => __('Export'),
|
||||
'import' => __('Import'),
|
||||
'operation' => __('Operations'),
|
||||
|
||||
@ -1,3 +1,18 @@
|
||||
{% include 'secondary_tabs.twig' with {
|
||||
'url_params': {
|
||||
'db': db
|
||||
},
|
||||
'sub_tabs': [
|
||||
{
|
||||
'link': 'db_multi_table_query.php',
|
||||
'text': 'Multi-table query'|trans
|
||||
},
|
||||
{
|
||||
'link': 'db_qbe.php',
|
||||
'text': 'Query by example'|trans
|
||||
}
|
||||
]
|
||||
} only %}
|
||||
{% include 'div_for_slider_effect.twig' with {
|
||||
'id': 'query_div',
|
||||
'message': 'Query window'|trans,
|
||||
|
||||
@ -27,7 +27,6 @@ class QueryByExampleTest extends TestBase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->markTestSkipped('Broken, see https://github.com/phpmyadmin/phpmyadmin/issues/13621');
|
||||
parent::setUp();
|
||||
|
||||
$this->dbQuery(
|
||||
@ -57,13 +56,16 @@ class QueryByExampleTest extends TestBase
|
||||
$this->waitForElement('partialLinkText', 'Query')->click();
|
||||
$this->waitAjax();
|
||||
|
||||
$this->waitForElement('partialLinkText', 'Query by example')->click();
|
||||
$this->waitAjax();
|
||||
|
||||
/* Select Columns to be used in the query */
|
||||
$this->selectByLabel(
|
||||
$this->selectByValue(
|
||||
$this->waitForElement('name', 'criteriaColumn[0]'),
|
||||
'`test_table`.`id`'
|
||||
);
|
||||
|
||||
$this->selectByLabel(
|
||||
$this->selectByValue(
|
||||
$this->waitForElement('name', 'criteriaColumn[1]'),
|
||||
'`test_table`.`val`'
|
||||
);
|
||||
@ -84,12 +86,12 @@ class QueryByExampleTest extends TestBase
|
||||
);
|
||||
|
||||
/* Select sort order amongst columns */
|
||||
$this->selectByLabel(
|
||||
$this->selectByValue(
|
||||
$this->waitForElement('name', 'criteriaSortOrder[0]'),
|
||||
'2'
|
||||
);
|
||||
|
||||
$this->selectByLabel(
|
||||
$this->selectByValue(
|
||||
$this->waitForElement('name', 'criteriaSortOrder[1]'),
|
||||
'1'
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user