Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
41740ac
Merge pull request #162 from miceno/fix/unserialize
gregstoll Jun 26, 2023
24562c9
Merge pull request #161 from miceno/fix/rewrite
gregstoll Jun 28, 2023
7376fcc
Eliminate deprecation warning about dynamic properties introduced in php
Dec 30, 2023
605d077
Correct formatting
Dec 30, 2023
b6c853d
Additional deprecation warnings found
Dec 30, 2023
50a3677
More deprecated syntax
Dec 30, 2023
c54b7bd
Still more deprecated syntax
Jan 2, 2024
ec621bc
Yet another set of deprecation warnings
Jan 2, 2024
2a6d6e4
More deprecation warnings fixed
Jan 2, 2024
e53096e
One missed deprecation warning in previous commit
Jan 2, 2024
c7e227e
mark GalleryRemoteConstants functions static
gregstoll Jan 13, 2024
97830cb
Merge pull request #165 from gregstoll/galleryremoteconstants
gregstoll Jan 13, 2024
5a60146
Merge pull request #163 from kaeni1Ohkohd/main
gregstoll Jan 13, 2024
eb6a04f
Back out unnecessary changes
Jan 14, 2024
10281d2
Fix deprecation warning and changed implicit type casting behaviour i…
Jan 14, 2024
f5dd2ca
Update to adodb 5.22.7
Jan 28, 2024
7b84fce
Merge pull request #166 from kaeni1Ohkohd/main
gregstoll Feb 8, 2024
68bc64b
Merge branch 'adodb5_22_7'
Feb 8, 2024
489beef
Merge pull request #167 from kaeni1Ohkohd/main
gregstoll Feb 25, 2024
3728218
Add MariaDB to README.html
keeper Mar 14, 2024
fc0db55
Merge pull request #168 from keeper/add-mariadb-to-readme
gregstoll Mar 19, 2024
896ff7f
Add client_max_body_size to nginx docker config
gregstoll Apr 13, 2025
1069b11
Merge pull request #170 from gregstoll/gregstoll-nginx-docker
gregstoll Apr 13, 2025
39c1afa
Merge pull request #8 from gregstoll/main
miceno Dec 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ <h2><a name="system_requirements">System requirements</a></h2>
</li>
<li>
One of the following databases: <a href="http://mysql.com/" target="_blank">MySQL</a>
3.x, 4.x or 5.x, <a href="http://www.postgresql.org/" target="_blank">PostgreSQL</a>
3.x, 4.x or 5.x, <a href="https://mariadb.org/" target="_blank">MariaDB</a> 10.6+,
<a href="http://www.postgresql.org/" target="_blank">PostgreSQL</a>
7.x or 8.x, <a href="http://www.oracle.com/" target="_blank">Oracle</a> 9i or 10g,
<a href="http://www.ibm.com/software/data/db2/" target="_blank">IBM DB2</a> 9.x,
<a href="http://www.microsoft.com/sql/" target="_blank">Microsoft SQL Server</a> 2005
Expand Down
1 change: 1 addition & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
server {
listen 8000 default_server;
client_max_body_size 128M;
root /app;

index index.php index.html index.htm;
Expand Down
4 changes: 4 additions & 0 deletions lib/JSON/JSON.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ class Services_JSON
* strings or numbers, if you return an object, make sure it does
* not have a toJSON method, otherwise an error will occur.
*/

/* deprecated dynamic properties in php 8.2 */
var $use;

function __construct($use = 0)
{
$this->use = $use;
Expand Down
2 changes: 1 addition & 1 deletion lib/adodb/adodb-csvlib.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ function _rs2serialize(&$rs,$conn=false,$sql='')

$savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode;
$class = $rs->connection->arrayClass;
/** @var ADORecordSet $rs2 */
$rs2 = new $class(ADORecordSet::DUMMY_QUERY_ID);
$rs2->timeCreated = $rs->timeCreated; # memcache fix
$rs2->sql = $rs->sql;
$rs2->oldProvider = $rs->dataProvider;
$rs2->InitArrayFields($rows,$flds);
$rs2->fetchMode = $savefetch;
return $line.serialize($rs2);
Expand Down
9 changes: 8 additions & 1 deletion lib/adodb/adodb-errorhandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@
*/
function ADODB_Error_Handler($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnection)
{
if (error_reporting() == 0) return; // obey @ protocol
// Do not throw if errors are suppressed by @ operator
// error_reporting() value for suppressed errors changed in PHP 8.0.0
$suppressed = version_compare(PHP_VERSION, '8.0.0', '<')
? 0
: E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE;
if (error_reporting() == $suppressed) {
return;
}
switch($fn) {
case 'EXECUTE':
$sql = $p1;
Expand Down
10 changes: 9 additions & 1 deletion lib/adodb/adodb-errorpear.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ function ADODB_Error_PEAR($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
{
global $ADODB_Last_PEAR_Error;

if (error_reporting() == 0) return; // obey @ protocol
// Do not throw if errors are suppressed by @ operator
// error_reporting() value for suppressed errors changed in PHP 8.0.0
$suppressed = version_compare(PHP_VERSION, '8.0.0', '<')
? 0
: E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE;
if (error_reporting() == $suppressed) {
return;
}

switch($fn) {
case 'EXECUTE':
$sql = $p1;
Expand Down
16 changes: 12 additions & 4 deletions lib/adodb/adodb-exceptions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,18 @@ function __construct($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection)

function adodb_throw($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection)
{
global $ADODB_EXCEPTION;
global $ADODB_EXCEPTION;

// Do not throw if errors are suppressed by @ operator
// error_reporting() value for suppressed errors changed in PHP 8.0.0
$suppressed = version_compare(PHP_VERSION, '8.0.0', '<')
? 0
: E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE;
if (error_reporting() == $suppressed) {
return;
}

$errfn = is_string($ADODB_EXCEPTION) ? $ADODB_EXCEPTION : 'ADODB_EXCEPTION';

if (error_reporting() == 0) return; // obey @ protocol
if (is_string($ADODB_EXCEPTION)) $errfn = $ADODB_EXCEPTION;
else $errfn = 'ADODB_EXCEPTION';
throw new $errfn($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection);
}
60 changes: 42 additions & 18 deletions lib/adodb/adodb-lib.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,32 +508,38 @@ function _adodb_getcount($zthis, $sql,$inputarr=false,$secs2cache=0)
return $qryRecs;
}

/*
Code originally from "Cornel G" <conyg@fx.ro>

This code might not work with SQL that has UNION in it

Also if you are using CachePageExecute(), there is a strong possibility that
data will get out of synch. use CachePageExecute() only with tables that
rarely change.
*/
function _adodb_pageexecute_all_rows($zthis, $sql, $nrows, $page,
$inputarr=false, $secs2cache=0)
/**
* Execute query with pagination including record count.
*
* This code might not work with SQL that has UNION in it.
* Also if you are using cachePageExecute(), there is a strong possibility that
* data will get out of sync. cachePageExecute() should only be used with
* tables that rarely change.
*
* @param ADOConnection $zthis Connection
* @param string $sql Query to execute
* @param int $nrows Number of rows per page
* @param int $page Page number to retrieve (1-based)
* @param array $inputarr Array of bind variables
* @param int $secs2cache Time-to-live of the cache (in seconds), 0 to force query execution
*
* @return ADORecordSet|bool
*
* @author Cornel G <conyg@fx.ro>
*/
function _adodb_pageexecute_all_rows($zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0)
{
$atfirstpage = false;
$atlastpage = false;

// If an invalid nrows is supplied,
// we assume a default value of 10 rows per page
// If an invalid nrows is supplied, assume a default value of 10 rows per page
if (!isset($nrows) || $nrows <= 0) $nrows = 10;

$qryRecs = _adodb_getcount($zthis,$sql,$inputarr,$secs2cache);
$lastpageno = (int) ceil($qryRecs / $nrows);
$zthis->_maxRecordCount = $qryRecs;

// ***** Here we check whether $page is the last page or
// whether we are trying to retrieve
// a page number greater than the last page number.
// Check whether $page is the last page or if we are trying to retrieve
// a page number greater than the last one.
if ($page >= $lastpageno) {
$page = $lastpageno;
$atlastpage = true;
Expand Down Expand Up @@ -565,7 +571,25 @@ function _adodb_pageexecute_all_rows($zthis, $sql, $nrows, $page,
return $rsreturn;
}

// Iván Oliva version
/**
* Execute query with pagination without last page information.
*
* This code might not work with SQL that has UNION in it.
* Also if you are using cachePageExecute(), there is a strong possibility that
* data will get out of sync. cachePageExecute() should only be used with
* tables that rarely change.
*
* @param ADOConnection $zthis Connection
* @param string $sql Query to execute
* @param int $nrows Number of rows per page
* @param int $page Page number to retrieve (1-based)
* @param array $inputarr Array of bind variables
* @param int $secs2cache Time-to-live of the cache (in seconds), 0 to force query execution
*
* @return ADORecordSet|bool
*
* @author Iván Oliva
*/
function _adodb_pageexecute_no_last_page($zthis, $sql, $nrows, $page, $inputarr=false, $secs2cache=0)
{
$atfirstpage = false;
Expand Down
12 changes: 6 additions & 6 deletions lib/adodb/adodb-loadbalancer.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ class ADOdbLoadBalancer
/**
* @var bool|array All connections to each database.
*/
protected $connections = false;
protected $connections = [];

/**
* @var bool|array Just connections to the write capable database.
*/
protected $connections_write = false;
protected $connections_write = [];

/**
* @var bool|array Just connections to the readonly database.
*/
protected $connections_readonly = false;
protected $connections_readonly = [];

/**
* @var array Counts of all connections and their types.
Expand All @@ -73,12 +73,12 @@ class ADOdbLoadBalancer
/**
* @var bool Session variables that must be maintained across all connections, ie: SET TIME ZONE.
*/
protected $session_variables = false;
protected $session_variables = [];

/**
* @var bool Called immediately after connecting to any DB.
*/
protected $user_defined_session_init_sql = false;
protected $user_defined_session_init_sql = [];


/**
Expand Down Expand Up @@ -403,7 +403,7 @@ public function setSessionVariable($name, $value, $execute_immediately = true)
*/
private function executeSessionVariables($adodb_obj = false)
{
if (is_array($this->session_variables)) {
if (is_array($this->session_variables) && count($this->session_variables) > 0) {
$sql = '';
foreach ($this->session_variables as $name => $value) {
// $sql .= 'SET SESSION '. $name .' '. $value;
Expand Down
6 changes: 3 additions & 3 deletions lib/adodb/adodb-perf.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ function SplitSQL($sql)
* <code>ADODB_OPT_LOW</code> for CPU-less optimization
* Default is LOW <code>ADODB_OPT_LOW</code>
* @author Markus Staab
* @return Returns <code>true</code> on success and <code>false</code> on error
* @return bool true on success, false on error
*/
function OptimizeTables()
{
Expand Down Expand Up @@ -1048,7 +1048,7 @@ function OptimizeTables()
* <code>ADODB_OPT_LOW</code> for CPU-less optimization
* Default is LOW <code>ADODB_OPT_LOW</code>
* @author Markus Staab
* @return Returns <code>true</code> on success and <code>false</code> on error
* @return bool true on success, false on error
*/
function OptimizeTable( $table, $mode = ADODB_OPT_LOW)
{
Expand All @@ -1062,7 +1062,7 @@ function OptimizeTable( $table, $mode = ADODB_OPT_LOW)
* optimize each using <code>optmizeTable()</code>
*
* @author Markus Staab
* @return Returns <code>true</code> on success and <code>false</code> on error
* @return bool true on success, false on error
*/
function optimizeDatabase()
{
Expand Down
2 changes: 2 additions & 0 deletions lib/adodb/adodb-time.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* ADOdb Date Library.
*
* @deprecated 5.22.6 Use 64-bit PHP native functions instead.
*
* PHP native date functions use integer timestamps for computations.
* Because of this, dates are restricted to the years 1901-2038 on Unix
* and 1970-2038 on Windows due to integer overflow for dates beyond
Expand Down
4 changes: 2 additions & 2 deletions lib/adodb/adodb-xmlschema.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function addData( $attributes ) {
* @param string $type ADODB datadict field type.
* @param string $size Field size
* @param array $opts Field options array
* @return array Field specifier array
* @return void
*/
function addField( $name, $type, $size = NULL, $opts = NULL ) {
$field_id = $this->FieldID( $name );
Expand Down Expand Up @@ -446,7 +446,7 @@ function addField( $name, $type, $size = NULL, $opts = NULL ) {
* @param string $field Field name
* @param string $opt ADOdb field option
* @param mixed $value Field option value
* @return array Field specifier array
* @return void
*/
function addFieldOpt( $field, $opt, $value = NULL ) {
if( !isset( $value ) ) {
Expand Down
16 changes: 8 additions & 8 deletions lib/adodb/adodb-xmlschema03.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ function addData( $attributes ) {
* @param string $type ADODB datadict field type.
* @param string $size Field size
* @param array $opts Field options array
* @return array Field specifier array
* @return void
*/
function addField( $name, $type, $size = NULL, $opts = NULL ) {
$field_id = $this->fieldID( $name );
Expand Down Expand Up @@ -486,7 +486,7 @@ function addField( $name, $type, $size = NULL, $opts = NULL ) {
* @param string $field Field name
* @param string $opt ADOdb field option
* @param mixed $value Field option value
* @return array Field specifier array
* @return void
*/
function addFieldOpt( $field, $opt, $value = NULL ) {
if( $this->currentPlatform ) {
Expand Down Expand Up @@ -766,7 +766,7 @@ function _tag_close( $parser, $tag ) {
* Adds a field to the index
*
* @param string $name Field name
* @return string Field list
* @return string[] Field list
*/
function addField( $name ) {
$this->columns[$this->fieldID( $name )] = $name;
Expand All @@ -779,7 +779,7 @@ function addField( $name ) {
* Adds options to the index
*
* @param string $opt Comma-separated list of index options.
* @return string Option list
* @return string[] Option list
*/
function addIndexOpt( $opt ) {
$this->opts[] = $opt;
Expand Down Expand Up @@ -929,10 +929,10 @@ function addField( $attributes ) {
}

/**
* Adds options to the index
* Adds data.
*
* @param string $opt Comma-separated list of index options.
* @return string Option list
* @param string $cdata Data to add
* @return void
*/
function addData( $cdata ) {
// check we're in a valid field
Expand Down Expand Up @@ -1782,7 +1782,7 @@ function saveSQL( $filename = './schema.sql' ) {
$sqlArray = $this->sqlArray;
}
if( !isset( $sqlArray ) ) {
return FALSE;
return false;
}

$fp = fopen( $filename, "w" );
Expand Down
Loading