Commit Graph

212 Commits

Author SHA1 Message Date
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
af148ad92b Enable strict mode in PHP files
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-16 04:36:04 -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
b68b570773 Refactor setup/form_processing to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-14 17:51:34 -03:00
Maurício Meneghini Fauth
614b8a6978 Refactor setup/index functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-14 17:51:34 -03: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ř
a82f8fc768 Move databaase interface load to static method
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-06 14:46:56 +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
Raghuram
5521531213 Minor fix #13564
Signed-off-by: Raghuram <raghuram.4350@gmail.com>
2017-08-06 15:12:52 +05:30
Maurício Meneghini Fauth
452bf6b2d0 Add PhpMyAdmin\Setup namespace
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-07-21 08:04:58 -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
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
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
Michal Čihař
769f9ab88f Merge branch 'QA_4_7' 2017-03-30 14:09:19 +02:00
Michal Čihař
8beb7f544e Fixed broken links in setup
Fixes #13133

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-30 14:07:42 +02:00
Shreyas Sinha
1dfce55965 Incorrect protocol number at 401/303 headers (#12920)
Shared code for handling HTTP response codes and correctly
set it based on PHP SAPI.

Signed-off-by: Shreyas Sinha <shreyas.sinha14@gmail.com>
2017-02-14 13:20:13 +01:00
Michal Čihař
1b7914a4e5 Remove connect_type setting
It is really not necessary as MySQL decides connection type rather based
on hostname than on anything else.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-02 16:08:44 +01:00
Michal Čihař
1dd22f4dea Merge branch 'QA_4_6-security' into master-security 2017-01-07 11:02:01 +01:00
Michal Čihař
c962ee4287 Remove setup download/load/delete features
This removes risk of third party manipulating with the configuration as
there was race condition between editing and using the file.

Downloading the file should not be big hassle and this really makes the
whole setup a bit simpler.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-21 11:34:42 +01:00
Osaid Rehman Nasir
73c6a7eb9f Use Header class for headers manipulation
* Added mocking of response object
* Rectified mistake of calling method once
* implemented mock properly
* replaced header with response header 

Issue #12079

Signed-off-by: Osaid osaid.nasir@gmail.com
2016-12-20 16:37:11 +01:00
Michal Čihař
49a20101e2 Merge branch 'QA_4_6' 2016-12-13 10:39:42 +01:00
Michal Čihař
90e4325bcf Rewrite https in setup and messages handling
- The client side check is more reliable
- Does not depend on server setup
- Removed related inline javascript (see #12261)

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-13 10:31:25 +01:00
Michal Čihař
9c5528b4cb Merge branch 'QA_4_6' 2016-08-18 17:09:24 +02:00
Michal Čihař
c44f5ab080 Always use UTC time in HTTP headers
Using timezones in this context can cause problem when DST changes
apply.

Also this can be information leak of server timezone.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-18 17:07:00 +02:00
Michal Čihař
a6a78a2517 Merge branch 'QA_4_6' 2016-06-17 14:22:51 +02:00
Michal Čihař
61b4e28faf Sanitize page and formset before using
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 14:21:53 +02:00
Michal Čihař
dce94f229f More consistency for URL::getCommon
Now URL::getCommon always returns HTML encoded string, if you want
unencded one, use URL::getCommonRaw. This makes it easier to review the
code if uses correct variant.

Also I've fixed several wrong uses of the HTML encoded variant in
Location header.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 12:44:29 +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ř
ed96969ff9 Merge branch 'QA_4_5' 2016-01-28 09:23:27 +01:00
Michal Čihař
447c88f488 Can not use PMA_fatalError when including fails
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-26 14:30:57 +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
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
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
9ee3931c09 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 10:43:10 -05:00
Hugues Peccatte
09f87f4770 Make PHPCS happy.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-10-07 22:09:55 +02:00
Hugues Peccatte
cef71b8136 Set VersionInformation in a namespace.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-26 21:50:23 +02:00
Hugues Peccatte
71b62bcef9 Merge remote-tracking branch 'origin/master' into useNamespaces_master 2015-09-26 13:50:49 +02:00
Madhura Jayaratne
2da36e93b2 Fix #11464 phpMyAdmin suggests upgrading to newer version not usable on that system
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-09-22 21:35:05 +10:00
Madhura Jayaratne
75d7927604 Do not suggest upgrading when there is no compatible versions
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-09-21 21:37:55 +10:00
Madhura Jayaratne
c3fefc2e4a Fix #11464 phpMyAdmin suggests upgrading to newer version not usable on that system
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-09-14 20:14:51 +10: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
7f8f34e89d Remove classes require_once.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-01 21:30:22 +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