Michal Čihař
03b2002ee4
Fix typo in transformation
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-30 22:21:37 -05:00
Michal Čihař
2b87c7d643
Fix condition checking for result
...
Fixes #13637
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-04 15:04:46 +02:00
Michal Čihař
47f7ba159e
Fixed error when browsing non SELECT results
...
We can not assume that the analyzer will work on our query.
Fixes #13639
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-04 15:04:46 +02:00
Remi Collet
49fecb8427
fix brackets
...
Signed-off-by: Remi Collet <remi@php.net>
2017-06-28 10:34:35 +02:00
Michal Čihař
1f4b6ec0ac
Ensure we have only integers in colum visibility and ordering data
...
Fixes PHP error in case of invalid table preferences.
Fixes #13152
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-05 10:12:24 +02:00
Michal Čihař
27fb0b58af
Merge branch 'QA_4_6'
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-23 14:07:29 +01:00
Michal Čihař
e4bf536906
Update to SQL Parser 4.0.1
...
It now follows PSR-4 and uses PhpMyAdmin namespace prefix.
See https://github.com/phpmyadmin/sql-parser/issues/126
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-23 13:56:35 +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
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ř
11fcf44078
Merge branch 'QA_4_6'
2016-10-18 10:48:11 +02:00
Deven Bansod
1824f33650
Use justBrowsing only if outputting the results from a single table
...
The issue #12533 happens because we use countRecords on the parent table since it is incorrectly set,
while actually we should be looking at SQL_CALC_FOUND_ROWS instead.
Fix #12533
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-10-15 13:32:52 +05:30
Deven Bansod
790882735d
Merge branch 'QA_4_6'
2016-10-15 13:09:59 +05:30
Deven Bansod
1aaedb32ca
Don't output edit/delete row links when table is not set
...
Issue #12625
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-10-15 13:08:58 +05:30
Deven Bansod
4f3b22b00a
Merge branch 'QA_4_6'
2016-10-13 10:59:47 +05:30
Deven Bansod
8c357fab12
Also unset just_one_table while having subquery or having more than or less than 1 tables selected
...
Issue #12625
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-10-13 10:58:05 +05:30
Deven Bansod
3996046254
Merge branch 'QA_4_6'
2016-10-13 10:19:40 +05:30
Deven Bansod
6b256e89dd
Don't set just_one_table to true when JOIN is present in query
...
Fix #12625
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-10-13 10:17:11 +05:30
Michal Čihař
fc5bb4a278
Merge branch 'QA_4_6'
2016-10-03 19:38:40 +02:00
Michal Čihař
0292b89c4a
Merge remote-tracking branch 'origin/pull/12596' into QA_4_6
2016-10-03 19:35:07 +02:00
Deven Bansod
77d1adcc47
Merge branch 'QA_4_6'
...
Conflicts:
po/id.po
po/mk.po
2016-10-03 10:53:28 +05:30
Deven Bansod
4fb7d73401
Don't assume justBrowsing if there is a Join in the query
...
Fix #12189
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-10-03 10:50:32 +05:30
Deven Bansod
96eba72fa6
Fix #12327 : Show as PHP No longer works
...
Fix output of show_as_php. Don't show the links that are not required
or that may not work as expected
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-09-27 13:47:31 +05:30
Deven Bansod
44b96a37e0
Merge branch 'QA_4_6'
2016-09-23 11:12:34 +05:30
Deven Bansod
2f0ec14993
Refactor check function instead of separate function
...
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-09-23 11:12:06 +05:30
Michal Čihař
df8a3693bf
Merge branch 'QA_4_6'
2016-09-22 09:51:04 +02:00
Deven Bansod
f4877a7826
Assign LIMIT clause only to syntactically correct queries
...
Assigning LIMIT clause to an syntactically-wrong query is not needed.
Also we would want to show the true query and the true error message to the query executor
Fix #12321
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-09-22 12:26:02 +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ř
3debfa5d1f
Merge branch 'QA_4_6'
2016-09-06 11:33:32 +02:00
Deven Bansod
715403c0e7
Fix #12531 : Properly flag queries as DROP DATABASE
...
Parser recognizes various DROP statements correctly, but the flags set by SQL Parser are incorrectly used.
In js/functions.js, removed the Regex-based matching, rather handle it in PHP as we have correct flags available from SQL Parser
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-09-06 14:20:19 +05:30
Michal Čihař
3bcd45f87f
Merge commit '2ee0e4ed0e86572f15764fea6ef37bdaf546e6ee'
2016-08-01 11:05:39 +02:00
Deven Bansod
2c5541a94b
Fix #12399 : Adding index to table shows wrong top navigation
...
If the SQL query analyzing sets the $table value to '',
don't update the original value
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-08-01 11:41:44 +05:30
Michal Čihař
9869a95641
Simplify Message adding methods
...
The methods are now called based on added type:
- addHtml adds HTML code as is
- addText adds text after escaping it
- addMessage adds Message instance
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 15:23:45 +02:00
Michal Čihař
19f76066f2
Separate adding string and Message objects to Message
...
This way we can rely on type checking and avoid potential problems with
escaping.
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 15:16:29 +02:00
Michal Čihař
18c0786eae
Improve addMessage calls
...
- add call which accepts HTML markup
- use separator where applicable
- extend testcase to see HTML markup handling
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 14:25:33 +02:00
Michal Čihař
46e8121e41
Do not pass unexpected value as printview
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 13:27:19 +02:00
Michal Čihař
5bb7349e0d
Merge branch 'QA_4_6'
2016-05-23 09:21:33 +02:00
Michal Čihař
6d4bd77745
Avoid not needed urlencode/urldecode for bookmarked SQL query
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-23 09:12:52 +02:00
Madhura Jayaratne
263bd601e6
Remove bookmark library includes
...
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2016-03-09 23:57:09 +11:00
Madhura Jayaratne
43cfba9f24
Refactor bookmarking
...
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2016-03-09 23:39:29 +11:00
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ř
6895a1fc6e
Revert "fix_11907"
...
This reverts commit bfe30d1261 .
It removes the message in many cases where it should be shown.
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-02-17 10:49:01 +01:00
Piyush
bfe30d1261
fix_11907
...
Signed-off-by: Piyush <poush12@gmail.com>
2016-02-12 22:01:08 +05:30
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ř
c036b92b8b
Merge branch 'QA_4_5'
2016-01-19 11:59:52 +01:00
Michal Čihař
1431625d68
Fixes possible error when query is empty/not analyzed
...
Fixes #11873
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-19 11:45:52 +01:00
Michal Čihař
0f119bb329
Merge branch 'QA_4_5'
2016-01-19 11:31:41 +01:00
Michal Čihař
1523c4b364
Gracefully handle calling sql.php without SQL query
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-19 11:23:36 +01:00
Madhura Jayaratne
56f684e466
Move common code inside the method
...
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
2016-01-14 13:09:55 +11:00
Michal Čihař
7444c5340e
Add missing docstring
...
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-01-05 16:37:26 +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