Commit Graph

70 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
465c443488 Fix docblock comment spacing in Util::linkToVarDocumentation
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-07-27 18:29:13 -03:00
William Desportes
38009efb65
Add support for MySQL/MariaDB variables documentation
- Uses preferential mode MySQL docs for MySQL users and MariaDB docs for MariaDB users
- Unit tests now use data that only exists for tests
- Added package williamdes/mariadb-mysql-kbs

Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-07-26 17:12:35 +02:00
Maurício Meneghini Fauth
2d58411bee Some coding style fixes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-06-18 21:30:06 -03:00
Maurício Meneghini Fauth
5edbdf2063 Remove Template::get() method
Uses Template::render() instead of Template::get().

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-06-18 19:46:36 -03:00
Maurício Meneghini Fauth
244d4e8e81 Replace Template::get calls in libraries/classes
Uses Template::render() instead of Template::get().

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-06-18 18:18:24 -03:00
Leonardo Strozzi
0d26cfb5f1 Finish db designer refactor
Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
2018-06-11 19:37:07 -03:00
Maurício Meneghini Fauth
2005cca77f Fix methods and properties visibility issues
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 21:02:26 -03:00
Maurício Meneghini Fauth
285e38e931 Fix some PSR-2 coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 09:07:56 -03:00
Maurício Meneghini Fauth
b9c0463d96 Use short array syntax instead of long array syntax
Replaces array() with [].

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 01:42:21 -03:00
Maurício Meneghini Fauth
6cf8ee0831 Enable strict mode in some classes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-15 01:03:57 -03:00
Lakshay arora
9231620c2d Fix for issues with spatial fields (#14125)
*  Fix for issues with spatial fields

Fixes the following issues:

1.    #14068 SPATIAL fields with no unique index/autoincrement error when clicking
      This error occurs when there is no unique column to uniquely identify a tuple. I've disabled the geomtery view and made view as wkt the default view in such cases.

2.    #14121 View spatial fields as WKT doesn't work

1.    #14067 IS NULL search operator produces no WHERE SQL with spatial fields

Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>

* Fix for issues with spatial fields
This commit fixes view as BINARY not working in the previous commit.
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>

* Fix for issues with spatial fields

Fixes typo in previous commits.

Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-05-12 03:44:58 -03:00
Maurício Meneghini Fauth
aa32ace0dc Refactor FileListing methods
Replaces static methods with instance methods.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-09 22:07:45 -03:00
Maurício Meneghini Fauth
de250fbae3 Fix MariaDB 10.2 current_timestamp()
Fixes #13968 and fixes #13999. Closes #14177.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-08 07:39:53 -03:00
Lakshay arora
3bd97cef53 Fixes error 404 on creating views, issue #14082
Signed-off-by: Lakshay arora <arora.lakshya123@gmail.com>

(cherry picked from commit 29c45385ec)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-03-29 16:10:51 -03:00
Maurício Meneghini Fauth
3d8eafd68a Extract HTTP requests related methods
Move HTTP requests related methods from Util class to
PhpMyAdmin\Utils\HttpRequest class.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-01-22 17:31:57 -02:00
Michal Čihař
1ebf6c4953 Remove references to sourceforge.net issue trackers
We do not use it for years and all issues have been migrated.

Signed-off-by: Michal Čihař <michal@cihar.com>
2018-01-02 13:24:05 +01:00
Maurício Meneghini Fauth
e7003167ff Use template for Util::getFKCheckbox method
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-27 23:44:23 -02:00
Michal Čihař
0b5b287049 Merge branch 'QA_4_7' 2017-12-15 11:10:00 +01:00
Gabriel Caruso
a8bd364e02 Clean elses
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2017-12-14 22:02:17 -02:00
Maurício Meneghini Fauth
4a8bd1cf5c Fix toggle button not showing background image
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-05 15:53:14 -02:00
Maurício Meneghini Fauth
c930c7a030 Fix coding standard errors
Automatic fixes by phpcbf.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-04 13:40:36 -02:00
Maurício Meneghini Fauth
01fd301003 Use 'elseif' keyword istead of 'else if'
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-04 13:31:25 -02:00
Michal Čihař
bed6fb4ebd Avois passing extension to Util::getImage
We do not use it anyway for quite some time and this way it's less
processing to generate the img tag.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 14:24:42 +01:00
Michal Čihař
fd9150460e Use fully CSS based icons
- themes can easier customize their look
- this better deals with previous JS code who relied on sprites (fixes #13815)

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 13:47:43 +01:00
Michal Čihař
f29640c5d8 Remove $strip_img parameter from Util::linkOrButton
It did not behave as documented for ages, it only influenced
whether additional text was added to the link.

Callers should use parameters to Util::getIcon to achieve this
(if it is actually needed somewhere)

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:41:27 +01:00
Michal Čihař
ad72aaecc2 Avoid passing default params to Util::linkOrButton
Do not pass optional parameters with default values.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:41:27 +01:00
Michal Čihař
3cd104a454 Remove not needed $force_button paratemet from Util::linkOrButton
It was used to force POST for few links with the SQL, but that
is now done automatically.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:41:27 +01:00
Michal Čihař
486ab532f3 Remove magic to add message in Util::linkOrButton
The passed parameter should be already valid, we should avoid expensive
processing of the data such as calling strip_tags on every text
containing <img.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:41:27 +01:00
Michal Čihař
9c087ccffc Document when POST is used in Util::linkOrButton
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:41:27 +01:00
Michal Čihař
99e9854473 Always use POST for links containing SQL query
This way the SQL queries will not apper in the web server logs.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:33:53 +01:00
Michal Čihař
657ee671fc Avoid double html encoding of link target
This is done when printing the attributes as well.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:33:53 +01:00
Michal Čihař
1a0bb3ebd5 Avoid using mb_* function for URL length calculation
It is handled in bytes on the webserver side, so use limits in bytes not
in chars as mb_strlen does.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:33:53 +01:00
Michal Čihař
50c65bc3fb Remove no longer needed $new_form from Util::linkOrButton
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:33:53 +01:00
Michal Čihař
3b9fb2b664 Simplify handling of long URLs in Util::linkOrButton
We no longer create form, but rather rather tag the link to be handled
as POST on the client side.

This way the code is way simpler without need on any special case
handling on server side.

Fixes #13649

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 15:33:53 +01:00
Michal Čihař
efe62c9422 Remove special case for JS event handlers in Util::linkOrButton
This is not used anywhere and makes little sense anyway.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-16 11:37:14 +01:00
Michal Čihař
cedad5f931 Remove sprites from the themes
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-13 14:12:12 +01:00
Michal Čihař
95b8235d4a Move sprites data caching to Theme class
The data is constant for theme, so we don't have to deal with cache
invalidation in testsuite and in corner cases.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-02 14:53:20 +01:00
Michal Čihař
cca4146ef6 Simplify code generating doc URL
The testsuite case can be same as default.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-02 14:53:20 +01:00
Michal Čihař
369b0edb42 Remove test for no longer used PMA_TEST_THEME
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-02 14:25:40 +01:00
Michal Čihař
ae0a259bac Move link parameter as last in getTablesFull
It is currently not used here, so move it to the end.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Scrutinizer Auto-Fixer
40f56c0a95 Remove not needed use statements
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-23 18:49:37 +02:00
Maurício Meneghini Fauth
49caca9185 Refactor database/structure/sortable_header
Move templates/database/structure/sortable_header.phtml logic to
PhpMyAdmin\Util::sortableTableHeader method.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-10-17 16:17:47 -02:00
Michal Čihař
e4ca1ae98f Remove cell_align_left superglobal
It can be replaced by proper CSS.

Issue #11731
Issue #12262

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-10 13:04:45 +02:00
Michal Čihař
d574aede08 Bind Types to DatabaseInterface
This wayt it's automatically passed with DBI.

Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-10 12:05:02 +02:00
Madhura Jayaratne
f88a609f7b Merge branch 'QA_4_7' 2017-10-09 23:20:43 +11:00
Maurício Meneghini Fauth
f8bd078088 Fix code standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-30 18:19:09 -03:00
Maurício Meneghini Fauth
1d4125f15c Add array type declarations
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-24 23:49:59 -03:00
Maurício Meneghini Fauth
e555b77946 Refactor file_listing functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-11 22:58:58 -03:00
Maurício Meneghini Fauth
532f821463 Refactor rte_footer functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-08 16:24:22 -03:00
Isaac Bennetch
1e36be831e Merge pull request #13342 from Achilles-96/Multi-Table-Query-UI
Replace "Query By Example" with new "Multi Table Query" interface
2017-08-23 12:23:59 -04:00