mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 11:19:55 +03:00
Merge b1e03e70ed
into ee0d29a0e9
This commit is contained in:
commit
2b39b2dc4b
6 changed files with 135 additions and 2 deletions
31
.github/workflows/ci.yml
vendored
Normal file
31
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||
php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ]
|
||||
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Set up PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{matrix.php}}
|
||||
extensions: fileinfo, json, pdo, mbstring
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
composer install
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
composer test
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -21,3 +21,7 @@
|
|||
# Eclipse
|
||||
.settings
|
||||
.project
|
||||
|
||||
# Composer
|
||||
vendor/
|
||||
|
||||
|
|
19
composer.json
Normal file
19
composer.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "piwigo/piwigo",
|
||||
"description": "A full featured open source photo gallery for the web.",
|
||||
"license": "GPL-2.0-only",
|
||||
"require-dev": {
|
||||
"php-parallel-lint/php-parallel-lint": "^1.0"
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.6"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": [
|
||||
"composer validate",
|
||||
"parallel-lint . --exclude vendor/ --exclude include/random_compat/"
|
||||
]
|
||||
}
|
||||
}
|
75
composer.lock
generated
Normal file
75
composer.lock
generated
Normal file
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"_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": "e7297a429c1e67962d72d022a6039ebb",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "php-parallel-lint/php-parallel-lint",
|
||||
"version": "v1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git",
|
||||
"reference": "474f18bc6cc6aca61ca40bfab55139de614e51ca"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/474f18bc6cc6aca61ca40bfab55139de614e51ca",
|
||||
"reference": "474f18bc6cc6aca61ca40bfab55139de614e51ca",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"replace": {
|
||||
"grogy/php-parallel-lint": "*",
|
||||
"jakub-onderka/php-parallel-lint": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"nette/tester": "^1.3 || ^2.0",
|
||||
"php-parallel-lint/php-console-highlighter": "~0.3",
|
||||
"squizlabs/php_codesniffer": "~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet"
|
||||
},
|
||||
"bin": [
|
||||
"parallel-lint"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"./"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-2-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jakub Onderka",
|
||||
"email": "ahoj@jakubonderka.cz"
|
||||
}
|
||||
],
|
||||
"description": "This tool check syntax of PHP files about 20x faster than serial check.",
|
||||
"homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint",
|
||||
"time": "2020-04-04T12:18:32+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "5.6"
|
||||
},
|
||||
"plugin-api-version": "1.1.0"
|
||||
}
|
|
@ -6,6 +6,8 @@
|
|||
// | file that was distributed with this source code. |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
if (!function_exists('xmlrpc_encode'))
|
||||
{
|
||||
function xmlrpc_encode($data)
|
||||
{
|
||||
switch (gettype($data))
|
||||
|
@ -44,6 +46,7 @@ function xmlrpc_encode($data)
|
|||
return $return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PwgXmlRpcEncoder extends PwgResponseEncoder
|
||||
{
|
||||
|
|
|
@ -261,7 +261,8 @@ function add_picture($option, $cookies, $pwg_token)
|
|||
;';
|
||||
|
||||
$res = $mysqli->query($query);
|
||||
if (($row = $res->fetch_row())[0] > 0) {
|
||||
$row = $res->fetch_row();
|
||||
if ($row[0] > 0) {
|
||||
echo "Add a Picture OK!\n";
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue