Commit Graph

334 Commits

Author SHA1 Message Date
Piyush Vijay
0a979865e1 Add db_operations.js to modular code.
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
2018-08-17 13:55:24 +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
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
d98658187a Replace PhpMyAdmin\Relation static calls
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-03-25 19:32:13 -03:00
Maurício Meneghini Fauth
a862add418 Replace static methods with instance methods
Replace PhpMyAdmin\Operations static methods with instance methods.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-02-25 12:43:49 -03:00
Michal Čihař
8dc0f4b819 Use session to indicate switching to new database
There is no reason to store this in cookies.

Issue #11688

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-28 15:51:33 +01:00
Madhura Jayaratne
ac64e36131 Merge branch 'QA_4_7' 2017-11-05 11:04:58 +11:00
Madhura Jayaratne
92d747e141 Fix #13800 Database lost when renaming to similar name and lower_case_table_names=1
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2017-11-05 10:59:49 +11:00
Michal Čihař
0c44d41e5e Remove unused code
This has no use since 03d37b45f1
(for more than 7 years).

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-24 14:13:45 +02:00
Michal Čihař
98964e2f59 Remove is_superuser superglobal
Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-10 12:28:00 +02:00
Maurício Meneghini Fauth
15d8ee270f Refactor relation_cleanup functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-12 18:14:37 -03:00
Maurício Meneghini Fauth
700e081833 Refactor plugin_interface functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-12 17:36:39 -03:00
Maurício Meneghini Fauth
a2b08bae7b Refactor check_user_privileges to static methods
Refactor check_user_privileges.lib.php functions to static methods and move logic to check_user_privileges.inc.php.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-11 22:09:05 -03:00
Maurício Meneghini Fauth
512d81cb29 Refactor display_create_table to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-07 09:37:02 -03:00
Maurício Meneghini Fauth
e2c83b954b Refactor relation functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-08-22 20:51:27 -03:00
Maurício Meneghini Fauth
0d11ecc728 Refactor operations functions to static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-08-20 21:28:36 -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ř
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
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
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
Michal Čihař
edad6fc2d9 Remove custom layout for operations pages
Using plain layout looks better in most situations. Maybe we should
limit width as well, but I'm not sure about that.

Fixes #13145
Obsoletes #13339
Obsoletes #13369

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-06-28 16:16:37 +02:00
Michal Čihař
dbdd7bcb9d Adds error if copy database name have the same name
Fixes #13099
Fixes #13104

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-12 09:01:11 +02:00
Michal Čihař
f73a98e421 Fixed database renaming
Fixes #12955

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-06 13:31:39 +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ř
b56f101039 Remove is_ajax_request global
We already have the same information on Response object, so let's use it
from there.

Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-07 17:54:34 +01:00
Michal Čihař
dad93483c1 Merge branch 'QA_4_6' 2016-11-10 11:08:36 +01:00
Deven Bansod
f14cffdbe7 Properly escape strings in MySQL statement values
Use *_real_escape string functions provided by connectors to escape strings while exporting

Fix #12453

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>

Conflicts:
	libraries/server_privileges.lib.php
2016-10-29 10:45:12 +05:30
Michal Čihař
3546bed47e Avoid using mb_strlen for checking whether string is empty
Using strlen produces same results here, just way faster.

Fixes #12397

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-16 10:29:21 +02:00
Michal Čihař
9348d0cb16 Separate adding HTML markup to message from others
We really want this to be explicit for easier review and hiding this in
second parameter of addParam doesn't make it.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 13:41:35 +02:00
Michal Čihař
3e2029e750 Move MySQL charsets handling to the Charsets class
Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-11 12:55:42 +02:00
Michal Čihař
e2deac4b22 Move getting collation to the DBI layer
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-11 11:42:29 +02:00
Michal Čihař
2a9fb73f92 Remove PmaAbsoluteUri from redirects
This is no longer needed as per RFC 7231.

Issue #11412

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-03 14:32:14 +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
Hugues Peccatte
f9d582bd09 Make PHPCS happy.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-11-08 15:58:48 +01:00
Hugues Peccatte
6f4676cdfc Merge remote-tracking branch 'origin/master' into useNamespaces_master 2015-10-04 18:04:49 +02:00
Marc Delisle
fd7c8522ea Clarify method name
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-10-03 10:14:29 -04: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
42c0ebac85 Merge branch 'master' into useNamespaces_master 2015-09-09 22:05:00 +02:00
Madhura Jayaratne
98372481bb Remove Drizzle from database level functions
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2015-09-10 01:02:40 +10:00
Hugues Peccatte
04b4f723d8 Move libraries/plugins/auth and export classes into a namespace.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-09-05 00:09:30 +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
Marc Delisle
bb01f9b2b7 Refactor db_info.inc.php
Signed-off-by: Marc Delisle <marc@infomarc.info>
2015-08-25 11:16:59 -04:00
Jason
1c28e6a8ab Creating StructureController
Signed-off-by: Jason <jason.daurus@gmail.com>
2015-07-31 01:04:30 +08:00
Hugues Peccatte
08919d9252 Make PHPCS happy.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2015-07-25 09:36:48 +02:00