LGV_TZ_Lookup 1.4.2
Time zone lookup for PHP applications and HTTP clients
Loading...
Searching...
No Matches
update.php File Reference

Report the latest boundary release, or replace an existing installation's boundaries. More...

Go to the source code of this file.

Functions

 updateCleanup (string $work)
 Remove downloaded data and a recorded staging table after an interrupted load.
 updateConnection (array $settings)
 Connect and hold the same database lock used by the installer.
 updateLoad (PDO $connection, array $settings, string $json, string $table)
 Load into staging, then publish atomically. The caller retains the database lock throughout.
 updateRun (string $work, string $config, bool $check=false, ?callable $download=null)
 Discover, report, download, and load boundaries; –check stops before reading config or touching the database.
 updateSettings (string $config)
 Read the server's existing database settings without starting the HTTP endpoint.

Variables

if(realpath($_SERVER['SCRIPT_FILENAME'] ?? '') !==__FILE__) $cleanup
 $work

Detailed Description

© Copyright 2023-2026, Little Green Viper Software Development LLC

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Run through update.sh. Its shell trap removes downloads even after interruption or a PHP memory-limit failure. New polygons load into a private staging table. MySQL publishes with one RENAME TABLE; PostgreSQL uses transactional renames. Failed loading preserves the live table. Recovery removes this run's staging/old tables, never timezones.

Definition in file update.php.

Function Documentation

◆ updateCleanup()

updateCleanup ( string $work)

Definition at line 61 of file update.php.

References $work, and updateCleanup().

Referenced by updateCleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateConnection()

updateConnection ( array $settings)

Definition at line 48 of file update.php.

References $connection, $driver, $dsn, $settings, and updateConnection().

Referenced by updateConnection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateLoad()

updateLoad ( PDO $connection,
array $settings,
string $json,
string $table )

Use the normal loader schema and storage format, with this run's private destination.

< True only after the parser closes the entire JSON document.

Reject truncated input even when the streaming parser silently reaches EOF.

Definition at line 78 of file update.php.

References $connection, $settings, if, and updateLoad().

Referenced by updateLoad().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateRun()

updateRun ( string $work,
string $config,
bool $check = false,
?callable $download = null )

Definition at line 125 of file update.php.

References $config, $work, if, and updateRun().

Referenced by updateRun().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSettings()

updateSettings ( string $config)

Definition at line 34 of file update.php.

References $config, if, and updateSettings().

Referenced by updateSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ $cleanup

if (realpath( $_SERVER[ 'SCRIPT_FILENAME'] ?? '') !==__FILE__) $cleanup

Definition at line 173 of file update.php.

◆ $work

$work

Definition at line 174 of file update.php.