Commit Graph

53 Commits

Author SHA1 Message Date
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
Michal Čihař
8621b70c88 Various coding style fixes
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-08-23 15:43:54 +02:00
Raghuram
75404f72a8 Interface design for Multi-table query
Signed-off-by: Raghuram <raghuram.vadapalli@research.iiit.ac.in>
2017-08-15 11:04:40 +05:30
Michal Čihař
ec259e8afd Allow checking parameters in the request
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-08-02 09:38:17 +02:00
Michal Čihař
4f80efb477 Remove no longer valid comment
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-08-02 09:27:17 +02:00
Michal Čihař
8270a1c1e1 Indicate SSL status on main page
- indicate status on main page
- indicate possible configuration issues
- show in red if remote connection is not using SSL
- add overview documentation for server SSL setup

Fixes #12354

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-21 15:04:59 +02:00
Maurício Meneghini Fauth
570e826155 Move util.lib function into Util class
Move PMA\Util\get function to PhpMyAdmin\Util::getValueByKey

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-21 08:04:58 -03:00
Maurício Meneghini Fauth
2631bcedba Move plugins classes to PhpMyAdmin namespace
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-20 11:50:12 -03:00
Michal Čihař
d15da74eda Merge branch 'QA_4_7' 2017-07-18 12:00:02 +02:00
Michal Čihař
942e44afe7 Merge pull request #13499 from nijel/theme
Move Theme object out of session
2017-07-18 09:45:11 +02:00
Michal Čihař
8b00b90372 Remove last uses of PMA_MYSQL_INT_VERSION define
It is only kept as name in Advisor for now.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-17 15:27:27 +02:00
Michal Čihař
8512442a7b Use existing detection for showing server type
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-17 14:53:17 +02:00
Michal Čihař
51fb18612a Move Theme object out of session
Honestly I don't see good reason for storing Theme in session as loading
it from the session will take about same time as loading it from the
disk.

Additionally it seems that current code really didn't really use the
object stored in session, it was constructed with every request anyway
(by ThemeManager::initializeTheme).

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-17 14:18:35 +02:00
Maurício Meneghini Fauth
95a409c4f2 Move controllers to PhpMyAdmin namespace
- Move base controllers to PhpMyAdmin namespace
- Move database controllers to PhpMyAdmin namespace
- Move server controllers to PhpMyAdmin namespace
- Move table controllers to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-14 11:18:48 -03:00
Michal Čihař
0983378e29 Replace PMA_SETUP define by configuration variable
This way we don't need runkit for testing and it's anyway a bit cleaner
approach.

Issue #13484

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-12 17:35:09 +02:00
Michal Čihař
6521f7de39 Add wrapper around PHP date function to ease testing
This way Tracker tests run on PHP 7 as well.

Issue #13484

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-12 17:22:48 +02:00
Manish Bisht
4b69b625a0 minor fixes
Signed-off-by: Manish Bisht <manish.bisht490@gmail.com>
2017-07-10 22:29:51 +05:30
Manish Bisht
74310bb3ef basic responsive navigation implemented
Signed-off-by: Manish Bisht <manish.bisht490@gmail.com>
2017-07-10 22:20:37 +05:30