| Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
|
|
Properly escape the $tablename and $fieldname parameters used to build
the sequence name.
|
|
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
|
|
- Update child classes to be consistent with this declaration.
- Remove unnecessary, non-PHPDoc comments
- Consistent parameter names
Fixes #966
|
|
pg_escape_string() will trigger a deprecation warning in PHP 8.1+ when
there is no connection specified. This can occur when using
setSessionVariables() in the load balancer, so we fall back to emulated
escaping in this case.
Fixes #956
|
|
When calling the function on a table having an index on an expression
column, a PHP warning is thrown:
Undefined array key 0 in ./drivers/adodb-postgres64.inc.php on line 666
Fixes #940
|
|
This reverts commit 84a7122ae93b82238c6c37bd81d483c632e8b50c (PR #112)
The ADOConnection object does not have a 'connection' property, and the
'noBlobs' flag is not documented or used anywhere else.
The change's original contributor never provided any feedback [1], and
usage of the undefined property is now throwing a deprecation warning on
PHP 8.2.
[1]: https://github.com/ADOdb/ADOdb/pull/112#issuecomment-902028719
|
|
ADOConnection::$adodbFetchMode is redeclared in Postgres and PDO drivers
but this is not necessary.
See #923
Signed-off-by: Damien Regad <dregad@mantisbt.org>
|
|
Fixes #913 (PR #920)
(cherry picked from commit 14a4a5a47805f152f56205c1ab4ae9ce98de5ad1)
|
|
Fixes #848
|
|
Affected_Rows() always returns false on PHP 8.1, because the
'pgsql result' resource has been replaced by the PgSql\Result class [1].
Changes to original contribution:
* Adjust PHPDoc for ADODB_postgres64::$_resultid
* Fix one more occurrence in the postgres7 driver
Fixes #833
[1]: https://www.php.net/manual/en/class.pgsql-result.php
Co-authored-by: Damien Regad <dregad@mantisbt.org>
(cherry picked from commit e3287d6be5545634a6ccbf868919028991a68791)
|
|
# Conflicts:
# adodb.inc.php
# docs/changelog.md
|
|
Remove old, commented-out code
|
|
Thanks to Emmet Leahy of Sorcery Ltd for reporting this vulnerability
(CVE-2021-3850).
Refactoring ADODB_postgres64::_connect():
- Remove adodb_addslashes() function, which did not escape the
connection parameters when they are wrapped in single quotes
(root cause for the identified security issue).
- Use addcslashes() instead of addslashes() to only escape `'` and `\`,
to strictly follow pg_connect() documentation (addslashes() also
escapes `"`)
- Use an array and a foreach loop to build the connection string when
given individual parameters for host:port, user, password and dbname
Fixes #793
|
|
Adding UUID, NUMERIC, DECIMAL, FLOAT4 and FLOAT8.
Fixes #782
|
|
Following up on #767, per @Unifex's suggestion [1], removing _fixblobs()
and moving its code into new _prepFields() function.
Additional changes:
- add PHPDoc block
- protected attribute
- remove return type - not really useful as in most cases success is
evaluated by checking $this->fields !== false
- fixed a couple remaining occurrences of is_array() checks
- coding guidelines
[1]: https://github.com/ADOdb/ADOdb/pull/760#issuecomment-961564909
|
|
The call to pg_fetch_array() returns false in all cases where we would
not need or want to potentially _fixblobs() and return true. A straight
up boolean check is all that is needed here, no need for in_array().
Tracking through _fixblobs() is called in a number of places and how its
result is checked was repeated in every case. The checks were moved into
the function, which was updated to return a boolean should we want to
check that.
It was also noted that in every case the setting of $this->fields was
identical as well so new _prepfields() method was added which sets
$this->fields and calls _fixblobs().
All instances of _fixblobs() were replaced with _prepfields() and the
pg_fetch_array() call deleted.
Fixes #767 (replacing #760)
|
|
Fixes #769
|
|
We are not executing prepared statements with parameters here, so using
pg_execute() (which expects a 3rd parameter) is not necessary.
In fact, these used to be pg_exec() calls, which were incorrectly
replaced by pg_execute() instead of pg_query() in commit
2223c2a1fe8ecf5b2fc07f503a280d080596dd94.
Fixes #768
|
|
|
|
|
|
The function's return value is never used, since we get the client
version from ServerInfo().
|
|
Regression from 9f6f327b9d5b29d14565fa0ab4308354bf050d2d.
fetchField()'s parameter was renamed from $off to $fieldOffset, but the
change was not reflected in the method's body.
Fixes #752
|
|
# Conflicts:
# adodb.inc.php
# docs/changelog.md
# drivers/adodb-mssqlnative.inc.php
# drivers/adodb-mysqli.inc.php
Fixes #751
|
|
Try to do it right this time...
# Conflicts:
# adodb-memcache.lib.inc.php
Fixes #751
|
|
Fixes #751
|
|
The conflicts resolution applied when merging the Standardized file
headers (commit e9dcce3df24912ad869d0193f0b419f2309101fc) was seriously
messed up, actually overwriting a number of changes in the master
branch.
Rather than trying to go and fix things one by one which has a high risk
of messing things further, it's easier to redo the merge from a clean
slate, so this commit reverts the following:
- "Merge branch 'hotfix/5.21' Standardized file headers",
e9dcce3df24912ad869d0193f0b419f2309101fc
- "Merge tag 'v5.21.1'",
5f437df3104159d5d659f60e31bef8d33c34995f
- "Reset version to 5.22.0-dev"
af9234a525c3255af051a330164486d73be4c63a
- "Fix incorrect resolution of merge conflicts"
a6733f61b0165b366c8d2c70d9af82edc3881951.
- "Fix syntax error in toexport.inc.php"
20b01e83cb61b6b2460f64c7d1277c5f4cc28574.
Fixes #751
|
|
|
|
|
|
|
|
Update child classes so method signature matches the parent's.
|
|
|
|
|
|
Allowing param(false) to reset the query parameter count (see #380,
commit 46fa66c10dc50547167d0f8bbbcb6484edf30d1c) introduced a regression
when a falsy value was used, like `param(0)` in adodb-session2.php.
ADODB_postgres64::param() now differenciates betwen use of:
- falsy value -> reset count and return the first placeholder ($1)
- boolean `false` -> reset count, do not return placeholder (next call
will return $1).
Updated PHPDoc for parent ADOConnection::param() to reflect this.
Fixes #682, #380
|
|
|
|
The $magic_quote parameter for public methods was kept for backwards
compatibility purposes, but is no longer used.
Fixes #674
|
|
# Conflicts:
# adodb-xmlschema03.inc.php
# adodb.inc.php
# drivers/adodb-pdo.inc.php
|
|
On PHP 8, ADORecordSet_postgres64::_close() throws the following error:
Uncaught TypeError: pg_free_result(): Argument #1 ($result) must be of
type resource, bool given in drivers/adodb-postgres64.inc.php:1052.
Adding a check to ensure _QueryID is a ressource of the expected type,
before calling pg_free_result().
Fixes #666
|
|
Conflicts:
drivers/adodb-postgres64.inc.php
|
|
Fixes #667
|
|
Fixes #646
|
|
|
|
|
|
|
|
Site no longer active
|
|
|
|
|
|
Prior to this, calling $db->param(false) would reset the parameter
number to 1 instead of 0, causing the next param() call to return `$2`
instead of the expected `$1`.
Fixes #380
|
|
|