ralf
664bb86b2a
WIP timesheet timers: create a single working time timesheet per configured periode of day, week or month
2022-10-14 10:12:11 +02:00
ralf
b13c1d97b4
fix PHP 8.x throws mysqli_sql_exception when it can not connect
2022-09-09 08:24:39 +02:00
ralf
cf355d1d5c
do NOT stall because DB does not know the TZ, report once per session
...
Happens with PHP 8.1 and older MariaDB (or MySQL) without (loaded) timezone data
Unknown or incorrect time zone: 'UTC'
2022-09-05 10:52:29 +02:00
ralf
c57ae62d1c
fix not working installation under PHP 8.1 due to mysqli throwing errors now by default
2022-05-20 18:00:54 +02:00
ralf
9a0cc36366
fix PHP 8.1 throws \mysqli_sql_exception or \PDOException for SQL errors
...
- change them to our regular Api\Db\Exception
- for prop(find|patch) explicitly catch PDOException to deal more graceful with non-ascii prop-names
2022-05-10 12:36:25 +02:00
ralf
4fd00df861
fix diverse undefined array-key or variable warnings
2022-04-29 12:44:43 +02:00
ralf
22954466c8
improve logging of updating SQL statements to given table(s)
2022-02-16 14:06:36 +02:00
Ralf Becker
33ec3f05a7
fix Undefined array key warning
2021-11-29 16:45:48 +02:00
Ralf Becker
b1af39be37
fix big chunk of PHP 8.0 warnings
2021-10-21 10:39:57 +02:00
Ralf Becker
91bd7c7aeb
an other chunk of fixed PHP 8.0 Warnings
2021-10-07 10:14:43 +02:00
Ralf Becker
fed41622c2
fixing all sorts of PHP 8 errors and PHPStorm errors
2021-03-31 17:50:01 +02:00
Ralf Becker
37e5e12c3c
PHP 8 fix: adding explicit cast for comparing DB-version to a float major number
2021-03-31 13:31:42 +02:00
nathangray
e3a1d1b338
Fix static var accessed as a constant
2021-03-23 16:23:23 -06:00
Ralf Becker
eb2b3943d7
fix Db errors with PHP 7.4+
...
caused by private $this->app not stored in session when Db\Depricated was instaciated
also move $GLOBALS[egw]->ADOdb to a static class var to fix session restore order caused $GLOBALS[egw] not yet restored giving a warning
2021-03-21 17:39:34 +01:00
Ralf Becker
57d5176080
remove non-digits and only search phone-numbers in phoneSearch
2021-02-15 21:28:39 +02:00
Ralf Becker
1259ae8d04
More automatic timezone handling schema for new code (hopefully not breaking existing code):
...
1. SO converts all timestamps to Api\DateTime objects using Api\DateTime::server2user($ts, 'object')
- Api\Storage and Api\Storage\Base class do that automatic if using 'object' as $timestamp_type constructor parameter
- if using just Api\Db you need to iterate over your selects manually and apply Api\DateTime::server2user($ts, 'object')
- timestamps are store in DB in server timezone and above conversation honors that and additionally set the user TZ
2. Rest of the app should keep all timestamps as Api\DateTime objects
- direct comparison works for Api\DateTime (and PHP \DateTime) as __toString() method automatic converts to UTC timestamps
- do NOT convert them to timezone-less timestamps and no further timezone conversation needed for output with eTemplate
3. eTemplate2 converts automatic to user timezone for displaying dates and times
- you need to use <date-time ... data_format="object"/> to get Api\DateTime objects back from eTemplate!
4. Api\Db converts automatic to server timezone when quoting DateTime objects for integer or timestamp columns
5. only output other then eTemplate might need to set a timezone different from the user TZ before calling $ts->format()
2021-01-26 11:16:42 +02:00
Ralf Becker
496c168db4
* Api: setting configured server-timezone for the databases connection, to fix cases were they do not match
2020-10-19 17:25:07 +02:00
Ralf Becker
e996b2c0cf
reverting 2 changes around sessions which break our installation
...
checking for the not existing (new) database runs into an invinit recursion
the checks not to use $_SESSION, if no session is active was added in an attempt to get SimpleSAMLphp discovery working, but seems unneccessary for what we currently use
2020-06-15 10:11:31 +02:00
Ralf Becker
4c131c1866
SAML/Shibboleth with multiple IdP or optional on regular login page
2020-06-10 15:19:24 +02:00
Ralf Becker
d1785a5340
MySQL 8.0 fails to create user as part of GRANT ALL statement
2019-07-10 09:19:00 +02:00
Ralf Becker
4b5890a501
do NOT used persistent connections, if they are disabled in php.ini
2019-05-29 11:28:46 +02:00
Ralf Becker
fb31d08aba
fix column_data_explode or update $col => array() gives SQL error
...
writing it now as NULL (or "" if column is NOT NULL)
2019-03-03 15:13:44 +01:00
Ralf Becker
08200bd99c
loading ADOdb through composer
2019-02-23 13:10:18 +01:00
Ralf Becker
1ed0fd898f
fix error: Call to undefined method calendar_ical::get_table_definitions()
2019-01-24 09:10:06 +01:00
Ralf Becker
bad2c9e571
fix SQL error for MariaDB 10.3 on inserting 4-byte utf-8 chars
...
enabling the replacement now uncoditional for MySQL/MariaDB
2019-01-14 12:08:34 +01:00
Ralf Becker
bb2557491d
* Api: truncate varchar for all DB types now, as MariaDB 10.3 also errors on to big content
2018-12-09 13:54:35 +01:00
Ralf Becker
e805a02ef3
fix not working sharing if primary DB node has failed
2018-12-03 18:29:05 +01:00
Ralf Becker
0f80e158ff
also set Error/Errno, if database is readonly
2018-10-28 09:29:25 +01:00
Ralf Becker
f1437d4ccb
fixing a couple more PHP Warning count(): Parameter must be an array or an object that implements Countable
2018-04-13 09:12:26 +02:00
Ralf Becker
c2c1bdb6ad
* EMail/Tracker/InfoLog: fix error converting mails by replacing 4-byte utf8 chars
...
MySQL and MariaDB before 10.1 need 4-byte utf8 chars replaced with our default utf8 charset
(MariaDB 10.1 does the replacement automatic, 10.0 cuts everything off behind and MySQL gives an error)
Changing charset to utf8mb4 requires schema update, shortening of some indexes and probably have negative impact on performace!
if (substr($this->Type, 0, 5) == 'mysql' && $this->ServerInfo['version'] < 10.1)
{
$value = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $value);
}
2018-03-12 14:02:13 +01:00
Ralf Becker
6221e69229
fix regexp to only match beginning of string
2017-03-09 16:42:50 +01:00
Ralf Becker
23ac04df8d
allow to switch whole database readonly, via setting "db_readonly" => true in header.inc.php
2017-03-09 12:08:00 +01:00
Ralf Becker
30cf772c4d
move ADOdb row_lock and rollback_lock methods to Db class, use Db::$tablealiases and use them for backup, also added a "backup_(starts|finished)" hook for apps
2016-10-13 17:54:58 +02:00
Ralf Becker
e82ce99537
fix SQL error happening in sync-colletion in TB caused by Db->Type == 'mysqli' and Db->group_connect returning false
2016-09-12 23:22:56 +02:00
Ralf Becker
ee468f40ff
try creating egroupware database for postgres with psql, as creating it through SQL seem not to work in Travis
2016-08-06 11:10:28 +02:00
Ralf Becker
b26e102ded
debugging db creation in Travis for postgres
2016-08-06 10:54:33 +02:00
Ralf Becker
ba18f3f594
allow eg. unit-tests to set/change schema used by db class: Db::set_table_definition()
2016-08-01 13:34:25 +02:00
Ralf Becker
6efd436a75
need to switch ONLY_FULL_GROUP_BY of for MySQL >= 5.7
2016-06-28 13:43:11 +02:00
Ralf Becker
f4dc9ebc3b
* MySQL/Ubuntu 16.04: switch off sql_mode ONLY_FULL_GROUP_BY enabled in MySQL 5.7+
2016-06-27 20:26:48 +02:00
Ralf Becker
139ee0dab1
no need to log connection retries and final connection failures are always thrown, fixes 5 connection failures log for creating new databases
2016-06-05 16:59:55 +02:00
Ralf Becker
2baf654e14
move all tables to new api and update api to 16.1
2016-04-02 19:55:08 +00:00
Ralf Becker
77c5102792
fixed more namespace issues found by doc/check_namespace.php I wrote and forgot about it ;-)
2016-03-21 21:21:40 +00:00
Ralf Becker
485416d5f1
replace create_function with performanter, because opcachable closure
2016-03-20 14:01:29 +00:00
Ralf Becker
a24c1121a2
move egw_time class to Api\DateTime
2016-03-05 11:14:01 +00:00
Ralf Becker
0637063660
fix namespaces in Db exceptions
2016-02-29 13:39:35 +00:00
Ralf Becker
1ab66dd811
move exceptions to new api structure, thought to catch an exception by its deprecated name, new exceptions have to extend deprecated ones
2016-02-28 13:43:06 +00:00
Ralf Becker
9bf4dd288e
moved egw_cache to Api\Cache
2016-02-28 09:38:36 +00:00
Ralf Becker
e3fb4142fc
need to cast to string, as ADOdb 5.20 would return NULL instead of '' for NULL, causing us to write that into NOT NULL columns
2016-02-22 13:31:44 +00:00
Ralf Becker
7f40ff5b17
work around broken ADORecordSet::GetAssoc() in ADOdb 5.20
2016-02-21 11:59:14 +00:00
Ralf Becker
2a056cca06
fix old class name in Galera health check
2016-02-21 11:07:46 +00:00