Commit Graph

115 Commits

Author SHA1 Message Date
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
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ř
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ř
f9c73c7b10 Remove special casing for font size
It is now stored in configuration in same way as any other setting.

Issue #13466
Issue #11688

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-28 15:16:01 +01:00
Michal Čihař
460e30d17b Merge branch 'QA_4_7' 2017-11-27 09:01:25 +01:00
Michal Čihař
f7e6366d01 Use correct name for motranslator call
We're not using php gettext, so using _ is mistake.

Issue #13436

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 08:59:36 +01: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ř
df7f328f79 Rewrite User preferences forms as clases
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-06 11:02:07 +02:00
Michal Čihař
0b81218a10 Refactor configuration descriptions into class
This avoids loading them all into global namespace on every request.

Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-05 14:44:05 +02:00
Michal Čihař
dc420e2872 Merge branch 'QA_4_7' 2017-07-10 15:00:36 +02:00
Michal Čihař
bd2a0ec307 Wrap file_exists calls with @
It can produce warnings in case open_basedir is enabled.

Fixes #13467

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-10 14:59:43 +02:00
Maurício Meneghini Fauth
5e7f6a1bab Move config classes to PhpMyAdmin namespace
- Move ConfigFile to PhpMyAdmin namespace
- Move FormDisplay to PhpMyAdmin namespace
- Move Form to PhpMyAdmin namespace
- Move PageSettings to PhpMyAdmin namespace
- Move ServerConfigChecks to PhpMyAdmin namespace
- Move Validator to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-09 15:16:37 -03:00
Maurício Meneghini Fauth
ca910e8de8 Move classes to PhpMyAdmin namespace
- Move Table to PhpMyAdmin namespace
- Move Template to PhpMyAdmin namespace
- Move ThemeManager to PhpMyAdmin namespace
- Move Theme to PhpMyAdmin namespace
- Move Tracker to PhpMyAdmin namespace
- Move Transformations to PhpMyAdmin namespace
- Move TypesMySQL to PhpMyAdmin namespace
- Move Types to PhpMyAdmin namespace
- Move Util to PhpMyAdmin namespace
- Move VersionInformation to PhpMyAdmin namespace
- Move Url to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-08 10:54:21 -03:00
Maurício Meneghini Fauth
8f943ae1c0 Move classes to PhpMyAdmin namespace
- Move Sanitize to PhpMyAdmin namespace
- Move SavedSearches to PhpMyAdmin namespace
- Move Scripts to PhpMyAdmin namespace
- Move ServerStatusData to PhpMyAdmin namespace
- Move Sql to PhpMyAdmin namespace
- Move StorageEngine to PhpMyAdmin namespace
- Move SubPartition to PhpMyAdmin namespace
- Move SysInfoLinux to PhpMyAdmin namespace
- Move SysInfoSunOS to PhpMyAdmin namespace
- Move SysInfoWINNT to PhpMyAdmin namespace
- Move SysInfo to PhpMyAdmin namespace
- Move SystemDatabase to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-07 01:46:08 -03:00
Maurício Meneghini Fauth
119563b7ea Move classes to PhpMyAdmin namespace
- Move OpenDocument to PhpMyAdmin namespace
- Move OutputBuffering to PhpMyAdmin namespace
- Move Partition to PhpMyAdmin namespace
- Move Pdf class to PhpMyAdmin namespace
- Move RecentFavoriteTable to PhpMyAdmin namespace
- Move Response to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-06-30 23:44:10 -03:00
Maurício Meneghini Fauth
54a15dbd9c Move classes to PhpMyAdmin namespace
- Move Logging to PhpMyAdmin namespace
- Move Menu to PhpMyAdmin namespace
- Move Message to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-06-30 13:30:04 -03:00
Maurício Meneghini Fauth
13c0f7bc3c Move classes to PhpMyAdmin namespace
- Move Advisor to PhpMyAdmin namespace
- Move Bookmark to PhpMyAdmin namespace
- Move Charsets to PhpMyAdmin namespace
- Move Config class to PhpMyAdmin namespace
- Move Console class to PhpMyAdmin namespace
- Move Core to PhpMyAdmin namespace
- Move DatabaseInterface to PhpMyAdmin namespace
- Move DbList to PhpMyAdmin namespace
- Move DbQbe to PhpMyAdmin namespace
- Move DbSearch to PhpMyAdmin namespace
- Move DisplayResults to PhpMyAdmin namespace
- Move Encoding to PhpMyAdmin namespace
- Move Error to PhpMyAdmin namespace
- Move ErrorHandler to PhpMyAdmin namespace
- Move File to PhpMyAdmin namespace
- Move Font to PhpMyAdmin namespace
- Move Footer to PhpMyAdmin namespace
- Move Header to PhpMyAdmin namespace
- Move Index to PhpMyAdmin namespace
- Move IndexColumn to PhpMyAdmin namespace
- Move LanguageManager to PhpMyAdmin namespace
- Move Language to PhpMyAdmin namespace
- Move Linter to PhpMyAdmin namespace
- Move ListAbstract to PhpMyAdmin namespace
- Move ListDatabase to PhpMyAdmin namespace

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-06-28 21:17:18 -03:00
Maurício Meneghini Fauth
e330402b5b Refactor the core functions into static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-06-03 00:52:22 -03:00
Maurício Meneghini Fauth
05e39541c7 Remove inline CSS
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-05-22 23:21:03 -03:00
Michal Čihař
8f640b9030 Do not point users to setup when it is disabled
Fixes #13084

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-15 16:18:05 +01:00
Michal Čihař
308c9d7951 Simplify Response object handling
- always use use and short name
- avoid calling getInstance() several times in one script

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-07 18:17:59 +01:00
Michal Čihař
df66e4fa08 Share code for handling uploaded file
There is no need to duplicate the incomplete logic in several places.

Issue #12514, #12690

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-28 12:05:59 +01:00
Michal Čihař
2ed64c3c6a Merge branch 'master' into master-security 2016-10-24 13:55:39 +02:00
Deven Bansod
f6d2804aba Merge branch 'QA_4_6' 2016-10-05 11:36:04 +05:30
Deven Bansod
889cd31618 Prevent leaving an orphaned file while importing preferences
Fix #12362

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-10-05 11:33:44 +05:30
Michal Čihař
01f7b3c134 Merge branch 'QA_4_6-security' into master-security 2016-10-04 17:25:05 +02:00
Deven Bansod
f87358dff7 Don't assume the default arg_separator in URL
Respect the value for arg_separator.input too.

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-10-02 10:42:55 +05:30
Michal Čihař
a15a847ade Add support for export user settings as config.inc.php snippet
Fixes #6274

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 16:35:03 +02:00
Michal Čihař
ca5eb903b0 Make ThemeManager a singleton instead of storing it in the session
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-11 15:34:25 +02:00
Durgesh
6650f7b07d Refactor text sanitization and javascript escaping, Issue #11989, #11988
Signed-off-by: Durgesh <007durgesh219@gmail.com>
2016-02-22 14:45:19 +05:30
Durgesh
0b64827930 Refactored url parmeters generating, Issue #11990
Signed-off-by: Durgesh <007durgesh219@gmail.com>
2016-02-22 14:36:41 +05:30
Michal Čihař
0c34cb60a0 Merge branch 'QA_4_5' into QA_4_6 2016-02-12 13:47:04 +01:00
Michal Čihař
53b1f9adcc Silent errors on checking for files and folders
Fixes #11951
Fixes #11952

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-12 13:45:04 +01:00
Michal Čihař
55b317c699 Remove /*overload*/ prefix from mb_* calls
I believe this was temporary flagging to see which code is migrated and
can be safely removed now.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-04 16:35:28 +01:00
Michal Čihař
cc07b737dc Remove unused PMA_String class
The class is no longer used:

- the ctype part is not needed by new SQL parser
- the utf-8 manipulation was replaced by direct usage of mbstring

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-21 12:09:06 +01:00
Michal Čihař
98d88ef134 Remove unused pmaString variable
It was used in past when we didn't rely on mbstring.

Signed-off-by: Michal Čihař <michal@cihar.com>
2015-12-21 11:35:36 +01:00
Marc Delisle
06d22e636e Remove some unnecessary string concatenations
https://github.com/dseguy/clearPHP/blob/master/rules/no-unnecessary-string-concatenation.md

Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-12-07 09:41:46 -05:00
Marc Delisle
e16bc39f85 Remove some unnecessary string concatenations
https://github.com/dseguy/clearPHP/blob/master/rules/no-unnecessary-string-concatenation.md

Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-12-05 07:27:29 -05:00
Marc Delisle
357b1b4757 Remove some unnecessary string concatenations
https://github.com/dseguy/clearPHP/blob/master/rules/no-unnecessary-string-concatenation.md

Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-12-04 09:05:42 -05:00
Marc Delisle
2607023281 Remove some unnecessary string concatenations
https://github.com/dseguy/clearPHP/blob/master/rules/no-unnecessary-string-concatenation.md

Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-12-03 11:00:01 -05:00
Hugues Peccatte
a5d35d41b6 Revert PMA_String rename.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-14 22:39:03 +02:00
Hugues Peccatte
e5e447e937 Set namespace on config classes.
Update config classes.
Add @noinspection tag.
Update documentation and script.
Set ConfigGenerator in a namespace.
Rename ConfigGenerator filename.
Remove ConfigGenerator requires.
Fix namespaces of mock objects.
Remove useless require.
Add missing 'use'.
Add missing require.
Update PHPDoc.
Fix class test typo.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-01 21:30:23 +02:00
Hugues Peccatte
0761fb1801 Rename classes files.
Rename classes.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-01 21:30:21 +02:00
Hugues Peccatte
f0ba28fc1d Set namespace on Advisor, Config, Console and Util classes.
Set namespace on DbQbe.
Set namespace to 'DbSearch'.
Split Advisor.class.php file.
Change Advisor namespace.
Rename DbQbe class and file.
Set namespace on DisplayResults.
Set namespace on Error.
Use namespace for ErrorHandler.
Add class autoloader.
Change ErrorHandler filename.
Remove some require.
Update Config namespace path.
Update PMA_Util to PMA\libraries\Util.
Rename Font and File classes files.
Use namespace for Footer.
Set namespace in all libraries classes.
Namespace OutputBuffering.
Export SubPartition.
Rename Partition file.
Namespace PDF.
Namespace RecentFavoriteTable.
Replace PMA_Response by Response and PMA_Message by Message.
Update uses and calls.
Fix unit tests.
Fix SqlParser autoload.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-01 21:22:52 +02:00
Nisarg Jhaveri
9dfd32317d Fix coding style in page settings
Signed-off-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>
2015-05-22 20:20:27 +05:30
Nisarg Jhaveri
9c77ec694e Navigation panel settings
Signed-off-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>
2015-05-22 17:15:03 +05:30
Madhura Jayaratne
0f76d59e1e Quit using filter_input since they bypass token check
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-05-15 07:45:09 +05:30
Nisarg Jhaveri
431847b39e Return HTML instead of echo-ing directly in FormDisplay
Signed-off-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>
2015-05-15 00:56:26 +05:30
Madhura Jayaratne
598435fdda Spaces around - operator
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-04-27 18:13:23 +05:30
Hugues Peccatte
66c3491041 Minor HTML/PHP rewrite.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-02-08 16:35:16 +01:00