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.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "1.406.29",
|
"version": "1.406.30",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -11,8 +11,7 @@ use Vn\Lib\UserException;
|
||||||
class Upload extends Vn\Web\JsonRequest {
|
class Upload extends Vn\Web\JsonRequest {
|
||||||
const PARAMS = [
|
const PARAMS = [
|
||||||
'name',
|
'name',
|
||||||
'schema',
|
'schema'
|
||||||
'updateMatching'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
function run($db) {
|
function run($db) {
|
||||||
|
@ -80,6 +79,9 @@ class Upload extends Vn\Web\JsonRequest {
|
||||||
$schema = $db->quote($info['schema']);
|
$schema = $db->quote($info['schema']);
|
||||||
$table = $db->quote($info['table']);
|
$table = $db->quote($info['table']);
|
||||||
$column = $db->quote($info['column']);
|
$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'");
|
$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'));
|
||||||
|
|
Loading…
Reference in New Issue