Image upload fixes

This commit is contained in:
Juan Ferrer 2019-07-23 14:20:19 +02:00
parent 7329310f1f
commit 90161d1014
3 changed files with 4 additions and 4 deletions

2
debian/changelog vendored
View File

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

View File

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

View File

@ -80,11 +80,11 @@ class Upload extends Vn\Web\JsonRequest {
$table = $db->quote($info['table']);
$column = $db->quote($info['column']);
if (!($schema && $table && 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'));
if (!$pk) throw new UserException(s('Cannot update matching id'));
$pkColumn = $db->quote($pk['Column_name']);