// Complete the removal of Image->legend property
This commit is contained in:
@@ -160,12 +160,10 @@ class qqUploadedFileXhr
|
||||
unlink($tmpName);
|
||||
Hook::exec('watermark', array('id_image' => $id_image, 'id_product' => $id_product));
|
||||
$lang = Context::getContext()->employee->id_lang;
|
||||
|
||||
foreach (Language::getLanguages(false) as $l)
|
||||
$image->legend[$l['id_lang']] = $id_image." ".$p->name[$l['id_lang']]." ".$p->reference;
|
||||
|
||||
if (!$image->update())
|
||||
return array('error' => Tools::displayError('Error while updating status'));
|
||||
$img = array('id_image' => $image->id, 'legend' => $image->legend[$lang], 'position' => $image->position, 'cover' => $image->cover);
|
||||
$img = array('id_image' => $image->id, 'position' => $image->position, 'cover' => $image->cover);
|
||||
return array("success" => $img);
|
||||
}
|
||||
|
||||
@@ -173,6 +171,7 @@ class qqUploadedFileXhr
|
||||
{
|
||||
return $_GET['qqfile'];
|
||||
}
|
||||
|
||||
function getSize()
|
||||
{
|
||||
if (isset($_SERVER["CONTENT_LENGTH"]))
|
||||
|
||||
@@ -35,9 +35,6 @@ class ImageCore extends ObjectModel
|
||||
/** @var integer Product ID */
|
||||
public $id_product;
|
||||
|
||||
/** @var string HTML title and alt attributes */
|
||||
public $legend;
|
||||
|
||||
/** @var integer Position used to order images of the same product */
|
||||
public $position;
|
||||
|
||||
@@ -70,9 +67,6 @@ class ImageCore extends ObjectModel
|
||||
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'position' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'cover' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||
|
||||
// Lang fields
|
||||
'legend' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user