diff --git a/classes/modules/topic/entity/Topic.entity.class.php b/classes/modules/topic/entity/Topic.entity.class.php index d4e25f09..a6299eae 100644 --- a/classes/modules/topic/entity/Topic.entity.class.php +++ b/classes/modules/topic/entity/Topic.entity.class.php @@ -37,8 +37,8 @@ class ModuleTopic_EntityTopic extends Entity { $this->aValidateRules[]=array('topic_title','string','max'=>200,'min'=>2,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_create_title'),'on'=>array('topic','link','photoset')); $this->aValidateRules[]=array('topic_title','string','max'=>200,'min'=>2,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_question_create_title'),'on'=>array('question')); $this->aValidateRules[]=array('topic_text_source','string','max'=>Config::Get('module.topic.max_length'),'min'=>2,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('topic','photoset')); - $this->aValidateRules[]=array('topic_text_source','string','max'=>500,'min'=>10,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('link')); - $this->aValidateRules[]=array('topic_text_source','string','max'=>500,'allowEmpty'=>true,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('question')); + $this->aValidateRules[]=array('topic_text_source','string','max'=>Config::Get('module.topic.link_max_length'),'min'=>10,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('link')); + $this->aValidateRules[]=array('topic_text_source','string','max'=>Config::Get('module.topic.question_max_length'),'allowEmpty'=>true,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('question')); $this->aValidateRules[]=array('topic_tags','tags','count'=>15,'label'=>$this->Lang_Get('topic_create_tags'),'allowEmpty'=>Config::Get('module.topic.allow_empty_tags'),'on'=>array('topic','link','question','photoset')); $this->aValidateRules[]=array('blog_id','blog_id','on'=>array('topic','link','question','photoset')); $this->aValidateRules[]=array('topic_text_source','topic_unique','on'=>array('topic','link','question','photoset')); diff --git a/config/config.php b/config/config.php index c8ce505f..367bc402 100644 --- a/config/config.php +++ b/config/config.php @@ -186,6 +186,8 @@ $config['module']['blog']['avatar_size'] = array(100,64,48,24,0); // Списо $config['module']['topic']['new_time'] = 60*60*24*1; // Время в секундах в течении которого топик считается новым $config['module']['topic']['per_page'] = 10; // Число топиков на одну страницу $config['module']['topic']['max_length'] = 15000; // Максимальное количество символов в одном топике +$config['module']['topic']['link_max_length'] = 500; // Максимальное количество символов в одном топике-ссылке +$config['module']['topic']['question_max_length'] = 500;// Максимальное количество символов в одном топике-опросе $config['module']['topic']['allow_empty_tags'] = false; // Разрешать или нет не заполнять теги // Модуль User $config['module']['user']['per_page'] = 15; // Число юзеров на страницу на странице статистики и в профиле пользователя