Fix: bad id when deleting picture on categorie / missing lang
This commit is contained in:
parent
6eac7e1bdc
commit
7e6777f344
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2014 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -264,11 +265,11 @@ if ($object->id)
|
|||||||
// On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites
|
// On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites
|
||||||
if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i',$obj['photo']) && ($object->imgWidth > $maxWidth || $object->imgHeight > $maxHeight))
|
if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i',$obj['photo']) && ($object->imgWidth > $maxWidth || $object->imgHeight > $maxHeight))
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->entity.'&action=addthumb&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').' </a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addthumb&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').' </a>';
|
||||||
}
|
}
|
||||||
if ($user->rights->categorie->creer)
|
if ($user->rights->categorie->creer)
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->entity.'&action=delete&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">';
|
||||||
print img_delete().'</a>';
|
print img_delete().'</a>';
|
||||||
}
|
}
|
||||||
if ($nbbyrow) print '</td>';
|
if ($nbbyrow) print '</td>';
|
||||||
|
|||||||
@ -105,3 +105,5 @@ CatProdLinks=Products
|
|||||||
CatCusLinks=Customer/Prospects
|
CatCusLinks=Customer/Prospects
|
||||||
CatSupLinks=Suppliers
|
CatSupLinks=Suppliers
|
||||||
DeleteFromCat=Remove from category
|
DeleteFromCat=Remove from category
|
||||||
|
DeletePicture=Picture delete
|
||||||
|
ConfirmDeletePicture=Confirm picture deletion?
|
||||||
Loading…
Reference in New Issue
Block a user