Commit Graph

66 Commits

Author SHA1 Message Date
ralf
8a984c46ea fix limit_query to convert $num_rows==='' to -1 to not give a TypeError as $num_rows is integer now 2024-07-06 13:59:47 +02:00
ralf
230f3953a6 fix reported problems 2024-06-20 11:12:09 +02:00
ralf
4b683b38ea * Notifications: fixed deleting and grouping of popup notifications by app-name and -id and show full total independent of max. 100 shown entries 2024-04-16 18:54:07 +02:00
ralf
6ee162ccd5 WIP S3 stream-wrapper: fixes to backup and restore binary AES key column egw_sqlfs.fs_aes_key 2023-10-30 13:31:11 +02:00
ralf
bfb7d1b516 some fixes to get update from ancient EGroupware 1.4 working again 2023-10-18 21:36:00 +03:00
ralf
95ba35bfeb fix restoring 1.8 database gave "Duplicate entry" error by mapping that (again) to InvalidSql exception (was changed due to PHP 8) 2023-06-30 10:01:01 +02:00
ralf
7799ef9a97 fix lots of warnings filling zpush logs 2023-06-09 18:30:09 +02:00
ralf
608963aa9b fix lots of warnings filling zpush logs 2023-06-09 18:28:57 +02:00
ralf
df63934fcc docu update 2023-04-18 15:06:49 +02:00
ralf
390e90fa89 add link to instructions how to install missing timezones in the DB to the logged error-message 2023-04-05 08:44:15 +02:00
ralf
d7b6597076 * Api/MariaDB/MySQL: fix SQL error handling in PHP 8.1
also introduce parameter to limit number of deleted rows and more docu
2023-03-17 11:04:45 +01:00
ralf
9a408f40ac fix typo / replaced wrong line 2023-02-18 19:38:09 +01:00
ralf
bbf9d62c5a fixing unhandled "MySQL server has gone away" in PHP 8.1 2023-02-18 09:01:22 +01:00
ralf
55054024b6 fix PHP Deprecated errors visible in egroupware-docker-install.log 2023-01-26 10:42:33 +01:00
ralf
5d385455d2 temporary fix for TinyMCE and tabs not loading in KnowledgeBase under 23.1/master
Problem is that JavaScript in inline script tags is executed before the egw_ready promise is created
fixing it by using window.setTimeout( , 200) for now
2023-01-12 18:04:12 -06:00
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