Aleksander Machniak
f2688ba492
Use ?? operator where applicable
2021-09-21 19:12:06 +02:00
Aleksander Machniak
b28dc5a667
PHP 8.1: Enable PDO::ATTR_STRINGIFY_FETCHES
2021-07-29 19:13:52 +02:00
Josh Soref
203f456620
Spelling ( #8001 )
2021-04-18 08:43:18 +02:00
Aleksander Machniak
747bcd2ff4
Fix handling of table prefix and quoting in insert_or_update()
...
In all places we use this function the $table argument has already
been passed through table_name() method, i.e. it contains the prefix
and is quoted. So, we should not do this again.
2021-02-15 11:31:06 +01:00
Aleksander Machniak
a03a1db73c
Tabs to spaces
...
[skip ci]
2021-02-06 16:59:05 +01:00
Michael Stilkerich
ae3f9c215e
Improve preciseness of some PHPdoc annotations ( #7809 )
2021-01-09 10:05:46 +01:00
Aleksander Machniak
f4ed1024dc
PHP8 fixes, CS fixes, short array syntax, tests
2020-12-02 20:15:00 +01:00
Aleksander Machniak
066faa1485
CS fixes, short array syntax, PHP8 fixes, tests
...
also fixed listing of table columns on SQLite database
2020-11-28 10:06:41 +01:00
Aleksander Machniak
97991b59be
Add more tests for contact actions, fix various code issues
2020-11-05 11:59:02 +01:00
Aleksander Machniak
545a1569f1
Steps -> Actions refactoring ( #7688 )
...
* Move action handling code to rcmail class
* Add rcmail_action class
* Add action aliases
* Get rid of $OUTPUT global
* Move some methods from rcmail to rcmail_action
* PHP8 compat. fixes
* Add framework for testing actions
* Fix obvious code mistakes
2020-11-01 11:25:38 +01:00
Aleksander Machniak
f95212d626
PHP8: More warnings fixed
2020-10-11 15:24:30 +02:00
Aleksander Machniak
bde383d051
PHP8: Fix various issues
...
for now only these I found by running our unit tests, there will be much more
2020-10-11 10:32:41 +02:00
Aleksander Machniak
a5c2b4360c
Fixes in context of undefined variables, and code style
2020-08-15 12:13:31 +02:00
Michael Stilkerich
25e42439d2
Fix inconsistencies in phpdoc type annotations ( #7474 )
2020-07-25 09:59:01 +02:00
Aleksander Machniak
bb3975adbe
Fix insert_or_update() broken on SQLite/MSSQL/Oracle ( #7465 )
2020-07-02 08:41:50 +02:00
Aleksander Machniak
60c8dd2e23
Fix regression where using an absolute path to SQLite database file on Windows didn't work ( #7196 )
2020-01-31 16:13:28 +01:00
Aleksander Machniak
1613f3ab4c
INSERT OR REPLACE implementation ( #6771 )
...
For now with support in postgres and mysql databases.
For now used in rcube_cache, rcube_imap_cache and enigma plugin
2020-01-19 18:43:48 +01:00
Aleksander Machniak
2f928a516d
Fix DB Write test on SQLite database ("database is locked" error) ( #7064 )
...
Also fix so SQLite DSN with a relative path to the database file works in Installer
2019-11-24 09:37:14 +01:00
Aleksander Machniak
67898b23e4
Fix tables listing routine when DSN contained a database with unsupported suffix ( #7034 )
2019-11-15 09:57:14 +01:00
Aleksander Machniak
a80d73602f
Fix db_prefix handling in queries with TRUNCATE TABLE <name> and UNIQUE <name> ( #7013 )
2019-11-11 14:53:41 +01:00
Aleksander Machniak
1afa46d28d
PHPDoc and CS fixes
2019-08-25 14:15:09 +02:00
Jack Cherng
198585d8a0
Fix implode() wrong parameter order ( #6866 )
...
It has been deprecated in PHP 7.4.
Such as PHP deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /var/www/roundcubemail/program/lib/Roundcube/rcube_db.php on line 917
Signed-off-by: Jack Cherng <jfcherng@gmail.com >
2019-08-09 16:04:51 +02:00
Aleksander Machniak
57c67db029
Remove year(s) from copyright headers + some cleanup
2019-04-16 10:42:45 +02:00
laodc
672e57ea48
Patched bug where rcube_db::quote() was causing an infinite connection loop. ( #6175 )
...
As rcube_db::quote() checks to see if the connection is up before quoting, this would cause the class to try connect again, as rcube_db::$dbh was not being set until AFTER conn_configure was completed, causing a loop.
So updated rcube_db::$dbh in the rcube::conn_create() function instead allowing access to the new object straight away.
It's needed for edeb5d7 .
2018-02-19 10:48:06 +01:00
Aleksander Machniak
05ea5a5548
Add ignore_errors option to rcube_db, so error logging can be disabled temporarily
...
Use ignore_errors to make sure the DDL upgrade errors are printed only once.
2017-07-02 11:51:05 +02:00
Aleksander Machniak
72f19c079f
Installer: Fix DB schema initialization on MS SQL Server
2017-04-06 12:17:59 +02:00
Aleksander Machniak
e160e48069
Fix undesired effects when postgres database uses different timezone than PHP host ( #5708 )
...
Allow passing DateTime variables as query arguments. Their value will
be converted to date/time input string in format specific to the database type
(with timezone on postgres).
2017-04-03 12:06:23 +02:00
ka7
9a35768c26
spelling fixes ( #5690 )
2017-03-12 12:14:19 +01:00
Aleksander Machniak
c1c0a0d815
Implemented rcube::sleep() method for disconnecting all external connection in long-running/sleeping scripts
2016-09-21 11:20:43 -04:00
Aleksander Machniak
184de7735c
CS fixes (mostly phpdoc)
2016-08-18 08:50:59 +02:00
Aleksander Machniak
c478536741
Make SQL selects less expensive in memory for some cases where we fetch big data chunks
2016-06-10 18:45:28 +02:00
Aleksander Machniak
7e3298753a
Use ternary operator where aplicable
2015-11-14 10:08:07 +01:00
Aleksander Machniak
0ee57208b3
Add possibility to set PDO::ATTR_PREFETCH and PDO::ATTR_TIMEOUT via DSN string
2015-09-23 12:58:05 +02:00
Aleksander Machniak
a958748947
CS fixes
2015-06-07 15:26:33 +02:00
Aleksander Machniak
48d01837a0
Fix tables listing routine on mysql and postgres so it skips system or other database tables and views ( #1490337 )
2015-04-06 12:00:09 +02:00
Aleksander Machniak
496972bf95
Fix backtick character handling in sql queries ( #1490312 )
2015-03-12 09:44:31 +01:00
Aleksander Machniak
8f485469c7
Add possibility to configure max_allowed_packet value for all database engines ( #1490283 )
2015-02-24 12:23:11 +01:00
Aleksander Machniak
7b924535fd
CS fixes
2015-01-03 13:59:07 +01:00
Thomas Bruederli
a63b9b546c
Add plugin hook 'db_table_name' as requested in #1489837
2014-11-03 15:14:38 +01:00
Aleksander Machniak
fb8adc8a19
Remove Oracle driver based on PDO_OCI extension
2014-09-18 16:48:53 +02:00
Aleksander Machniak
8451577659
Added transactions support
2014-09-17 20:39:16 +02:00
Aleksander Machniak
d7c91c14f8
Add Oracle driver which uses OCI8 extension - the one that supports CLOB columns
2014-09-17 19:58:54 +02:00
Aleksander Machniak
34a0902089
Use consistent column/table quoting in sql queries
2014-09-12 14:37:51 +02:00
Aleksander Machniak
4baf96a4ca
Added license headers to driver files, CS fixes
2014-09-08 09:50:59 +02:00
Aleksander Machniak
3ce4f0a839
Revert [ 78a58162], TABLE_SCHEMA column does not exist in mysql, also
...
tables in postgres can be in 'public' schema.
2014-04-29 12:29:11 +02:00
Aleksander Machniak
90f7aa9e39
Fix varius db_prefix issues ( #1489839 )
...
- Move DDL script execution code to rcube_db class(es).
- Improve prefix replacement code, so index names are also modified
2014-04-29 11:34:43 +02:00
Marc-Oliver Teschke
78a58162d8
When checking if DB schema is up-to-date, limit the checks to tables in our current schema. Otherwise installer might return false positives when DB user has access to multiple schemas.
...
Signed-off-by: Marc-Oliver Teschke <teschke@planwerk6.de >
2014-04-14 17:08:01 +02:00
Aleksander Machniak
00de8ddf8d
Small performance improvements, use str_replace() instead of strtr(),
...
do not parse query if there are no params to replace,
keep one instance of (potentially long) query less in memory
2013-11-06 13:11:31 +01:00
Aleksander Machniak
899e594474
Key duplicate error on postgres uses SQLSTATE=23505
2013-10-14 09:09:01 +02:00
Thomas Bruederli
6a6992f650
Assign the chosen mode to the table map
2013-10-07 11:52:21 +02:00