summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-11-22WhitespaceDamien Regad1-4/+4
2025-11-22PR #1074: ActiveRecord doQuote and follow-up fixesDamien Regad2-68/+62
2025-11-22Removed unused _QName() methodDamien Regad1-15/+0
It was replaced by nameQuoter() many years ago, see commit 876d51b73a5efa089e4cb12589de242e4f24b4c2.
2025-11-22Add missing MetaTypes in switchDamien Regad1-0/+7
Some changes made in the standard ADODB_Active_Record class's doQuote() method were never applied to the extended version.
2025-11-22Remove useless strlen() and simplify quote checkDamien Regad2-6/+2
2025-11-22Fix static analysis warningsDamien Regad2-6/+7
2025-11-22Coding guidelinesDamien Regad2-56/+56
2025-11-22Active record: handle empty string in dbquote()Konstantin Tarasov2-3/+8
The method did not generate the appropriate quote for empty strings, resulting in invalid SQL syntax in the UPDATE statement's where clause. Fix #1073, PR #1074
2025-11-22autoExecute return false on update with no matchDamien Regad1-2/+3
If the specified where clause returns no rows, then we return false early, there is no point building and executing an UPDATE statement that will do nothing. Fixes #1148
2025-11-22autoExecute: always use DB_AUTOQUERY_* constantsDamien Regad1-13/+20
2025-11-22PHP 7.0 compatible syntaxDamien Regad1-5/+5
Trailing comma in function calls is only available since PHP 7.3 Named arguments are only allowed since PHP 8.0
2025-11-22Fix autoExecute() skipping updatesDiogo Galvão2-3/+32
AutoExecute fetches a row from the table prior to performing an insert or update. When $forceUpdate is false, only modified columns should be updated. However, the WHERE clause was not being used when fetching the row, so the comparison was always made against an arbitrary row, causing differences to be detected or missed by chance. This change makes use of the $where parameter when fetching the row from the table, making the comparison work as intended. Fixes #1146
2025-10-25PHP 8.5: fix Non-canonical cast deprecationsDamien Regad26-55/+55
Non-canonical cast (integer) is deprecated, use the (int) cast instead Global search and replace throughout the code base. Fixes #1143
2025-09-15PDO Firebird driver extends ADODB_pdo_baseDamien Regad1-1/+1
Previously, it inherited from ADODB_pdo, which caused Fatal error: Uncaught Error: Call to undefined method ADODB_pdo_firebird::_init(). Fixes #1122
2025-09-02.gitignore Python virtual environmentDamien Regad1-0/+3
2025-08-03Bump version to 5.22.10v5.22.10Damien Regad1-1/+1
2025-08-03Update ChangelogDamien Regad1-0/+18
2025-08-03Refactor metaForeignKeys() methodDamien Regad1-19/+17
Use a single, more advanced regex to parse the table SQL, allowing identification of foreign key definitions with a single pass, instead of several preg_split/preg_match calls. The new regex recognizes both column and table constraints, and allows composite keys too. Case conversion (when $upper parameter is true) is performed within the foreach loop that builds the return array, instead of calling array_change_key_case() at the end. Fixes #1078, #1079, #1080
2025-08-03Ignore case when matching FOREIGN keywordDamien Regad1-1/+1
Fixes metaForeignKeys() method returning nothing when FOREIGN keyword was not given in upper case. Fixes #1078
2025-08-03Code cleanupDamien Regad1-74/+54
- Fix static analysis warnings - Remove useless code - Coding guidelines
2025-08-03Execute PRAGMA to retrieve PK after getting table infoDamien Regad1-25/+7
2025-08-03Remove unnecessary where clauseDamien Regad1-2/+1
According to SQLite schema documentation, the only valid values for *type* are 'table', 'index', 'view', or 'trigger' [1] so testing for `type != 'meta'` is useless. [1]: https://sqlite.org/schematab.html#interpretation_of_the_schema_table
2025-08-03Remove unnecessary subquery in metaForeignKeys()Damien Regad1-4/+1
2025-08-03Prevent SQL injection in sqlite3 driverDamien Regad1-22/+15
Use query parameters instead of injecting the table name in the SQL, in the following methods: - metaColumns() - metaForeignKeys() - metaIndexes() Thanks to Marco Nappi (@mrcnpp) for reporting this vulnerability. Fixes #1083, CVE-2025-54119, GHSA-vf2r-cxg9-p7rf
2025-05-01Bump version to 5.22.9v5.22.9Damien Regad2-3/+3
2025-05-01Mark pg_insert_id() as deprecatedDamien Regad1-0/+1
This function does the same thing as ADODB_postgres8::_insertID(), in a more limited way. There is no reason to keep it around. Fixes #1069
2025-05-01PHPDocDamien Regad1-2/+10
2025-05-01Merge branch 'sec-pgsql-sql-injection' into hotfix/5.22Damien Regad2-1/+7
Advisory https://github.com/ADOdb/ADOdb/security/advisories/GHSA-8x27-jwjr-8545 Fixes #1070
2025-05-01Update changelogDamien Regad1-0/+5
2025-05-01Fix SQL injection in pg_insert_id()Damien Regad1-1/+2
Properly escape the $tablename and $fieldname parameters used to build the sequence name.
2025-04-26Active record: Fix PHP 8.2 deprecation warningDamien Regad3-0/+4
Creation of dynamic property MyClass::$column is deprecated in .../adodb/adodb-active-record.inc.php on line 115 Creation of dynamic property MyClass::$column is deprecated in .../adodb/adodb-active-recordx.inc.php on line 119 Fixes #1068
2025-03-23Fulfill SQLite PRIMARY KEY AUTOINCREMENT requirementsDamien Regad14-17/+36
- Extend _CreateSuffix() with two additional parameters. - Adjust _createSuffix function name. - Add PHPDoc block - Fix spaces Fixes #1055 Signed-off-by: Damien Regad <dregad@mantisbt.org> Changes from PR: - Original commits squashed - Removed space after `&` for byref params - Updated Changelog
2025-03-22Update changelogDamien Regad1-0/+6
2025-03-22Fix SQLite error reportingraspopov1-7/+13
Without debug flag, the library returns '0' instead of error messages and correct SQLite error codes. Fixes #1061, PR #1062
2025-03-22Bump version to 5.22.9-devDamien Regad2-1/+4
2025-01-25Bump version to 5.22.8v5.22.8Damien Regad2-3/+3
2025-01-25Update ChangelogDamien Regad1-5/+23
2025-01-25mysqli: Improve setConnectionParameterlook-was-here1-8/+60
- Simplify control statements with single if expressions. - Updated phpdoc with additional details on how to set connection property values. - Removed to-do that seemed wrong since the user should use setConnectionParameter for those or set the property directly. - Allow setting of ssl cert property values, clientFlags, port, and socket using the standard setConnectionParameter functionality. Feedback updates: - Return false for special cases with type checks on sslsert, socket, clientflags, or port fail - Added invalid connection param to output. - Simplified isset checks. - Changed sslcert to ssl and simplified subkeys to ('key', 'cert', 'ca', 'capath', 'cipher'). - Removed code duplication. - is_numeric should be checking value not parameter Fixes #1044
2025-01-25mysql: SSL not working due to wrong socket/flagslook-was-here1-2/+7
- Remove inappropriate setting of socket. - Updated to use appropriate bitwise operations to check for set SSL client flags and update the default to not overwrite set user flags. - Add friendly error to let user know they need to add a SSL client flag when using certificates. Fixes #919, #1043 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2025-01-25Fix PHP 8.1 deprecation warningsJ.Mourgues1-4/+4
In toexport.inc.php: - trim(): Passing null to parameter of type string is deprecated Fixes #1045 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2025-01-25pgsql: fix serverInfo() version numberDamien Regad1-6/+5
In ADOdb versions < 5.21.0-beta.1, serverInfo()['version'] returned just the version number (e.g. `15.10`), which was extracted from the version string using ADOConnection::_findVers(). Commit f2b88e063d61b12a1df9090b8d0c68831ed0f447 removed the _findVers() call, so serverInfo() could potentially return additional information depending on the actual value returned by pg_version() (e.g. `15.10 (Debian 15.10-0+deb12u1)`. This could cause subsequent version comparisons to fail, e.g. in metaTables(). Fixes #1059
2024-12-15Fix PHP deprecation warningDamien Regad1-1/+1
strcasecmp(): Passing null to parameter of type string is deprecated in adodb-lib.inc.php on line 369 Fixes #1054
2024-08-28db2: fix connections using *LOCAL on IBM i seriesDamien Regad1-13/+40
Fixes: - Support blank username and password for *LOCAL connections (#1031) - Driver confuses schema name for database name (#1032) PR https://github.com/ADOdb/ADOdb/pull/1034
2024-08-28Fixing DB2 *LOCAL connectionCalvin Buckley1-9/+4
Per https://github.com/ADOdb/ADOdb/pull/1034#issuecomment-2136155259 Signed-off-by: Damien Regad <dregad@mantisbt.org> Fixed conflict resolution when applying patch.
2024-08-28move local schema outside of debug blockMark Newnham1-2/+5
2024-08-28Added SCHEMA to *LOCALMark Newnham1-8/+6
2024-08-28Added SET SCHEMA supportMark Newnham1-0/+8
2024-08-28Handle connection re-use using *LOCALMark Newnham1-13/+36
2024-08-25Add Georgian language (#1042)NorwayFun1-0/+52
(cherry picked from commit 1e0e602ed72628f7a6665f5c925e93a80bdbd710)
2024-08-25PHPDocDamien Regad1-12/+17