diff --git a/adm/tabs/AdminImport.php b/adm/tabs/AdminImport.php index ac81e603..5b4bdbef 100755 --- a/adm/tabs/AdminImport.php +++ b/adm/tabs/AdminImport.php @@ -898,6 +898,7 @@ class AdminImport extends AdminTab $image->id_product = (int)($product->id); $image->position = Image::getHighestPosition($product->id) + 1; $image->cover = (!$key AND !$productHasImages) ? true : false; + $image->legend = self::createMultiLangField($product->name); if (($fieldError = $image->validateFields(UNFRIENDLY_ERROR, true)) === true AND ($langFieldError = $image->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true AND $image->add()) { if (!self::copyImg($product->id, $image->id, $url)) diff --git a/modules/ant_alerthack/AdminAntAlertHack.php b/modules/ant_alerthack/AdminAntAlertHack.php new file mode 100644 index 00000000..cb96614a --- /dev/null +++ b/modules/ant_alerthack/AdminAntAlertHack.php @@ -0,0 +1,225 @@ +is_suspect = Tools::getValue('state'); + } + if($suspect->save()){ + echo HelperFormBootstrap::displaySuccess($this->l('Suspect has been updated')); + return; + } else { + echo HelperFormBootstrap::displayError($this->l('Error occured while updating Suspect')); + return; + } + } elseif (Tools::isSubmit('update_conf')) { + if(($limit = Tools::getValue('limit')) !== false) { + Configuration::updateValue('ANT_ALERTHACK_LIMIT', (int) $limit); + } + if($time = Tools::getValue('time')) { + Configuration::updateValue('ANT_ALERTHACK_TIME', (int) $time); + } + if($emails = Tools::getValue('emails')) { + Configuration::updateValue('ANT_ALERTHACK_EMAILS', $emails); + } + echo HelperFormBootstrap::displaySuccess($this->l('Configurations has been updated')); + return; + } + } + + public function display() { + global $cookie; + + $helper = new HelperFormBootstrap(); + $helper->_css.= $this->_addCss(); + $html = $helper->renderStyle(); + $html .= ' +
'.$this->l('ID').' | +'.$this->l('email').' | +'.$this->l('id_customer').' | +'.$this->l('Remote IP').' | +'.$this->l('Remote Host').' | +'.$this->l('Condition').' | +'.$this->l('State').' | +'.$this->l('Action').' | +
---|---|---|---|---|---|---|---|
'.$suspect['id_suspect'].' | +'.$suspect['email'].' | +'.$suspect['id_customer'].' | +'.$suspect['remote_ip'].' | +'.$suspect['remote_host'].' | +'.$suspect['condition'].' | +'.$states[(int)$suspect['is_suspect']]['name'].' | ++ + | +