0
1
Fork 0

Image uploader fixes

This commit is contained in:
Juan Ferrer 2019-02-08 07:57:07 +01:00
parent 6ec94de7a3
commit 8dc92c484c
3 changed files with 6 additions and 4 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.406.29) stable; urgency=low
hedera-web (1.406.30) stable; urgency=low
* Initial Release.

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.406.29",
"version": "1.406.30",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {

View File

@ -11,8 +11,7 @@ use Vn\Lib\UserException;
class Upload extends Vn\Web\JsonRequest {
const PARAMS = [
'name',
'schema',
'updateMatching'
'schema'
];
function run($db) {
@ -81,6 +80,9 @@ class Upload extends Vn\Web\JsonRequest {
$table = $db->quote($info['table']);
$column = $db->quote($info['column']);
if (!($schema && $table && column))
throw new UserException(s('Cannot update matching id'));
$pk = $db->getRow ("SHOW INDEX FROM $schema.$table WHERE Key_name = 'PRIMARY'");
if (!pk) throw new UserException(s('Cannot update matching id'));