This commit is contained in:
Sergio Brighenti 2020-04-10 16:45:43 +02:00
parent 71357755f3
commit ccc10f6499
8 changed files with 13 additions and 17 deletions

View file

@ -151,7 +151,7 @@ module.exports = function (grunt) {
shell: {
phpstan: {
command: '"./vendor/bin/phpstan" analyse app resources/lang bin install'
command: '"./vendor/bin/phpstan" --level=0 analyse app resources/lang bin install'
},
composer_no_dev: {
command: 'composer update --no-dev --prefer-dist'

View file

@ -31,11 +31,7 @@ class Migrator
public function migrate()
{
try {
$this->db->query('SELECT 1 FROM `migrations` LIMIT 1');
} catch (PDOException $exception) {
$this->firstMigrate = true;
}
$this->db->query('SELECT 1 FROM `migrations` LIMIT 1');
$this->db->getPdo()->exec(file_get_contents($this->schemaPath.DIRECTORY_SEPARATOR.'migrations.sql'));

View file

@ -14,7 +14,7 @@ class ValidationException extends Exception
*/
private $response;
public function __construct(Response $response, $message = "", $code = 0, Throwable $previous = null)
public function __construct(Response $response, $message = "", Throwable $previous = null)
{
parent::__construct($message, $response->getStatusCode(), $previous);
$this->response = $response;

View file

@ -1,6 +1,6 @@
{
"name": "sergix44/xbackbone",
"version": "3.1.RC6",
"version": "3.1",
"description": "A lightweight ShareX PHP backend",
"type": "project",
"require": {

2
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "046f5b6b68e2073e25a43c0c24813053",
"content-hash": "17be54724e0928ed7049b18bbcb181b9",
"packages": [
{
"name": "aws/aws-sdk-php",

View file

@ -61,7 +61,7 @@ $app = Bridge::create($builder->build());
$app->setBasePath(parse_url($config['base_url'].'/install', PHP_URL_PATH));
$app->addRoutingMiddleware();
$app->get('/', function (Response $response, View $view, Session $session) use (&$config) {
$app->get('/', function (Response $response, View $view, Session $session) {
if (!extension_loaded('gd')) {
$session->alert('The required "gd" extension is not loaded.', 'danger');
}

12
package-lock.json generated
View file

@ -249,9 +249,9 @@
"dev": true
},
"core-js": {
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz",
"integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw=="
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
"integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA=="
},
"core-util-is": {
"version": "1.0.2",
@ -1360,9 +1360,9 @@
"dev": true
},
"rangetouch": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/rangetouch/-/rangetouch-2.0.0.tgz",
"integrity": "sha512-y66wTFbwh7KafYligRsmIYYR1kZY8U9tGHH9PgbVhBUFmGzPMsOSjslXPedgR5D3M9W1QKVbAf1AtaVAt7JJTw=="
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/rangetouch/-/rangetouch-2.0.1.tgz",
"integrity": "sha512-sln+pNSc8NGaHoLzwNBssFSf/rSYkqeBXzX1AtJlkJiUaVSJSbRAWJk+4omsXkN+EJalzkZhWQ3th1m0FpR5xA=="
},
"raw-body": {
"version": "1.1.7",

View file

@ -41,7 +41,7 @@
{% block content %}{% endblock %}
{% block footer %}
<div class="container-fluid footer" style="display: none; font-size: 0.8rem">
<div class="text-muted">Proudly powered by <a href="https://github.com/SergiX44/XBackBone">XBackBone{% if session.get('admin') %} v{{ PLATFORM_VERSION }}{% endif %}</a> — <i class="fas fa-fw fa-balance-scale"></i> AGPL v3.0</div>
<div class="text-muted">Proudly powered by <a href="https://sergix44.github.io/XBackBone/">XBackBone{% if session.get('admin') %} v{{ PLATFORM_VERSION }}{% endif %}</a> — <i class="fas fa-fw fa-balance-scale"></i> AGPL v3.0</div>
</div>
{% endblock %}
<script src="{{ asset('/static/jquery/jquery.min.js') }}"></script>