diff --git a/.gitignore b/.gitignore index 5b61f6c..1e54788 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /public/robots.txt /config.ini /.debug +/vendor diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..d8d1b8b --- /dev/null +++ b/composer.json @@ -0,0 +1,13 @@ +{ + "minimum-stability": "dev", + "prefer-stable": true, + "require": { + "flashwave/index": "dev-master", + "flashwave/syokuhou": "dev-master" + }, + "autoload": { + "psr-4": { + "EEPROM\\": "src" + } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..7d04793 --- /dev/null +++ b/composer.lock @@ -0,0 +1,107 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "d909826a501788db19148054e389ec5f", + "packages": [ + { + "name": "flashwave/index", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://git.flash.moe/flash/index.git", + "reference": "82a350a5c719cc83aa22382201683a68a2629f2a" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.1" + }, + "require-dev": { + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.2" + }, + "suggest": { + "ext-mysqli": "Support for the Index\\Data\\MariaDB namespace (both mysqlnd and libmysql are supported).", + "ext-sqlite3": "Support for the Index\\Data\\SQLite namespace." + }, + "default-branch": true, + "type": "library", + "autoload": { + "files": [ + "index.php" + ], + "psr-4": { + "Index\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "bsd-3-clause-clear" + ], + "authors": [ + { + "name": "flashwave", + "email": "packagist@flash.moe", + "homepage": "https://flash.moe", + "role": "mom" + } + ], + "description": "Composer package for the common library for my projects.", + "homepage": "https://railgun.sh/index", + "time": "2023-09-15T22:44:36+00:00" + }, + { + "name": "flashwave/syokuhou", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://git.flash.moe/flash/syokuhou.git", + "reference": "b3470ad8605b0484294c73cd95be6e7ba4551e5a" + }, + "require": { + "flashwave/index": "dev-master", + "php": ">=8.2" + }, + "require-dev": { + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^10.4" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "Syokuhou\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "bsd-3-clause-clear" + ], + "authors": [ + { + "name": "flashwave", + "email": "packagist@flash.moe", + "homepage": "https://flash.moe", + "role": "mom" + } + ], + "description": "Configuration library for PHP.", + "homepage": "https://railgun.sh/syokuhou", + "time": "2023-10-20T21:26:38+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": { + "flashwave/index": 20, + "flashwave/syokuhou": 20 + }, + "prefer-stable": true, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.3.0" +} diff --git a/eeprom.php b/eeprom.php index 3dbcf5b..fd5b76a 100644 --- a/eeprom.php +++ b/eeprom.php @@ -1,7 +1,6 @@ bump < 1) return; - $this->upload_expires = time() + $this->bump; + $this->expires = time() + $this->bump; $bump = $conn->prepare('UPDATE `prm_uploads` SET `upload_expires` = NOW() + INTERVAL ? SECOND WHERE `upload_id` = ?'); $bump->addParameter(1, $this->bump, DbType::INTEGER);