mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
Доработка категорий #536
This commit is contained in:
parent
0f87ba502f
commit
f825f25377
|
@ -173,7 +173,7 @@ class ActionRegistration extends Action {
|
|||
*/
|
||||
if ($oUser->_Validate()) {
|
||||
$this->Hook_Run('registration_validate_after', array('oUser'=>$oUser));
|
||||
$oUser->setPassword(md5($oUser->getPassword()));
|
||||
$oUser->setPassword(func_encrypt($oUser->getPassword()));
|
||||
if ($this->User_Add($oUser)) {
|
||||
$this->Hook_Run('registration_after', array('oUser'=>$oUser));
|
||||
/**
|
||||
|
|
|
@ -496,5 +496,19 @@ class ModuleCategory extends ModuleORM {
|
|||
$oType->Save();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Парсинг текста с учетом конкретной категории
|
||||
*
|
||||
* @param string $sText
|
||||
* @param ModuleCategory_EntityCategory $oCategory
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function ParserText($sText,$oCategory) {
|
||||
$this->Text_AddParams(array('oCategory'=>$oCategory));
|
||||
$sResult=$this->Text_Parser($sText);
|
||||
$this->Text_RemoveParams(array('oCategory'));
|
||||
return $sResult;
|
||||
}
|
||||
|
||||
}
|
|
@ -27,6 +27,7 @@ class ModuleCategory_EntityCategory extends EntityORM {
|
|||
*/
|
||||
protected $aValidateRules=array(
|
||||
array('title','string','max'=>200,'min'=>1,'allowEmpty'=>false),
|
||||
array('description','string','max'=>5000,'min'=>1,'allowEmpty'=>true),
|
||||
array('url','regexp','pattern'=>'/^[\w\-_]+$/i','allowEmpty'=>false),
|
||||
array('order','number','integerOnly'=>true),
|
||||
array('pid','parent_category'),
|
||||
|
|
Loading…
Reference in a new issue