Remove comments from project PHP files
This commit is contained in:
1 parent
66a35a9f7c
commit
74239a03e5
4 files changed
+3
-6
No files matched your search
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Initialize the original PHP API database. The Swift database uses a separate schema.
|
|
||||||
if (PHP_SAPI !== 'cli' || $argc !== 2) {
|
if (PHP_SAPI !== 'cli' || $argc !== 2) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -11,7 +10,7 @@ try {
|
|||||||
$db->exec('BEGIN IMMEDIATE');
|
$db->exec('BEGIN IMMEDIATE');
|
||||||
$applicationId = (int) $db->query('PRAGMA application_id')->fetchColumn();
|
$applicationId = (int) $db->query('PRAGMA application_id')->fetchColumn();
|
||||||
$version = (int) $db->query('PRAGMA user_version')->fetchColumn();
|
$version = (int) $db->query('PRAGMA user_version')->fetchColumn();
|
||||||
// "EZSV" in SQLite's application header.
|
|
||||||
if ($applicationId === 1163547478 && $version === 1) {
|
if ($applicationId === 1163547478 && $version === 1) {
|
||||||
$db->exec('COMMIT');
|
$db->exec('COMMIT');
|
||||||
exit(0);
|
exit(0);
|
||||||
@@ -29,7 +28,7 @@ try {
|
|||||||
$db->exec('PRAGMA user_version = 1');
|
$db->exec('PRAGMA user_version = 1');
|
||||||
$db->exec('COMMIT');
|
$db->exec('COMMIT');
|
||||||
} catch (Throwable $error) {
|
} catch (Throwable $error) {
|
||||||
// SQLite rolls back an open transaction when the connection closes.
|
|
||||||
fwrite(STDERR, 'SQLite initialization failed: ' . $error->getMessage() . PHP_EOL);
|
fwrite(STDERR, 'SQLite initialization failed: ' . $error->getMessage() . PHP_EOL);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Launch the original API front controller for the verified routes.
|
|
||||||
function failRequest($status, $message)
|
function failRequest($status, $message)
|
||||||
{
|
{
|
||||||
http_response_code($status);
|
http_response_code($status);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ $db['E2DB'] = [
|
|||||||
'dsn' => 'sqlite:' . getenv('EZSERVER_SQLITE'),
|
'dsn' => 'sqlite:' . getenv('EZSERVER_SQLITE'),
|
||||||
'db_debug' => false,
|
'db_debug' => false,
|
||||||
'options' => [
|
'options' => [
|
||||||
// PostgreSQL returns lowercase names for the original models' unquoted columns.
|
|
||||||
PDO::ATTR_CASE => PDO::CASE_LOWER,
|
PDO::ATTR_CASE => PDO::CASE_LOWER,
|
||||||
PDO::ATTR_TIMEOUT => 5,
|
PDO::ATTR_TIMEOUT => 5,
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -2,5 +2,4 @@
|
|||||||
|
|
||||||
defined('BASEPATH') or exit('No direct script access allowed');
|
defined('BASEPATH') or exit('No direct script access allowed');
|
||||||
|
|
||||||
// Preserve the original JWT validation with a deployment-specific signing key.
|
|
||||||
$config['jwt_key'] = trim(file_get_contents(getenv('EZSERVER_JWT_KEY_FILE')));
|
$config['jwt_key'] = trim(file_get_contents(getenv('EZSERVER_JWT_KEY_FILE')));
|
||||||
Reference in new issue
Block a user