Commit Graph

280 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
44bdd1d390
Rename $url_params global to $urlParams
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-24 22:48:14 -03:00
Maurício Meneghini Fauth
91bd0df2e5
Rename $err_url global to $errorUrl
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-24 19:39:28 -03:00
William Desportes
4bb090b4a7
Remove the md5.js library
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-24 13:13:35 +01:00
William Desportes
993a6aa8a0
Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-23 01:13:58 +01:00
Saksham Gupta
04d72a8291 Fix #16703 No SQL option on Export of rows from a table
Signed-off-by: Saksham Gupta <shucon01@gmail.com>

Add null fallback

Signed-off-by: Saksham Gupta <shucon01@gmail.com>

Update yarn.lock
2021-03-22 22:34:06 +05:30
Maurício Meneghini Fauth
caa3337411
Extract FK related methods from Util class
Creates the PhpMyAdmin\Utils\ForeignKey class.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-21 15:25:45 -03:00
Maurício Meneghini Fauth
c0e85ed76c
Add flash message support for db structure controller
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-20 18:56:35 -03:00
Maurício Meneghini Fauth
15d6b45a15
Remove jQuery Fullscreen plugin dependency
Uses the Fullscreen API instead.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-11 14:10:55 -03:00
Maurício Meneghini Fauth
d83abf63e7
Use PSR-12 for control structures spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 15:27:03 -03:00
Maurício Meneghini Fauth
0b8edc5bde
Use PSR-12 for namespace use statements
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 14:18:35 -03:00
William Desportes
0c4595bc04
Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-02-17 16:35:57 +01:00
William Desportes
0a1dd4cf00
Fix a coding standard mistake
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-02-17 13:24:47 +01:00
William Desportes
4fb7646aad
Fix #16657 - load database/qbe.js at all times
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-02-17 03:22:32 +01:00
Maurício Meneghini Fauth
1e5fbd57fc
Create Twig\AssetExtension and image Twig function
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-28 16:09:17 -03:00
Maurício Meneghini Fauth
c2bec44e23
Fix an error found by PHPStan
Cherry-pick: 89b09159d0

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-13 23:06:14 +01:00
Maurício Meneghini Fauth
a1d1ab85cb
Split rte.js into routines.js, triggers.js and events.js
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-11 17:02:50 -03:00
Maurício Meneghini Fauth
89dba07132
Remove rte.js dependency from navigation.js
Only loads the rte.js file for the RTE pages.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-10 12:43:12 -03:00
Maurício Meneghini Fauth
89b09159d0
Fix an error found by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-06 16:59:04 -03:00
Paul Gomez
23e23e3b3b
Added "Build Query" button to Visual Query Builder #16485
There was a ```if not visual_builder ``` that kept it from displaying. I did a search to see if that value is supplied and what it would mean.

Signed-off-by: Paul Gomez <pauldro952@hotmail.com>
2020-12-31 23:22:50 +01:00
Maurício Meneghini Fauth
3c6955fed5
Move tables export to Database\ExportController
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-12-06 14:08:36 -03:00
William Desportes
ed0c44a621
Update files to follow new coding standard rules
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-11-16 19:36:52 +01:00
Maurício Meneghini Fauth
0a4b10ba5e
Remove toggle button generator
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-14 13:17:03 -03:00
Maurício Meneghini Fauth
c11e8d5f64 Remove Common::database method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-02 18:56:58 -03:00
Maurício Meneghini Fauth
ef62d7a9f5 Remove is_system_schema PHP global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-02 18:48:23 -03:00
Maurício Meneghini Fauth
71c2f2d99a Remove is_show_stats PHP global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-02 18:48:23 -03:00
Maurício Meneghini Fauth
3c49539a98 Extract db collation handler from Common class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-02 18:48:23 -03:00
Maurício Meneghini Fauth
36d93cf2f9 Remove Common::table method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-11-02 18:48:23 -03:00
Maurício Meneghini Fauth
a83ec78ebf Make DatabaseInterface::isUserType method private
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-24 00:40:03 -03:00
Maurício Meneghini Fauth
71d9a8f760 Remove is_grantuser and is_createuser PHP globals
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-23 22:58:49 -03:00
Maurício Meneghini Fauth
db3da81056 Remove some useless comments
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-13 19:56:56 -03:00
Maurício Meneghini Fauth
e7bdd39ae6 Remove DBI dep from Database\AbstractController
Moves the DatabaseInterface class dependency to the classes that use it.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-12 10:46:27 -03:00
Maurício Meneghini Fauth
e6ec9df84e Remove DBI dep from Controllers/AbstractController
Moves the DatabaseInterface class dependency to the classes that use it.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-11 22:48:44 -03:00
Maurício Meneghini Fauth
bb32ba6d9c Fix some coding standard issues
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-04 12:31:43 -03:00
William Desportes
aecdfc80cb
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-10-04 00:29:04 +02:00
Maurício Meneghini Fauth
c447bac98d Move Routines::main to the controller
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-02 23:13:31 -03:00
Maurício Meneghini Fauth
ea163ffcae Move CentralColumns to the Database namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-30 10:14:22 -03:00
Maurício Meneghini Fauth
9c8d8cf304 Extract HTML from central columns populate
Creates a new route for it as well.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-23 23:51:19 -03:00
Maurício Meneghini Fauth
2e1f5f0b34 Move CentralColumn main template call to the controller
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-23 22:01:11 -03:00
Maurício Meneghini Fauth
801f3a405b Extract HTML from CentralColumns::getHtmlForEditingPage
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-23 19:43:35 -03:00
Maurício Meneghini Fauth
5aa2856f7f Remove Util::buildActionTitles and the titles global
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-12 22:50:08 -03:00
Maurício Meneghini Fauth
cd862d4f00 Remove replication_info global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-12 09:04:44 -03:00
Maurício Meneghini Fauth
3c21cf1853 Remove url_query PHP global
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-08 13:32:25 -03:00
Maurício Meneghini Fauth
c57dda7315 Use DI for Sql class constructor
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-05 15:31:39 -03:00
Maurício Meneghini Fauth
ceac762e09 Remove pmaThemePath and pmaThemeImage PHP globals
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-02 10:57:57 -03:00
Maurício Meneghini Fauth
7936909dbd Move Operations::getMaintenanceActions to the view
Uses Table\MaintenanceController to handle the maintenance actions in
the table operations page.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-28 15:25:14 -03:00
Maurício Meneghini Fauth
46f28b42c9 Extract the Table\MaintenanceController class
Extracts the table maintenance action methods from
the Database\StructureController class to the
new Table\MaintenanceController class and adjust templates
and routes names.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-27 23:33:43 -03:00
Maurício Meneghini Fauth
620cb0a705 Create a dedicated page for Repair Table
Instead of only showing the query results.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-27 22:38:24 -03:00
Maurício Meneghini Fauth
98a1943b35 Create a dedicated page for Optimize Table
Instead of only showing the query results.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-27 22:26:19 -03:00
Maurício Meneghini Fauth
c1ad98f83d Create a dedicated page for Checksum Table
Instead of only showings the query results.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-27 21:59:48 -03:00
Maurício Meneghini Fauth
5c06dede81 Create a dedicated page for Analyze Table
Instead of only showing the query results.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-27 21:12:12 -03:00
Maurício Meneghini Fauth
c112bfd6d6 Create a new page for Check Table
Instead of only showing the query results.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-27 14:22:22 -03:00
Maurício Meneghini Fauth
55c5c80d37 Rename Display\ImportAjax class
Renames to Import\Ajax.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-20 12:07:54 -03:00
Maurício Meneghini Fauth
fa67657b1a Remove Display\Import class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-20 00:21:26 -03:00
Maurício Meneghini Fauth
28436399dd Extract exit from Display\Import class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-19 02:28:02 -03:00
Maurício Meneghini Fauth
65b79af29e Refactor Plugins::getPlugins method
Replaces parameters with explicit methods.
 - Plugins::getExport
 - Plugins::getImport
 - Plugins::getSchema

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-19 01:40:27 -03:00
Maurício Meneghini Fauth
6cf316bde8 Use DI for Export\Options class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-04 15:43:06 -03:00
Maurício Meneghini Fauth
75397c913d Refactor Display\Export class
- Uses template inheritance for the export templates.
- Renames Display\Export to Export\Options.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-03 23:56:20 -03:00
Maurício Meneghini Fauth
879ae32edc Extract HTML from server, db and table export controllers
- Controllers\Server\ExportController::index
- Controllers\Database\ExportController::index
- Controllers\Table\ExportController::index

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-01 14:08:51 -03:00
Maurício Meneghini Fauth
d0716e9d31 Remove Display\CreateTable::getHtml
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-29 21:49:55 -03:00
Maurício Meneghini Fauth
3f01cd8c13 Remove Message::display method
Related to https://github.com/phpmyadmin/phpmyadmin/issues/16258.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-20 19:43:46 -03:00
Maurício Meneghini Fauth
1dccc10493 Extract method for adding script files
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-12 16:58:33 -03:00
Maurício Meneghini Fauth
f8320956ee Remove Config\PageSettings::showGroup method
Related to https://github.com/phpmyadmin/phpmyadmin/issues/16258.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-12 16:01:18 -03:00
Maurício Meneghini Fauth
918b1f38c6 Change return type of Sql::executeQueryAndSendQueryResponse
Remove Response::addHTML call.

Related to https://github.com/phpmyadmin/phpmyadmin/issues/16258.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-12 15:22:57 -03:00
Maurício Meneghini Fauth
3b285ff17e Use identical operator for non-empty strings
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-10 18:06:29 -03:00
Maurício Meneghini Fauth
a22f7b1b7a Fix some PHPStan errors
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-04 00:00:59 -03:00
Maurício Meneghini Fauth
05c62ad1a8 Fix some PHPStan errors
Fixes "Cannot access offset on array" errors.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-02 16:12:07 -03:00
Maurício Meneghini Fauth
2a981907d6 Extract copy action from db structure index method
Fixes #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-24 21:10:11 -03:00
Maurício Meneghini Fauth
a05557a273 Extract copy with prefix from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-24 20:55:22 -03:00
Maurício Meneghini Fauth
427bd8dfdf Extract replace prefix from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-21 18:54:14 -03:00
Maurício Meneghini Fauth
b91e9784ba Extract add prefix from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-21 02:34:55 -03:00
Maurício Meneghini Fauth
7ce0ae202d Fix missing message after dropping tables
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-21 01:54:48 -03:00
Maurício Meneghini Fauth
7cca45723e Extract empty action from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-21 01:40:24 -03:00
Maurício Meneghini Fauth
c9c17a2946 Extract drop action from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-21 00:08:25 -03:00
Maurício Meneghini Fauth
be5e055b9e Extract repair action from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-20 19:35:51 -03:00
Maurício Meneghini Fauth
d1e10a9158 Extract optimize action from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-20 15:09:10 -03:00
Maurício Meneghini Fauth
ec0c941dc8 Extract checksum action from db structure index method
Related to #16173;

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-20 01:49:37 -03:00
Maurício Meneghini Fauth
4ee25bee29 Extract analyze action from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-17 20:36:43 -03:00
Maurício Meneghini Fauth
f3e5a30102 Extract check action from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-17 17:47:02 -03:00
Maurício Meneghini Fauth
b64e41fb8f Use early exit for db structure multiSubmitAction method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-17 14:54:47 -03:00
Maurício Meneghini Fauth
9b0173c207 Extract empty form action from db structure index method
Related to #16173 and #15248.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-17 14:35:07 -03:00
Maurício Meneghini Fauth
0befcf6432 Extract drop action from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-16 19:46:19 -03:00
Maurício Meneghini Fauth
63a41eba87 Extract change prefix form from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-16 15:14:22 -03:00
Maurício Meneghini Fauth
11df26d9ab Extract add prefix form from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-13 23:28:04 -03:00
Maurício Meneghini Fauth
982914922b Extract make consistent action from db structure index
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-13 17:58:50 -03:00
Maurício Meneghini Fauth
e7a35f8e50 Extract central col remove from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-13 14:22:48 -03:00
Maurício Meneghini Fauth
0ec86b7b0f Extract central col add action from db structure index method
Related to #16173.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-12 15:56:07 -03:00
Maurício Meneghini Fauth
058729db08 Extract copy form action from db structure index method
Related to #16173 and #15248.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-12 14:39:29 -03:00
Maurício Meneghini Fauth
31e484ac75 Extract showCreate logic from templates
Create the Database\StructureController::getShowCreateTables method.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-12 01:09:08 -03:00
Maurício Meneghini Fauth
d7bc1d9e4f Extract show-create action from db structure index method
Related to #16173

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-11 23:35:27 -03:00
Maurício Meneghini Fauth
4e8484229a Extract export action from db structure index method
Related to #16173

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-06-11 21:48:36 -03:00
William Desportes
761045bcc9
Move getSystemSchemas and isSystemSchema to Query\Utilities
If you think the class name could be better, feel free to improve it.
Everybody know naming classes is difficult ^^
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-31 01:42:53 +02:00
Maurício Meneghini Fauth
58eee2e371 Use early exit when possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-27 21:46:12 -03:00
Maurício Meneghini Fauth
f4582e083e Use early exit when possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-27 00:35:24 -03:00
Maurício Meneghini Fauth
bd979dd1ff Remove useless elseif with if
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 22:53:44 -03:00
Maurício Meneghini Fauth
94955f187a Fix function call signatures indentation
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 04:22:02 -03:00
Maurício Meneghini Fauth
3ae05c785d Use short list syntax and single line arrays
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 03:32:59 -03:00
Maurício Meneghini Fauth
3baad2eb1c Fix some coding standard issues
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-25 22:42:37 -03:00
William Desportes
0138cb471f
Some minor code improvements
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-17 22:29:57 +02:00
Maurício Meneghini Fauth
80a45fa0ae Break too long lines
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-16 18:08:20 -03:00
William Desportes
9bc55b2bc9
Remove some unused variable assignements
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-15 22:44:50 +02:00