예제 #1
0
 /**
  * @see ObjectModel::validateField()
  */
 public function validateField($field, $value, $id_lang = null)
 {
     $value = $field == 'description_short' ? strip_tags($value) : $value;
     return parent::validateField($field, $value, $id_lang);
 }
예제 #2
0
파일: Product.php 프로젝트: yewed/share
 /**
  * @see ObjectModel::validateField()
  */
 public function validateField($field, $value, $id_lang = null, $skip = array(), $human_errors = false)
 {
     if ($field == 'description_short') {
         $limit = (int) Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT');
         if ($limit <= 0) {
             $limit = 800;
         }
         $size_without_html = Tools::strlen(strip_tags($value));
         $size_with_html = Tools::strlen($value);
         $this->def['fields']['description_short']['size'] = $limit + $size_with_html - $size_without_html;
     }
     return parent::validateField($field, $value, $id_lang, $skip, $human_errors);
 }
예제 #3
0
파일: Product.php 프로젝트: dev-lav/htdocs
 /**
  * @see ObjectModel::validateField()
  */
 public function validateField($field, $value, $id_lang = null, $skip = array(), $human_errors = false)
 {
     $value = $field == 'description_short' ? strip_tags($value) : $value;
     return parent::validateField($field, $value, $id_lang, $skip, $human_errors);
 }