Commit Graph

55 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
9d5da68a8b Fix uncaught TypeError
> chdir() expects parameter 1 to be a valid path, null given

Partially reverts c642c29aa4.

Sets $dbi even if Server config is empty.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-14 23:18:38 -03:00
Yunhao Tian
56be819ee4
Renders absolutely nothing when header is not enabled.
When downloading blob data from database, the header template will be rendered as `\n` which adds an extra 0x0A at the beginning of the blob data. This fixes the problem.

Signed-off-by: Yunhao Tian <18373444@buaa.edu.cn>
2019-12-30 18:42:05 +01:00
Maurício Meneghini Fauth
e1f9ae00cd Add a trailing comma in multi-line arrays
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-14 14:09:26 -03:00
Maurício Meneghini Fauth
61f3a93019 Rename js/menu-resizer.js to js/menu_resizer.js
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-27 01:42:19 -03:00
Maurício Meneghini Fauth
562b5a48f0 Remove PMA_ from PMA_commonParams and PMA_commonActions names
PMA_commonParams => CommonParams
PMA_commonActions => CommonActions

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-05-21 00:18:44 -03:00
Hugues Peccatte
ff3325870f Remove unused variables
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-05-14 21:59:57 +02:00
Hugues Peccatte
50bcfc8ed6 Remove useless attribute
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-05-14 21:59:57 +02:00
Maurício Meneghini Fauth
7d199a7bc2 Fetch dbi from DI instead of global in Navigation class
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-23 16:43:16 -03:00
Maurício Meneghini Fauth
c642c29aa4 Extract HTML from Navigation::getDisplay()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-22 15:57:16 -03:00
Maurício Meneghini Fauth
47fa0d8bdb Extract HTML from Header::getDisplay()
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-19 15:37:33 -03:00
Hugues Peccatte
f06883d2a7 Remove useless parenthesis
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-01-20 01:23:53 +01:00
Maurício Meneghini Fauth
4cee0cbc12 Adds space after not (!) and type cast
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-05 21:56:34 -02:00
Maurício Meneghini Fauth
5bce6d9fa6 Add Bootstrap javascript file
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-12-20 22:34:12 -02:00
Tomas Votruba
637fe6de06 [cs] remove unused brackets, clean unused property assign
Signed-off-by: Tomas Votruba <tomas.vot@gmail.com>
2018-11-26 17:54:40 +01:00
Tomas Votruba
bf720bad29 remove unused and fix @param, @var and @return annotation values
Signed-off-by: Tomas Votruba <tomas.vot@gmail.com>
2018-11-24 21:47:26 +01:00
Maurício Meneghini Fauth
222bf67795 Fix uncaught TypeError in Header class
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-10-25 01:27:24 -03:00
Tazo Todua
17b85ab50c Improve AllowThirdPartyFraming configuration (#14688)
The only correct way to check the frame-options. The existing version was incorrect. Even setting to value to "blabla", it bypassed the ! check in php. So, at first, it should be checked if the "sameorigin" is value, and after that, everything other than true should DENY the frame.

Signed-off-by: Tazo Todua <tazotodua@gmail.com>
2018-10-24 14:03:12 -03:00
Maurício Meneghini Fauth
a686ff8360 Refactor Header class to use templates
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-09-23 03:20:55 -03:00
William Desportes
3dce65d913 phpstan level 1 (#14472)
* level +1
* Install sami/sami globaly to avoid dependency clash

Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-08-18 14:37:41 -03:00
Maurício Meneghini Fauth
5e2e27dfeb
Merge pull request #14233 from nulll-pointer/recent_table_issue
Fixes issue with recent table list, #14229
2018-07-03 20:46:44 -03:00
Lakshay arora
9d08a1dcaf Puts PMA import handler in a separate javascript file.
Makes 'enable_drag_drop_import' as a separate configuration directive, removes it from group of $cfg['IMPORT'] directives.
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-06-25 12:37:43 +05:30
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
Maurício Meneghini Fauth
e524d63908
Merge pull request #14265 from aswaniprakash/PMA_14019
Issue #14019 fix: Allow parameter in AllowThirdPartyFraming
2018-05-13 16:43:40 -03:00
Maurício Meneghini Fauth
df2bbf5a4c Add type declarations to Header
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-10 01:23:03 -03:00
Aswani Prakash
6d3d6afa3e Issue 14019 fix: Allow parameter in AllowThirdPartyFraming
Signed-off-by: Aswani Prakash <aswani15prakash@gmail.com>
2018-05-08 10:38:31 +05:30
Lakshay arora
727b40e00c Fixes issue with recent table list, #14229
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
2018-04-25 22:58:35 +05:30
Maurício Meneghini Fauth
38767030ef Remove @ operator from ini_get()
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-03-01 22:36:35 -03:00
Michal Čihař
f4026f60a4 Merge branch 'QA_4_7' 2018-03-01 16:02:57 +01:00
Maurício Meneghini Fauth
17bf8b7309 Replace static methods with instance methods
Replaces PhpMyAdmin\UserPreferences static methods with instance methods.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-02-23 15:26:02 -03:00
Michal Čihař
c162a75b9b Improve javascript loading
- jquery-ui-timepicker-addon.js is loaded in Header, no need to load it
  elsewhere
- jquery.validate.js is needed on way to many pages to benefit of
  loading only on some of them

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-15 08:36:23 +01: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ř
5346416625 Simplify Scripts::addFile API
Removed unused parameter to define ordering of scripts.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-29 15:09:43 +01:00
Michal Čihař
3b6a994dcd Move collation connection setting to user preferences
It is now handled same way as other user settings.

Issue #11688
Issue #13466

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-29 14:16:31 +01:00
Michal Čihař
8b511acd95 Use PMA_Config to get configuration value 2017-11-29 11:32:11 +01: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ř
cedad5f931 Remove sprites from the themes
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-13 14:12:12 +01:00
Michal Čihař
895ee146d6 Fix undefined variable wihout DB connection
This might be called from path where DB connection is not needed.

Fixes #13805

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-13 12:24:27 +01:00
Michal Čihař
60c1b32472 Remove usage of $GLOBALS['userlink']
The links are internal to DatabaseInterface and user link is default.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-25 10:21:18 +02:00
Maurício Meneghini Fauth
79612e975f Update jQuery Migrate to 3.0.1
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-10-20 12:58:13 -02:00
Michal Čihař
1a9555b6e2 Fix condition for possibly unset variable
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-02 16:10:03 +02:00
Michal Čihař
d2d32651bc Replace empty() by strlen()
In order to fix operation with database or table called 0.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-02 15:53:44 +02:00
Michal Čihař
448a221ea0 Fix passing boolean values as PMA_commonParams
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-28 11:07:08 +02:00
Maurício Meneghini Fauth
ce49e7f60f Refactor user_preferences functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-12 22:31:02 -03:00
Michal Čihař
04279efdff Merge branch 'QA_4_7' 2017-09-04 10:17:45 +02:00
Michal Čihař
bccb3ff27a Merge branch 'QA_4_7' 2017-07-21 14:23:01 +02:00
Maurício Meneghini Fauth
dc1407ca66 Move navigation classes to PhpMyAdmin namespace
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-19 21:52:26 -03: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
Manish Bisht
7e4c38fc18 added viewport meta tag
Signed-off-by: Manish Bisht <manish.bisht490@gmail.com>
2017-07-10 22:20:37 +05:30