forked from verdnatura/hedera-web
Image uploader fixes
This commit is contained in:
parent
6ec94de7a3
commit
8dc92c484c
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.406.29) stable; urgency=low
|
||||
hedera-web (1.406.30) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hedera-web",
|
||||
"version": "1.406.29",
|
||||
"version": "1.406.30",
|
||||
"description": "Verdnatura web page",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
Loading…
Reference in New Issue