Maurício Meneghini Fauth
dd885dc7b8
Use single-line arrays when possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-27 17:39:17 -03:00
Kamil Tekiela
142f15f373
Use quoteString in controllers ( #18191 )
...
* CreateController
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* FindReplaceController
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* SetVariableController
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* GetVariableController
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* UserGroupsFormController
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* TablesController
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-03 17:40:45 -03:00
Maurício Meneghini Fauth
556594b4cd
Fix coding standard spacing issues
...
- Fixes one line doc comments
- Fixes parent call spacing
- Fixes constant spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 21:06:17 -03:00
Maurício Meneghini Fauth
77957a69a5
Add trailing comma for multi-line functions
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 20:48:46 -03:00
Maurício Meneghini Fauth
785f8c1c00
Use constructor property promotion where possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 19:39:02 -03:00
Maurício Meneghini Fauth
613678f8f5
Replace assignments with null coalesce equal operator
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 17:03:05 -03:00
Kamil Tekiela
e0ef08d871
Extract functionality into methods for better readability
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-16 12:38:49 +00:00
Kamil Tekiela
87419d3cd2
Fix bug caused by earlier refactoring
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-16 12:13:33 +00:00
Kamil Tekiela
164bf08f4c
Move getColumnMapFromSql() to SystemDatabase
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 12:41:47 +00:00
Kamil Tekiela
8a1d6f1eaa
Convert var annotations to typed properties
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-12 21:31:04 +00:00
Kamil Tekiela
22cb5f2a84
Remove globals from create controller ( #18046 )
...
* $GLOBALS['column_map']
* Replace globals with constants
* $GLOBALS['sep']
* $GLOBALS['arr']
* $GLOBALS['view_columns']
* $GLOBALS['systemDb']
* $GLOBALS['pma_transformation_data']
* $GLOBALS['new_transformations_sql']
* $GLOBALS['view']
* $GLOBALS['item']
* $GLOBALS['parts']
* Add TODO comment
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-10 16:17:49 -03:00
Kamil Tekiela
e3e351c676
Remove dead code
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-01-25 00:59:43 +00:00
Kamil Tekiela
99f37f4b7b
Remove redundant is_array check
...
It's always array because of `if (empty($view['name']))` check
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-14 17:23:35 +00:00
Kamil Tekiela
959849f446
Introduce ServerRequest::hasBodyParam() ( #17870 )
...
* Drop Sql::setUiProp()
* Remove ternary operator
* Improve array guard
* Remove redundant isset
* Implement hasBodyParam()
* Add has() and hasQueryParam()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-05 13:04:45 -03:00
Maurício Meneghini Fauth
4bd3a1c423
Fix some issues and update SA baselines
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-29 17:27:51 -03:00
Oliver Mensah
59f9a2e526
isset fixes
...
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Oliver Mensah
4419f84bc1
Update libraries/classes/Controllers/View/CreateController.php
...
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Oliver Mensah
3f709e8286
Update libraries/classes/Controllers/View/CreateController.php
...
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Oliver Mensah
f77597295e
Update libraries/classes/Controllers/View/CreateController.php
...
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Oliver Mensah
00c3cf53dd
Update libraries/classes/Controllers/View/CreateController.php
...
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Oliver Mensah
529f798420
check for null on ajaxdialog
...
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Oliver Mensah
edca90a011
view should already by set by then
...
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Oliver Mensah
00115845db
provide default value for sql_query
...
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Oliver Mensah
091443dccb
meeting code standard with phpcbf
...
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Oliver Mensah
f34675608e
Use ServerRequest Object to access POST-vars
...
Signed-off-by: Oliver Mensah <olivermensah96@gmail.com>
2022-10-21 08:35:38 +00:00
Maurício Meneghini Fauth
bb97ed988f
Reduce usage of the containerBuilder global variable
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-29 22:36:46 -03:00
Maurício Meneghini Fauth
f5d738db59
Move input.sqlbutton event listener to sql.js file
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-19 16:48:10 -03:00
Maurício Meneghini Fauth
eb3703882b
Move Routing::getCurrentRoute to ServerRequest
...
The route is retrieved from the request, so it makes sense to move the
method to the Http\ServerRequest class.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-06-06 23:36:57 -03:00
Maurício Meneghini Fauth
5950693fb3
Fix possible undefined globals
...
Related to https://github.com/phpmyadmin/phpmyadmin/pull/17427 .
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-10 18:05:21 -03:00
Maurício Meneghini Fauth
f940693c75
Move Util::checkParameters method to the AbstractController
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-07 22:59:33 -03:00
Maurício Meneghini Fauth
1438cb211e
Replace global keyword with $GLOBALS
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-07 17:31:11 -03:00
Kamil Tekiela
9afa59487e
Collapse if statements into one
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-06 19:38:22 +00:00
Maurício Meneghini Fauth
feca48cc76
Change return type of DatabaseInterface::getError method
...
Now, it returns last error message or an empty string instead of false
if no errors occurred.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-27 14:43:14 -03:00
Maurício Meneghini Fauth
f00d70cccb
Remove useless whitespaces
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-15 17:05:40 -03:00
Maurício Meneghini Fauth
3531775b7c
Add type declarations to the controllers contructors
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-11 17:32:22 -03:00
Maurício Meneghini Fauth
fb257e5922
Extract actions from Table\StructureController
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-09 13:48:07 -03:00
Maurício Meneghini Fauth
96adfe37f4
Extract actions from controllers to new ctrls
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-06 18:30:21 -03:00