mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-01 05:55:02 +03:00
Security fix - потенциальная возможность раскрытия путей на сервере, уровень - низкий
This commit is contained in:
parent
ed3b86a3bd
commit
c2231cd3a1
|
@ -12,4 +12,8 @@ RewriteRule ^(.*)$ ./index.php
|
||||||
order allow,deny
|
order allow,deny
|
||||||
deny from all
|
deny from all
|
||||||
</Files>
|
</Files>
|
||||||
|
<Files "plugin.xml">
|
||||||
|
order allow,deny
|
||||||
|
deny from all
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ class ActionAdmin extends Action {
|
||||||
/**
|
/**
|
||||||
* Получаем название плагина и действие
|
* Получаем название плагина и действие
|
||||||
*/
|
*/
|
||||||
if($sPlugin=getRequest('plugin',null,'get') and $sAction=getRequest('action',null,'get')) {
|
if($sPlugin=getRequestStr('plugin',null,'get') and $sAction=getRequestStr('action',null,'get')) {
|
||||||
return $this->SubmitManagePlugin($sPlugin,$sAction);
|
return $this->SubmitManagePlugin($sPlugin,$sAction);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -171,7 +171,7 @@ class ActionAdmin extends Action {
|
||||||
*/
|
*/
|
||||||
protected function EventUserFields()
|
protected function EventUserFields()
|
||||||
{
|
{
|
||||||
switch(getRequest('action')) {
|
switch(getRequestStr('action')) {
|
||||||
/**
|
/**
|
||||||
* Создание нового поля
|
* Создание нового поля
|
||||||
*/
|
*/
|
||||||
|
@ -184,11 +184,11 @@ class ActionAdmin extends Action {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$oField = Engine::GetEntity('User_Field');
|
$oField = Engine::GetEntity('User_Field');
|
||||||
$oField->setName(getRequest('name'));
|
$oField->setName(getRequestStr('name'));
|
||||||
$oField->setTitle(getRequest('title'));
|
$oField->setTitle(getRequestStr('title'));
|
||||||
$oField->setPattern(getRequest('pattern'));
|
$oField->setPattern(getRequestStr('pattern'));
|
||||||
if (in_array(getRequest('type'),$this->User_GetUserFieldTypes())) {
|
if (in_array(getRequestStr('type'),$this->User_GetUserFieldTypes())) {
|
||||||
$oField->setType(getRequest('type'));
|
$oField->setType(getRequestStr('type'));
|
||||||
} else {
|
} else {
|
||||||
$oField->setType('');
|
$oField->setType('');
|
||||||
}
|
}
|
||||||
|
@ -214,11 +214,11 @@ class ActionAdmin extends Action {
|
||||||
* Обрабатываем как ajax запрос (json)
|
* Обрабатываем как ajax запрос (json)
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
if (!getRequest('id')) {
|
if (!getRequestStr('id')) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->User_deleteUserField(getRequest('id'));
|
$this->User_deleteUserField(getRequestStr('id'));
|
||||||
$this->Message_AddNotice($this->Lang_Get('user_field_deleted'),$this->Lang_Get('attention'));
|
$this->Message_AddNotice($this->Lang_Get('user_field_deleted'),$this->Lang_Get('attention'));
|
||||||
break;
|
break;
|
||||||
/**
|
/**
|
||||||
|
@ -229,11 +229,11 @@ class ActionAdmin extends Action {
|
||||||
* Обрабатываем как ajax запрос (json)
|
* Обрабатываем как ajax запрос (json)
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
if (!getRequest('id')) {
|
if (!getRequestStr('id')) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!$this->User_userFieldExistsById(getRequest('id'))) {
|
if (!$this->User_userFieldExistsById(getRequestStr('id'))) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -241,12 +241,12 @@ class ActionAdmin extends Action {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$oField = Engine::GetEntity('User_Field');
|
$oField = Engine::GetEntity('User_Field');
|
||||||
$oField->setId(getRequest('id'));
|
$oField->setId(getRequestStr('id'));
|
||||||
$oField->setName(getRequest('name'));
|
$oField->setName(getRequestStr('name'));
|
||||||
$oField->setTitle(getRequest('title'));
|
$oField->setTitle(getRequestStr('title'));
|
||||||
$oField->setPattern(getRequest('pattern'));
|
$oField->setPattern(getRequestStr('pattern'));
|
||||||
if (in_array(getRequest('type'),$this->User_GetUserFieldTypes())) {
|
if (in_array(getRequestStr('type'),$this->User_GetUserFieldTypes())) {
|
||||||
$oField->setType(getRequest('type'));
|
$oField->setType(getRequestStr('type'));
|
||||||
} else {
|
} else {
|
||||||
$oField->setType('');
|
$oField->setType('');
|
||||||
}
|
}
|
||||||
|
@ -280,18 +280,18 @@ class ActionAdmin extends Action {
|
||||||
*/
|
*/
|
||||||
public function checkUserField()
|
public function checkUserField()
|
||||||
{
|
{
|
||||||
if (!getRequest('title')) {
|
if (!getRequestStr('title')) {
|
||||||
$this->Message_AddError($this->Lang_Get('user_field_error_add_no_title'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('user_field_error_add_no_title'),$this->Lang_Get('error'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!getRequest('name')) {
|
if (!getRequestStr('name')) {
|
||||||
$this->Message_AddError($this->Lang_Get('user_field_error_add_no_name'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('user_field_error_add_no_name'),$this->Lang_Get('error'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Не допускаем дубликатов по имени
|
* Не допускаем дубликатов по имени
|
||||||
*/
|
*/
|
||||||
if ($this->User_userFieldExistsByName(getRequest('name'), getRequest('id'))) {
|
if ($this->User_userFieldExistsByName(getRequestStr('name'), getRequestStr('id'))) {
|
||||||
$this->Message_AddError($this->Lang_Get('user_field_error_name_exists'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('user_field_error_name_exists'),$this->Lang_Get('error'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ class ActionAjax extends Action {
|
||||||
* Получение списка регионов по стране
|
* Получение списка регионов по стране
|
||||||
*/
|
*/
|
||||||
protected function EventGeoGetRegions() {
|
protected function EventGeoGetRegions() {
|
||||||
$iCountryId=getRequest('country');
|
$iCountryId=getRequestStr('country');
|
||||||
$iLimit=200;
|
$iLimit=200;
|
||||||
if (is_numeric(getRequest('limit')) and getRequest('limit')>0) {
|
if (is_numeric(getRequest('limit')) and getRequest('limit')>0) {
|
||||||
$iLimit=getRequest('limit');
|
$iLimit=getRequest('limit');
|
||||||
|
@ -156,7 +156,7 @@ class ActionAjax extends Action {
|
||||||
* Получение списка городов по региону
|
* Получение списка городов по региону
|
||||||
*/
|
*/
|
||||||
protected function EventGeoGetCities() {
|
protected function EventGeoGetCities() {
|
||||||
$iRegionId=getRequest('region');
|
$iRegionId=getRequestStr('region');
|
||||||
$iLimit=500;
|
$iLimit=500;
|
||||||
if (is_numeric(getRequest('limit')) and getRequest('limit')>0) {
|
if (is_numeric(getRequest('limit')) and getRequest('limit')>0) {
|
||||||
$iLimit=getRequest('limit');
|
$iLimit=getRequest('limit');
|
||||||
|
@ -199,7 +199,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Комментарий существует?
|
* Комментарий существует?
|
||||||
*/
|
*/
|
||||||
if (!($oComment=$this->Comment_GetCommentById(getRequest('idComment',null,'post')))) {
|
if (!($oComment=$this->Comment_GetCommentById(getRequestStr('idComment',null,'post')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('comment_vote_error_noexists'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('comment_vote_error_noexists'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Как именно голосует пользователь
|
* Как именно голосует пользователь
|
||||||
*/
|
*/
|
||||||
$iValue=getRequest('value',null,'post');
|
$iValue=getRequestStr('value',null,'post');
|
||||||
if (!in_array($iValue,array('1','-1'))) {
|
if (!in_array($iValue,array('1','-1'))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('comment_vote_error_value'),$this->Lang_Get('attention'));
|
$this->Message_AddErrorSingle($this->Lang_Get('comment_vote_error_value'),$this->Lang_Get('attention'));
|
||||||
return;
|
return;
|
||||||
|
@ -279,7 +279,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Топик существует?
|
* Топик существует?
|
||||||
*/
|
*/
|
||||||
if (!($oTopic=$this->Topic_GetTopicById(getRequest('idTopic',null,'post')))) {
|
if (!($oTopic=$this->Topic_GetTopicById(getRequestStr('idTopic',null,'post')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Как проголосовал пользователь
|
* Как проголосовал пользователь
|
||||||
*/
|
*/
|
||||||
$iValue=getRequest('value',null,'post');
|
$iValue=getRequestStr('value',null,'post');
|
||||||
if (!in_array($iValue,array('1','-1','0'))) {
|
if (!in_array($iValue,array('1','-1','0'))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('attention'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('attention'));
|
||||||
return;
|
return;
|
||||||
|
@ -372,7 +372,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Блог существует?
|
* Блог существует?
|
||||||
*/
|
*/
|
||||||
if (!($oBlog=$this->Blog_GetBlogById(getRequest('idBlog',null,'post')))) {
|
if (!($oBlog=$this->Blog_GetBlogById(getRequestStr('idBlog',null,'post')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -395,7 +395,7 @@ class ActionAjax extends Action {
|
||||||
*/
|
*/
|
||||||
switch($this->ACL_CanVoteBlog($this->oUserCurrent,$oBlog)) {
|
switch($this->ACL_CanVoteBlog($this->oUserCurrent,$oBlog)) {
|
||||||
case ModuleACL::CAN_VOTE_BLOG_TRUE:
|
case ModuleACL::CAN_VOTE_BLOG_TRUE:
|
||||||
$iValue=getRequest('value',null,'post');
|
$iValue=getRequestStr('value',null,'post');
|
||||||
if (in_array($iValue,array('1','-1'))) {
|
if (in_array($iValue,array('1','-1'))) {
|
||||||
$oBlogVote=Engine::GetEntity('Vote');
|
$oBlogVote=Engine::GetEntity('Vote');
|
||||||
$oBlogVote->setTargetId($oBlog->getId());
|
$oBlogVote->setTargetId($oBlog->getId());
|
||||||
|
@ -450,7 +450,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Пользователь существует?
|
* Пользователь существует?
|
||||||
*/
|
*/
|
||||||
if (!($oUser=$this->User_GetUserById(getRequest('idUser',null,'post')))) {
|
if (!($oUser=$this->User_GetUserById(getRequestStr('idUser',null,'post')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -478,7 +478,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Как проголосовал
|
* Как проголосовал
|
||||||
*/
|
*/
|
||||||
$iValue=getRequest('value',null,'post');
|
$iValue=getRequestStr('value',null,'post');
|
||||||
if (!in_array($iValue,array('1','-1'))) {
|
if (!in_array($iValue,array('1','-1'))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('attention'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('attention'));
|
||||||
return;
|
return;
|
||||||
|
@ -525,8 +525,8 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Параметры голосования
|
* Параметры голосования
|
||||||
*/
|
*/
|
||||||
$idAnswer=getRequest('idAnswer',null,'post');
|
$idAnswer=getRequestStr('idAnswer',null,'post');
|
||||||
$idTopic=getRequest('idTopic',null,'post');
|
$idTopic=getRequestStr('idTopic',null,'post');
|
||||||
/**
|
/**
|
||||||
* Топик существует?
|
* Топик существует?
|
||||||
*/
|
*/
|
||||||
|
@ -596,11 +596,11 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Объект уже должен быть в избранном
|
* Объект уже должен быть в избранном
|
||||||
*/
|
*/
|
||||||
if ($oFavourite=$this->Favourite_GetFavourite(getRequest('target_id'),getRequest('target_type'),$this->oUserCurrent->getId())) {
|
if ($oFavourite=$this->Favourite_GetFavourite(getRequestStr('target_id'),getRequestStr('target_type'),$this->oUserCurrent->getId())) {
|
||||||
/**
|
/**
|
||||||
* Обрабатываем теги
|
* Обрабатываем теги
|
||||||
*/
|
*/
|
||||||
$aTags=explode(',',trim((string)getRequest('tags'),"\r\n\t\0\x0B ."));
|
$aTags=explode(',',trim(getRequestStr('tags'),"\r\n\t\0\x0B ."));
|
||||||
$aTagsNew=array();
|
$aTagsNew=array();
|
||||||
$aTagsNewLow=array();
|
$aTagsNewLow=array();
|
||||||
$aTagsReturn=array();
|
$aTagsReturn=array();
|
||||||
|
@ -642,7 +642,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Можно только добавить или удалить из избранного
|
* Можно только добавить или удалить из избранного
|
||||||
*/
|
*/
|
||||||
$iType=getRequest('type',null,'post');
|
$iType=getRequestStr('type',null,'post');
|
||||||
if (!in_array($iType,array('1','0'))) {
|
if (!in_array($iType,array('1','0'))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
@ -650,7 +650,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Топик существует?
|
* Топик существует?
|
||||||
*/
|
*/
|
||||||
if (!($oTopic=$this->Topic_GetTopicById(getRequest('idTopic',null,'post')))) {
|
if (!($oTopic=$this->Topic_GetTopicById(getRequestStr('idTopic',null,'post')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -719,7 +719,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Можно только добавить или удалить из избранного
|
* Можно только добавить или удалить из избранного
|
||||||
*/
|
*/
|
||||||
$iType=getRequest('type',null,'post');
|
$iType=getRequestStr('type',null,'post');
|
||||||
if (!in_array($iType,array('1','0'))) {
|
if (!in_array($iType,array('1','0'))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
@ -727,7 +727,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Комментарий существует?
|
* Комментарий существует?
|
||||||
*/
|
*/
|
||||||
if (!($oComment=$this->Comment_GetCommentById(getRequest('idComment',null,'post')))) {
|
if (!($oComment=$this->Comment_GetCommentById(getRequestStr('idComment',null,'post')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -789,7 +789,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Можно только добавить или удалить из избранного
|
* Можно только добавить или удалить из избранного
|
||||||
*/
|
*/
|
||||||
$iType=getRequest('type',null,'post');
|
$iType=getRequestStr('type',null,'post');
|
||||||
if (!in_array($iType,array('1','0'))) {
|
if (!in_array($iType,array('1','0'))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
@ -797,7 +797,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Сообщение существует?
|
* Сообщение существует?
|
||||||
*/
|
*/
|
||||||
if (!($oTalk=$this->Talk_GetTalkById(getRequest('idTalk',null,'post')))) {
|
if (!($oTalk=$this->Talk_GetTalkById(getRequestStr('idTalk',null,'post')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -965,7 +965,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Допустимый тип топика?
|
* Допустимый тип топика?
|
||||||
*/
|
*/
|
||||||
if (!$this->Topic_IsAllowTopicType($sType=getRequest('topic_type'))) {
|
if (!$this->Topic_IsAllowTopicType($sType=getRequestStr('topic_type'))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('topic_create_type_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('topic_create_type_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -975,9 +975,9 @@ class ActionAjax extends Action {
|
||||||
$oTopic=Engine::GetEntity('ModuleTopic_EntityTopic');
|
$oTopic=Engine::GetEntity('ModuleTopic_EntityTopic');
|
||||||
$oTopic->_setValidateScenario($sType); // зависит от типа топика
|
$oTopic->_setValidateScenario($sType); // зависит от типа топика
|
||||||
|
|
||||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||||
$oTopic->setTextSource(getRequest('topic_text'));
|
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||||
$oTopic->setTags(getRequest('topic_tags'));
|
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||||
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
||||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||||
$oTopic->setType($sType);
|
$oTopic->setType($sType);
|
||||||
|
@ -1023,7 +1023,7 @@ class ActionAjax extends Action {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected function EventPreviewText() {
|
protected function EventPreviewText() {
|
||||||
$sText=(string)getRequest('text',null,'post');
|
$sText=getRequestStr('text',null,'post');
|
||||||
$bSave=getRequest('save',null,'post');
|
$bSave=getRequest('save',null,'post');
|
||||||
/**
|
/**
|
||||||
* Экранировать или нет HTML теги
|
* Экранировать или нет HTML теги
|
||||||
|
@ -1163,7 +1163,7 @@ class ActionAjax extends Action {
|
||||||
/**
|
/**
|
||||||
* Комментарий существует?
|
* Комментарий существует?
|
||||||
*/
|
*/
|
||||||
$idComment=getRequest('idComment',null,'post');
|
$idComment=getRequestStr('idComment',null,'post');
|
||||||
if (!($oComment=$this->Comment_GetCommentById($idComment))) {
|
if (!($oComment=$this->Comment_GetCommentById($idComment))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -198,16 +198,16 @@ class ActionBlog extends Action {
|
||||||
*/
|
*/
|
||||||
$oBlog=Engine::GetEntity('Blog');
|
$oBlog=Engine::GetEntity('Blog');
|
||||||
$oBlog->setOwnerId($this->oUserCurrent->getId());
|
$oBlog->setOwnerId($this->oUserCurrent->getId());
|
||||||
$oBlog->setTitle(strip_tags(getRequest('blog_title')));
|
$oBlog->setTitle(strip_tags(getRequestStr('blog_title')));
|
||||||
/**
|
/**
|
||||||
* Парсим текст на предмет разных ХТМЛ тегов
|
* Парсим текст на предмет разных ХТМЛ тегов
|
||||||
*/
|
*/
|
||||||
$sText=$this->Text_Parser(getRequest('blog_description'));
|
$sText=$this->Text_Parser(getRequestStr('blog_description'));
|
||||||
$oBlog->setDescription($sText);
|
$oBlog->setDescription($sText);
|
||||||
$oBlog->setType(getRequest('blog_type'));
|
$oBlog->setType(getRequestStr('blog_type'));
|
||||||
$oBlog->setDateAdd(date("Y-m-d H:i:s"));
|
$oBlog->setDateAdd(date("Y-m-d H:i:s"));
|
||||||
$oBlog->setLimitRatingTopic(getRequest('blog_limit_rating_topic'));
|
$oBlog->setLimitRatingTopic(getRequestStr('blog_limit_rating_topic'));
|
||||||
$oBlog->setUrl((string)getRequest('blog_url'));
|
$oBlog->setUrl(getRequestStr('blog_url'));
|
||||||
$oBlog->setAvatar(null);
|
$oBlog->setAvatar(null);
|
||||||
/**
|
/**
|
||||||
* Загрузка аватара, делаем ресайзы
|
* Загрузка аватара, делаем ресайзы
|
||||||
|
@ -299,23 +299,23 @@ class ActionBlog extends Action {
|
||||||
if (!$this->checkBlogFields($oBlog)) {
|
if (!$this->checkBlogFields($oBlog)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$oBlog->setTitle(strip_tags(getRequest('blog_title')));
|
$oBlog->setTitle(strip_tags(getRequestStr('blog_title')));
|
||||||
/**
|
/**
|
||||||
* Парсим описание блога на предмет ХТМЛ тегов
|
* Парсим описание блога на предмет ХТМЛ тегов
|
||||||
*/
|
*/
|
||||||
$sText=$this->Text_Parser(getRequest('blog_description'));
|
$sText=$this->Text_Parser(getRequestStr('blog_description'));
|
||||||
$oBlog->setDescription($sText);
|
$oBlog->setDescription($sText);
|
||||||
/**
|
/**
|
||||||
* Сбрасываем кеш, если поменяли тип блога
|
* Сбрасываем кеш, если поменяли тип блога
|
||||||
* Нужна доработка, т.к. в этом блоге могут быть топики других юзеров
|
* Нужна доработка, т.к. в этом блоге могут быть топики других юзеров
|
||||||
*/
|
*/
|
||||||
if ($oBlog->getType()!=getRequest('blog_type')) {
|
if ($oBlog->getType()!=getRequestStr('blog_type')) {
|
||||||
$this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array("topic_update_user_{$oBlog->getOwnerId()}"));
|
$this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array("topic_update_user_{$oBlog->getOwnerId()}"));
|
||||||
}
|
}
|
||||||
$oBlog->setType(getRequest('blog_type'));
|
$oBlog->setType(getRequestStr('blog_type'));
|
||||||
$oBlog->setLimitRatingTopic(getRequest('blog_limit_rating_topic'));
|
$oBlog->setLimitRatingTopic(getRequestStr('blog_limit_rating_topic'));
|
||||||
if ($this->oUserCurrent->isAdministrator()) {
|
if ($this->oUserCurrent->isAdministrator()) {
|
||||||
$oBlog->setUrl((string)getRequest('blog_url')); // разрешаем смену URL блога только админу
|
$oBlog->setUrl(getRequestStr('blog_url')); // разрешаем смену URL блога только админу
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Загрузка аватара, делаем ресайзы
|
* Загрузка аватара, делаем ресайзы
|
||||||
|
@ -399,6 +399,7 @@ class ActionBlog extends Action {
|
||||||
$aUserRank=array();
|
$aUserRank=array();
|
||||||
}
|
}
|
||||||
foreach ($aUserRank as $sUserId => $sRank) {
|
foreach ($aUserRank as $sUserId => $sRank) {
|
||||||
|
$sRank=(string)$sRank;
|
||||||
if (!($oBlogUser=$this->Blog_GetBlogUserByBlogIdAndUserId($oBlog->getId(),$sUserId))) {
|
if (!($oBlogUser=$this->Blog_GetBlogUserByBlogIdAndUserId($oBlog->getId(),$sUserId))) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
break;
|
break;
|
||||||
|
@ -498,14 +499,14 @@ class ActionBlog extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем есть ли название блога
|
* Проверяем есть ли название блога
|
||||||
*/
|
*/
|
||||||
if (!func_check(getRequest('blog_title'),'text',2,200)) {
|
if (!func_check(getRequestStr('blog_title'),'text',2,200)) {
|
||||||
$this->Message_AddError($this->Lang_Get('blog_create_title_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('blog_create_title_error'),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
} else {
|
} else {
|
||||||
/**
|
/**
|
||||||
* Проверяем есть ли уже блог с таким названием
|
* Проверяем есть ли уже блог с таким названием
|
||||||
*/
|
*/
|
||||||
if ($oBlogExists=$this->Blog_GetBlogByTitle(getRequest('blog_title'))) {
|
if ($oBlogExists=$this->Blog_GetBlogByTitle(getRequestStr('blog_title'))) {
|
||||||
if (!$oBlog or $oBlog->getId()!=$oBlogExists->getId()) {
|
if (!$oBlog or $oBlog->getId()!=$oBlogExists->getId()) {
|
||||||
$this->Message_AddError($this->Lang_Get('blog_create_title_error_unique'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('blog_create_title_error_unique'),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
|
@ -517,9 +518,9 @@ class ActionBlog extends Action {
|
||||||
* Проверяем есть ли URL блога, с заменой всех пробельных символов на "_"
|
* Проверяем есть ли URL блога, с заменой всех пробельных символов на "_"
|
||||||
*/
|
*/
|
||||||
if (!$oBlog or $this->oUserCurrent->isAdministrator()) {
|
if (!$oBlog or $this->oUserCurrent->isAdministrator()) {
|
||||||
$blogUrl=preg_replace("/\s+/",'_',(string)getRequest('blog_url'));
|
$blogUrl=preg_replace("/\s+/",'_',getRequestStr('blog_url'));
|
||||||
$_REQUEST['blog_url']=$blogUrl;
|
$_REQUEST['blog_url']=$blogUrl;
|
||||||
if (!func_check(getRequest('blog_url'),'login',2,50)) {
|
if (!func_check(getRequestStr('blog_url'),'login',2,50)) {
|
||||||
$this->Message_AddError($this->Lang_Get('blog_create_url_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('blog_create_url_error'),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
}
|
}
|
||||||
|
@ -527,14 +528,14 @@ class ActionBlog extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем на счет плохих УРЛов
|
* Проверяем на счет плохих УРЛов
|
||||||
*/
|
*/
|
||||||
if (in_array(getRequest('blog_url'),$this->aBadBlogUrl)) {
|
if (in_array(getRequestStr('blog_url'),$this->aBadBlogUrl)) {
|
||||||
$this->Message_AddError($this->Lang_Get('blog_create_url_error_badword').' '.join(',',$this->aBadBlogUrl),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('blog_create_url_error_badword').' '.join(',',$this->aBadBlogUrl),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Проверяем есть ли уже блог с таким URL
|
* Проверяем есть ли уже блог с таким URL
|
||||||
*/
|
*/
|
||||||
if ($oBlogExists=$this->Blog_GetBlogByUrl((string)getRequest('blog_url'))) {
|
if ($oBlogExists=$this->Blog_GetBlogByUrl(getRequestStr('blog_url'))) {
|
||||||
if (!$oBlog or $oBlog->getId()!=$oBlogExists->getId()) {
|
if (!$oBlog or $oBlog->getId()!=$oBlogExists->getId()) {
|
||||||
$this->Message_AddError($this->Lang_Get('blog_create_url_error_unique'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('blog_create_url_error_unique'),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
|
@ -543,21 +544,21 @@ class ActionBlog extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем есть ли описание блога
|
* Проверяем есть ли описание блога
|
||||||
*/
|
*/
|
||||||
if (!func_check(getRequest('blog_description'),'text',10,3000)) {
|
if (!func_check(getRequestStr('blog_description'),'text',10,3000)) {
|
||||||
$this->Message_AddError($this->Lang_Get('blog_create_description_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('blog_create_description_error'),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Проверяем доступные типы блога для создания
|
* Проверяем доступные типы блога для создания
|
||||||
*/
|
*/
|
||||||
if (!in_array(getRequest('blog_type'),array('open','close'))) {
|
if (!in_array(getRequestStr('blog_type'),array('open','close'))) {
|
||||||
$this->Message_AddError($this->Lang_Get('blog_create_type_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('blog_create_type_error'),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Преобразуем ограничение по рейтингу в число
|
* Преобразуем ограничение по рейтингу в число
|
||||||
*/
|
*/
|
||||||
if (!func_check(getRequest('blog_limit_rating_topic'),'float')) {
|
if (!func_check(getRequestStr('blog_limit_rating_topic'),'float')) {
|
||||||
$this->Message_AddError($this->Lang_Get('blog_create_rating_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('blog_create_rating_error'),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
}
|
}
|
||||||
|
@ -573,8 +574,8 @@ class ActionBlog extends Action {
|
||||||
*/
|
*/
|
||||||
protected function EventTopics() {
|
protected function EventTopics() {
|
||||||
$sPeriod=1; // по дефолту 1 день
|
$sPeriod=1; // по дефолту 1 день
|
||||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||||
$sPeriod=getRequest('period');
|
$sPeriod=getRequestStr('period');
|
||||||
}
|
}
|
||||||
$sShowType=$this->sCurrentEvent;
|
$sShowType=$this->sCurrentEvent;
|
||||||
if (!in_array($sShowType,array('discussed','top'))) {
|
if (!in_array($sShowType,array('discussed','top'))) {
|
||||||
|
@ -812,8 +813,8 @@ class ActionBlog extends Action {
|
||||||
*/
|
*/
|
||||||
protected function EventShowBlog() {
|
protected function EventShowBlog() {
|
||||||
$sPeriod=1; // по дефолту 1 день
|
$sPeriod=1; // по дефолту 1 день
|
||||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||||
$sPeriod=getRequest('period');
|
$sPeriod=getRequestStr('period');
|
||||||
}
|
}
|
||||||
$sBlogUrl=$this->sCurrentEvent;
|
$sBlogUrl=$this->sCurrentEvent;
|
||||||
$sShowType=in_array($this->GetParamEventMatch(0,0),array('bad','new','newall','discussed','top')) ? $this->GetParamEventMatch(0,0) : 'good';
|
$sShowType=in_array($this->GetParamEventMatch(0,0),array('bad','new','newall','discussed','top')) ? $this->GetParamEventMatch(0,0) : 'good';
|
||||||
|
@ -959,7 +960,7 @@ class ActionBlog extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем топик
|
* Проверяем топик
|
||||||
*/
|
*/
|
||||||
if (!($oTopic=$this->Topic_GetTopicById(getRequest('cmt_target_id')))) {
|
if (!($oTopic=$this->Topic_GetTopicById(getRequestStr('cmt_target_id')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -994,7 +995,7 @@ class ActionBlog extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем текст комментария
|
* Проверяем текст комментария
|
||||||
*/
|
*/
|
||||||
$sText=$this->Text_Parser(getRequest('comment_text'));
|
$sText=$this->Text_Parser(getRequestStr('comment_text'));
|
||||||
if (!func_check($sText,'text',2,10000)) {
|
if (!func_check($sText,'text',2,10000)) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('topic_comment_add_text_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('topic_comment_add_text_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
@ -1123,14 +1124,14 @@ class ActionBlog extends Action {
|
||||||
/**
|
/**
|
||||||
* Топик существует?
|
* Топик существует?
|
||||||
*/
|
*/
|
||||||
$idTopic=getRequest('idTarget',null,'post');
|
$idTopic=getRequestStr('idTarget',null,'post');
|
||||||
if (!($oTopic=$this->Topic_GetTopicById($idTopic))) {
|
if (!($oTopic=$this->Topic_GetTopicById($idTopic))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$idCommentLast=getRequest('idCommentLast',null,'post');
|
$idCommentLast=getRequestStr('idCommentLast',null,'post');
|
||||||
$selfIdComment=getRequest('selfIdComment',null,'post');
|
$selfIdComment=getRequestStr('selfIdComment',null,'post');
|
||||||
$aComments=array();
|
$aComments=array();
|
||||||
/**
|
/**
|
||||||
* Если используется постраничность, возвращаем только добавленный комментарий
|
* Если используется постраничность, возвращаем только добавленный комментарий
|
||||||
|
@ -1190,7 +1191,7 @@ class ActionBlog extends Action {
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$sUsers=getRequest('users',null,'post');
|
$sUsers=getRequest('users',null,'post');
|
||||||
$sBlogId=getRequest('idBlog',null,'post');
|
$sBlogId=getRequestStr('idBlog',null,'post');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
@ -1336,8 +1337,8 @@ class ActionBlog extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$sUserId=getRequest('idUser',null,'post');
|
$sUserId=getRequestStr('idUser',null,'post');
|
||||||
$sBlogId=getRequest('idBlog',null,'post');
|
$sBlogId=getRequestStr('idBlog',null,'post');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
@ -1386,8 +1387,8 @@ class ActionBlog extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$sUserId=getRequest('idUser',null,'post');
|
$sUserId=getRequestStr('idUser',null,'post');
|
||||||
$sBlogId=getRequest('idBlog',null,'post');
|
$sBlogId=getRequestStr('idBlog',null,'post');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
@ -1488,7 +1489,7 @@ class ActionBlog extends Action {
|
||||||
/**
|
/**
|
||||||
* Получаем код подтверждения из ревеста и дешефруем его
|
* Получаем код подтверждения из ревеста и дешефруем его
|
||||||
*/
|
*/
|
||||||
$sCode=xxtea_decrypt(base64_decode(rawurldecode((string)getRequest('code'))), Config::Get('module.blog.encrypt'));
|
$sCode=xxtea_decrypt(base64_decode(rawurldecode(getRequestStr('code'))), Config::Get('module.blog.encrypt'));
|
||||||
if (!$sCode) {
|
if (!$sCode) {
|
||||||
return $this->EventNotFound();
|
return $this->EventNotFound();
|
||||||
}
|
}
|
||||||
|
@ -1602,7 +1603,7 @@ class ActionBlog extends Action {
|
||||||
*
|
*
|
||||||
* (-1) - выбран пункт меню "удалить топики".
|
* (-1) - выбран пункт меню "удалить топики".
|
||||||
*/
|
*/
|
||||||
if($sBlogIdNew=getRequest('topic_move_to') and ($sBlogIdNew!=-1) and is_array($aTopics) and count($aTopics)) {
|
if($sBlogIdNew=getRequestStr('topic_move_to') and ($sBlogIdNew!=-1) and is_array($aTopics) and count($aTopics)) {
|
||||||
if(!$oBlogNew = $this->Blog_GetBlogById($sBlogIdNew)){
|
if(!$oBlogNew = $this->Blog_GetBlogById($sBlogIdNew)){
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('blog_admin_delete_move_error'),$this->Lang_Get('error'),true);
|
$this->Message_AddErrorSingle($this->Lang_Get('blog_admin_delete_move_error'),$this->Lang_Get('error'),true);
|
||||||
Router::Location($oBlog->getUrlFull());
|
Router::Location($oBlog->getUrlFull());
|
||||||
|
@ -1644,7 +1645,7 @@ class ActionBlog extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$sBlogId=getRequest('idBlog',null,'post');
|
$sBlogId=getRequestStr('idBlog',null,'post');
|
||||||
/**
|
/**
|
||||||
* Определяем тип блога и получаем его
|
* Определяем тип блога и получаем его
|
||||||
*/
|
*/
|
||||||
|
@ -1682,7 +1683,7 @@ class ActionBlog extends Action {
|
||||||
/**
|
/**
|
||||||
* Блог существует?
|
* Блог существует?
|
||||||
*/
|
*/
|
||||||
$idBlog=getRequest('idBlog',null,'post');
|
$idBlog=getRequestStr('idBlog',null,'post');
|
||||||
if (!($oBlog=$this->Blog_GetBlogById($idBlog))) {
|
if (!($oBlog=$this->Blog_GetBlogById($idBlog))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -58,7 +58,7 @@ class ActionBlogs extends Action {
|
||||||
/**
|
/**
|
||||||
* Получаем из реквеста первые буквы блога
|
* Получаем из реквеста первые буквы блога
|
||||||
*/
|
*/
|
||||||
if ($sTitle=getRequest('blog_title') and is_string($sTitle)) {
|
if ($sTitle=getRequestStr('blog_title')) {
|
||||||
$sTitle=str_replace('%','',$sTitle);
|
$sTitle=str_replace('%','',$sTitle);
|
||||||
}
|
}
|
||||||
if (!$sTitle) {
|
if (!$sTitle) {
|
||||||
|
@ -87,14 +87,14 @@ class ActionBlogs extends Action {
|
||||||
*/
|
*/
|
||||||
$sOrder='blog_rating';
|
$sOrder='blog_rating';
|
||||||
if (getRequest('order')) {
|
if (getRequest('order')) {
|
||||||
$sOrder=(string)getRequest('order');
|
$sOrder=getRequestStr('order');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* В каком направлении сортировать
|
* В каком направлении сортировать
|
||||||
*/
|
*/
|
||||||
$sOrderWay='desc';
|
$sOrderWay='desc';
|
||||||
if (getRequest('order_way')) {
|
if (getRequest('order_way')) {
|
||||||
$sOrderWay=(string)getRequest('order_way');
|
$sOrderWay=getRequestStr('order_way');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Фильтр поиска блогов
|
* Фильтр поиска блогов
|
||||||
|
|
|
@ -94,8 +94,8 @@ class ActionIndex extends Action {
|
||||||
*/
|
*/
|
||||||
protected function EventTop() {
|
protected function EventTop() {
|
||||||
$sPeriod=1; // по дефолту 1 день
|
$sPeriod=1; // по дефолту 1 день
|
||||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||||
$sPeriod=getRequest('period');
|
$sPeriod=getRequestStr('period');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Меню
|
* Меню
|
||||||
|
@ -145,8 +145,8 @@ class ActionIndex extends Action {
|
||||||
*/
|
*/
|
||||||
protected function EventDiscussed() {
|
protected function EventDiscussed() {
|
||||||
$sPeriod=1; // по дефолту 1 день
|
$sPeriod=1; // по дефолту 1 день
|
||||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||||
$sPeriod=getRequest('period');
|
$sPeriod=getRequestStr('period');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Меню
|
* Меню
|
||||||
|
|
|
@ -219,13 +219,13 @@ class ActionLink extends Action {
|
||||||
/**
|
/**
|
||||||
* Заполняем поля для валидации
|
* Заполняем поля для валидации
|
||||||
*/
|
*/
|
||||||
$oTopic->setBlogId(getRequest('blog_id'));
|
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||||
$oTopic->setTextSource(getRequest('topic_text'));
|
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||||
$oTopic->setTags(getRequest('topic_tags'));
|
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||||
$oTopic->setType('link');
|
$oTopic->setType('link');
|
||||||
$oTopic->setLinkUrl(getRequest('topic_link_url'));
|
$oTopic->setLinkUrl(getRequestStr('topic_link_url'));
|
||||||
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
||||||
$oTopic->setUserIp(func_getIp());
|
$oTopic->setUserIp(func_getIp());
|
||||||
/**
|
/**
|
||||||
|
@ -347,11 +347,11 @@ class ActionLink extends Action {
|
||||||
/**
|
/**
|
||||||
* Заполняем поля для валидации
|
* Заполняем поля для валидации
|
||||||
*/
|
*/
|
||||||
$oTopic->setBlogId(getRequest('blog_id'));
|
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||||
$oTopic->setLinkUrl(getRequest('topic_link_url'));
|
$oTopic->setLinkUrl(getRequestStr('topic_link_url'));
|
||||||
$oTopic->setTextSource(getRequest('topic_text'));
|
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||||
$oTopic->setTags(getRequest('topic_tags'));
|
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||||
$oTopic->setUserIp(func_getIp());
|
$oTopic->setUserIp(func_getIp());
|
||||||
/**
|
/**
|
||||||
* Проверка корректности полей формы
|
* Проверка корректности полей формы
|
||||||
|
|
|
@ -87,8 +87,8 @@ class ActionLogin extends Action {
|
||||||
* Определяем редирект
|
* Определяем редирект
|
||||||
*/
|
*/
|
||||||
$sUrl=Config::Get('module.user.redirect_after_login');
|
$sUrl=Config::Get('module.user.redirect_after_login');
|
||||||
if (getRequest('return-path')) {
|
if (getRequestStr('return-path')) {
|
||||||
$sUrl=getRequest('return-path');
|
$sUrl=getRequestStr('return-path');
|
||||||
}
|
}
|
||||||
$this->Viewer_AssignAjax('sUrlRedirect',$sUrl ? $sUrl : Config::Get('path.root.web'));
|
$this->Viewer_AssignAjax('sUrlRedirect',$sUrl ? $sUrl : Config::Get('path.root.web'));
|
||||||
return;
|
return;
|
||||||
|
@ -112,7 +112,7 @@ class ActionLogin extends Action {
|
||||||
protected function EventAjaxReactivation() {
|
protected function EventAjaxReactivation() {
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
|
|
||||||
if ((func_check(getRequest('mail'), 'mail') and $oUser = $this->User_GetUserByMail(getRequest('mail')))) {
|
if ((func_check(getRequestStr('mail'), 'mail') and $oUser = $this->User_GetUserByMail(getRequestStr('mail')))) {
|
||||||
if ($oUser->getActivate()) {
|
if ($oUser->getActivate()) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('registration_activate_error_reactivate'));
|
$this->Message_AddErrorSingle($this->Lang_Get('registration_activate_error_reactivate'));
|
||||||
return;
|
return;
|
||||||
|
@ -162,7 +162,7 @@ class ActionLogin extends Action {
|
||||||
/**
|
/**
|
||||||
* Пользователь с таким емайлом существует?
|
* Пользователь с таким емайлом существует?
|
||||||
*/
|
*/
|
||||||
if ((func_check(getRequest('mail'),'mail') and $oUser=$this->User_GetUserByMail(getRequest('mail')))) {
|
if ((func_check(getRequestStr('mail'),'mail') and $oUser=$this->User_GetUserByMail(getRequestStr('mail')))) {
|
||||||
/**
|
/**
|
||||||
* Формируем и отправляем ссылку на смену пароля
|
* Формируем и отправляем ссылку на смену пароля
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -236,14 +236,14 @@ class ActionPeople extends Action {
|
||||||
*/
|
*/
|
||||||
$sOrder='user_rating';
|
$sOrder='user_rating';
|
||||||
if (getRequest('order')) {
|
if (getRequest('order')) {
|
||||||
$sOrder=(string)getRequest('order');
|
$sOrder=getRequestStr('order');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* В каком направлении сортировать
|
* В каком направлении сортировать
|
||||||
*/
|
*/
|
||||||
$sOrderWay='desc';
|
$sOrderWay='desc';
|
||||||
if (getRequest('order_way')) {
|
if (getRequest('order_way')) {
|
||||||
$sOrderWay=(string)getRequest('order_way');
|
$sOrderWay=getRequestStr('order_way');
|
||||||
}
|
}
|
||||||
$aFilter=array(
|
$aFilter=array(
|
||||||
'activate' => 1
|
'activate' => 1
|
||||||
|
|
|
@ -74,8 +74,8 @@ class ActionPersonalBlog extends Action {
|
||||||
*/
|
*/
|
||||||
protected function EventTopics() {
|
protected function EventTopics() {
|
||||||
$sPeriod=1; // по дефолту 1 день
|
$sPeriod=1; // по дефолту 1 день
|
||||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||||
$sPeriod=getRequest('period');
|
$sPeriod=getRequestStr('period');
|
||||||
}
|
}
|
||||||
$sShowType=$this->sCurrentEvent;
|
$sShowType=$this->sCurrentEvent;
|
||||||
if (!in_array($sShowType,array('discussed','top'))) {
|
if (!in_array($sShowType,array('discussed','top'))) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ class ActionPhotoset extends Action {
|
||||||
/**
|
/**
|
||||||
* Существует ли топик
|
* Существует ли топик
|
||||||
*/
|
*/
|
||||||
$oTopic = $this->Topic_getTopicById(getRequest('topic_id'));
|
$oTopic = $this->Topic_getTopicById(getRequestStr('topic_id'));
|
||||||
if (!$oTopic || !getRequest('last_id')) {
|
if (!$oTopic || !getRequest('last_id')) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'), $this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'), $this->Lang_Get('error'));
|
||||||
return false;
|
return false;
|
||||||
|
@ -105,7 +105,7 @@ class ActionPhotoset extends Action {
|
||||||
/**
|
/**
|
||||||
* Получаем список фото
|
* Получаем список фото
|
||||||
*/
|
*/
|
||||||
$aPhotos = $oTopic->getPhotosetPhotos(getRequest('last_id'), Config::Get('module.topic.photoset.per_page'));
|
$aPhotos = $oTopic->getPhotosetPhotos(getRequestStr('last_id'), Config::Get('module.topic.photoset.per_page'));
|
||||||
$aResult = array();
|
$aResult = array();
|
||||||
if (count($aPhotos)) {
|
if (count($aPhotos)) {
|
||||||
/**
|
/**
|
||||||
|
@ -137,7 +137,7 @@ class ActionPhotoset extends Action {
|
||||||
/**
|
/**
|
||||||
* Поиск фото по id
|
* Поиск фото по id
|
||||||
*/
|
*/
|
||||||
$oPhoto = $this->Topic_getTopicPhotoById(getRequest('id'));
|
$oPhoto = $this->Topic_getTopicPhotoById(getRequestStr('id'));
|
||||||
if ($oPhoto) {
|
if ($oPhoto) {
|
||||||
if ($oPhoto->getTopicId()) {
|
if ($oPhoto->getTopicId()) {
|
||||||
/**
|
/**
|
||||||
|
@ -188,16 +188,16 @@ class ActionPhotoset extends Action {
|
||||||
/**
|
/**
|
||||||
* Поиск фото по id
|
* Поиск фото по id
|
||||||
*/
|
*/
|
||||||
$oPhoto = $this->Topic_getTopicPhotoById(getRequest('id'));
|
$oPhoto = $this->Topic_getTopicPhotoById(getRequestStr('id'));
|
||||||
if ($oPhoto) {
|
if ($oPhoto) {
|
||||||
if ($oPhoto->getTopicId()) {
|
if ($oPhoto->getTopicId()) {
|
||||||
// проверяем права на топик
|
// проверяем права на топик
|
||||||
if ($oTopic=$this->Topic_GetTopicById($oPhoto->getTopicId()) and $this->ACL_IsAllowEditTopic($oTopic,$this->oUserCurrent)) {
|
if ($oTopic=$this->Topic_GetTopicById($oPhoto->getTopicId()) and $this->ACL_IsAllowEditTopic($oTopic,$this->oUserCurrent)) {
|
||||||
$oPhoto->setDescription(htmlspecialchars(strip_tags(getRequest('text'))));
|
$oPhoto->setDescription(htmlspecialchars(strip_tags(getRequestStr('text'))));
|
||||||
$this->Topic_updateTopicPhoto($oPhoto);
|
$this->Topic_updateTopicPhoto($oPhoto);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$oPhoto->setDescription(htmlspecialchars(strip_tags(getRequest('text'))));
|
$oPhoto->setDescription(htmlspecialchars(strip_tags(getRequestStr('text'))));
|
||||||
$this->Topic_updateTopicPhoto($oPhoto);
|
$this->Topic_updateTopicPhoto($oPhoto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -232,12 +232,12 @@ class ActionPhotoset extends Action {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$iTopicId = getRequest('topic_id');
|
$iTopicId = getRequestStr('topic_id');
|
||||||
$sTargetId = null;
|
$sTargetId = null;
|
||||||
$iCountPhotos = 0;
|
$iCountPhotos = 0;
|
||||||
// Если от сервера не пришёл id топика, то пытаемся определить временный код для нового топика. Если и его нет. то это ошибка
|
// Если от сервера не пришёл id топика, то пытаемся определить временный код для нового топика. Если и его нет. то это ошибка
|
||||||
if (!$iTopicId) {
|
if (!$iTopicId) {
|
||||||
$sTargetId = empty($_COOKIE['ls_photoset_target_tmp']) ? getRequest('ls_photoset_target_tmp') : $_COOKIE['ls_photoset_target_tmp'];
|
$sTargetId = empty($_COOKIE['ls_photoset_target_tmp']) ? getRequestStr('ls_photoset_target_tmp') : $_COOKIE['ls_photoset_target_tmp'];
|
||||||
if (!$sTargetId) {
|
if (!$sTargetId) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'), $this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'), $this->Lang_Get('error'));
|
||||||
return false;
|
return false;
|
||||||
|
@ -430,10 +430,10 @@ class ActionPhotoset extends Action {
|
||||||
/**
|
/**
|
||||||
* Заполняем поля для валидации
|
* Заполняем поля для валидации
|
||||||
*/
|
*/
|
||||||
$oTopic->setBlogId(getRequest('blog_id'));
|
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||||
$oTopic->setTextSource(getRequest('topic_text'));
|
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||||
$oTopic->setTags(getRequest('topic_tags'));
|
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||||
$oTopic->setType('photoset');
|
$oTopic->setType('photoset');
|
||||||
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
||||||
|
@ -488,7 +488,7 @@ class ActionPhotoset extends Action {
|
||||||
|
|
||||||
$sTargetTmp=$_COOKIE['ls_photoset_target_tmp'];
|
$sTargetTmp=$_COOKIE['ls_photoset_target_tmp'];
|
||||||
$aPhotos = $this->Topic_getPhotosByTargetTmp($sTargetTmp);
|
$aPhotos = $this->Topic_getPhotosByTargetTmp($sTargetTmp);
|
||||||
if (!($oPhotoMain=$this->Topic_getTopicPhotoById(getRequest('topic_main_photo')) and $oPhotoMain->getTargetTmp()==$sTargetTmp)) {
|
if (!($oPhotoMain=$this->Topic_getTopicPhotoById(getRequestStr('topic_main_photo')) and $oPhotoMain->getTargetTmp()==$sTargetTmp)) {
|
||||||
$oPhotoMain=$aPhotos[0];
|
$oPhotoMain=$aPhotos[0];
|
||||||
}
|
}
|
||||||
$oTopic->setPhotosetMainPhotoId($oPhotoMain->getId());
|
$oTopic->setPhotosetMainPhotoId($oPhotoMain->getId());
|
||||||
|
@ -586,10 +586,10 @@ class ActionPhotoset extends Action {
|
||||||
/**
|
/**
|
||||||
* Заполняем поля для валидации
|
* Заполняем поля для валидации
|
||||||
*/
|
*/
|
||||||
$oTopic->setBlogId(getRequest('blog_id'));
|
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||||
$oTopic->setTextSource(getRequest('topic_text'));
|
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||||
$oTopic->setTags(getRequest('topic_tags'));
|
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||||
$oTopic->setUserIp(func_getIp());
|
$oTopic->setUserIp(func_getIp());
|
||||||
/**
|
/**
|
||||||
* Проверка корректности полей формы
|
* Проверка корректности полей формы
|
||||||
|
@ -640,7 +640,7 @@ class ActionPhotoset extends Action {
|
||||||
$oTopic->setTextShort($this->Text_Parser($sTextShort));
|
$oTopic->setTextShort($this->Text_Parser($sTextShort));
|
||||||
|
|
||||||
$aPhotos = $oTopic->getPhotosetPhotos();
|
$aPhotos = $oTopic->getPhotosetPhotos();
|
||||||
if (!($oPhotoMain=$this->Topic_getTopicPhotoById(getRequest('topic_main_photo')) and $oPhotoMain->getTopicId()==$oTopic->getId())) {
|
if (!($oPhotoMain=$this->Topic_getTopicPhotoById(getRequestStr('topic_main_photo')) and $oPhotoMain->getTopicId()==$oTopic->getId())) {
|
||||||
$oPhotoMain=$aPhotos[0];
|
$oPhotoMain=$aPhotos[0];
|
||||||
}
|
}
|
||||||
$oTopic->setPhotosetMainPhotoId($oPhotoMain->getId());
|
$oTopic->setPhotosetMainPhotoId($oPhotoMain->getId());
|
||||||
|
|
|
@ -454,8 +454,8 @@ class ActionProfile extends Action {
|
||||||
$oWall->_setValidateScenario('add');
|
$oWall->_setValidateScenario('add');
|
||||||
$oWall->setWallUserId($this->oUserProfile->getId());
|
$oWall->setWallUserId($this->oUserProfile->getId());
|
||||||
$oWall->setUserId($this->oUserCurrent->getId());
|
$oWall->setUserId($this->oUserCurrent->getId());
|
||||||
$oWall->setText(getRequest('sText'));
|
$oWall->setText(getRequestStr('sText'));
|
||||||
$oWall->setPid(getRequest('iPid'));
|
$oWall->setPid(getRequestStr('iPid'));
|
||||||
|
|
||||||
$this->Hook_Run('wall_add_validate_before', array('oWall'=>$oWall));
|
$this->Hook_Run('wall_add_validate_before', array('oWall'=>$oWall));
|
||||||
if ($oWall->_Validate()) {
|
if ($oWall->_Validate()) {
|
||||||
|
@ -506,7 +506,7 @@ class ActionProfile extends Action {
|
||||||
/**
|
/**
|
||||||
* Получаем запись
|
* Получаем запись
|
||||||
*/
|
*/
|
||||||
if (!($oWall=$this->Wall_GetWallById(getRequest('iId')))) {
|
if (!($oWall=$this->Wall_GetWallById(getRequestStr('iId')))) {
|
||||||
return parent::EventNotFound();
|
return parent::EventNotFound();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -565,7 +565,7 @@ class ActionProfile extends Action {
|
||||||
if (!$this->CheckUserProfile()) {
|
if (!$this->CheckUserProfile()) {
|
||||||
return parent::EventNotFound();
|
return parent::EventNotFound();
|
||||||
}
|
}
|
||||||
if (!($oWall=$this->Wall_GetWallById(getRequest('iPid'))) or $oWall->getPid()) {
|
if (!($oWall=$this->Wall_GetWallById(getRequestStr('iPid'))) or $oWall->getPid()) {
|
||||||
return parent::EventNotFound();
|
return parent::EventNotFound();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -611,9 +611,9 @@ class ActionProfile extends Action {
|
||||||
* Создаем заметку и проводим валидацию
|
* Создаем заметку и проводим валидацию
|
||||||
*/
|
*/
|
||||||
$oNote=Engine::GetEntity('ModuleUser_EntityNote');
|
$oNote=Engine::GetEntity('ModuleUser_EntityNote');
|
||||||
$oNote->setTargetUserId(getRequest('iUserId'));
|
$oNote->setTargetUserId(getRequestStr('iUserId'));
|
||||||
$oNote->setUserId($this->oUserCurrent->getId());
|
$oNote->setUserId($this->oUserCurrent->getId());
|
||||||
$oNote->setText((string)getRequest('text'));
|
$oNote->setText(getRequestStr('text'));
|
||||||
|
|
||||||
if ($oNote->_Validate()) {
|
if ($oNote->_Validate()) {
|
||||||
/**
|
/**
|
||||||
|
@ -641,7 +641,7 @@ class ActionProfile extends Action {
|
||||||
return parent::EventNotFound();
|
return parent::EventNotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!($oUserTarget=$this->User_GetUserById(getRequest('iUserId')))) {
|
if (!($oUserTarget=$this->User_GetUserById(getRequestStr('iUserId')))) {
|
||||||
return parent::EventNotFound();
|
return parent::EventNotFound();
|
||||||
}
|
}
|
||||||
if (!($oNote=$this->User_GetUserNote($oUserTarget->getId(),$this->oUserCurrent->getId()))) {
|
if (!($oNote=$this->User_GetUserNote($oUserTarget->getId(),$this->oUserCurrent->getId()))) {
|
||||||
|
@ -696,7 +696,7 @@ class ActionProfile extends Action {
|
||||||
/**
|
/**
|
||||||
* Из реквеста дешефруем ID польователя
|
* Из реквеста дешефруем ID польователя
|
||||||
*/
|
*/
|
||||||
$sUserId=xxtea_decrypt(base64_decode(rawurldecode((string)getRequest('code'))), Config::Get('module.talk.encrypt'));
|
$sUserId=xxtea_decrypt(base64_decode(rawurldecode(getRequestStr('code'))), Config::Get('module.talk.encrypt'));
|
||||||
if (!$sUserId) {
|
if (!$sUserId) {
|
||||||
return $this->EventNotFound();
|
return $this->EventNotFound();
|
||||||
}
|
}
|
||||||
|
@ -776,7 +776,7 @@ class ActionProfile extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$sUserId=getRequest('idUser',null,'post');
|
$sUserId=getRequestStr('idUser',null,'post');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
@ -896,8 +896,8 @@ class ActionProfile extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$sUserId=getRequest('idUser');
|
$sUserId=getRequestStr('idUser');
|
||||||
$sUserText=getRequest('userText','');
|
$sUserText=getRequestStr('userText','');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
@ -1120,7 +1120,7 @@ class ActionProfile extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$sUserId=getRequest('idUser',null,'post');
|
$sUserId=getRequestStr('idUser',null,'post');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -190,10 +190,10 @@ class ActionQuestion extends Action {
|
||||||
/**
|
/**
|
||||||
* Заполняем поля для валидации
|
* Заполняем поля для валидации
|
||||||
*/
|
*/
|
||||||
$oTopic->setBlogId(getRequest('blog_id'));
|
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||||
$oTopic->setTextSource(getRequest('topic_text'));
|
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||||
$oTopic->setTags(getRequest('topic_tags'));
|
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||||
$oTopic->setType('question');
|
$oTopic->setType('question');
|
||||||
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
||||||
|
@ -246,7 +246,7 @@ class ActionQuestion extends Action {
|
||||||
*/
|
*/
|
||||||
$oTopic->clearQuestionAnswer();
|
$oTopic->clearQuestionAnswer();
|
||||||
foreach (getRequest('answer',array()) as $sAnswer) {
|
foreach (getRequest('answer',array()) as $sAnswer) {
|
||||||
$oTopic->addQuestionAnswer($sAnswer);
|
$oTopic->addQuestionAnswer((string)$sAnswer);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Публикуем или сохраняем
|
* Публикуем или сохраняем
|
||||||
|
@ -324,12 +324,12 @@ class ActionQuestion extends Action {
|
||||||
/**
|
/**
|
||||||
* Заполняем поля для валидации
|
* Заполняем поля для валидации
|
||||||
*/
|
*/
|
||||||
$oTopic->setBlogId(getRequest('blog_id'));
|
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||||
if ($oTopic->getQuestionCountVote()==0) {
|
if ($oTopic->getQuestionCountVote()==0) {
|
||||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||||
}
|
}
|
||||||
$oTopic->setTextSource(getRequest('topic_text'));
|
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||||
$oTopic->setTags(getRequest('topic_tags'));
|
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||||
$oTopic->setUserIp(func_getIp());
|
$oTopic->setUserIp(func_getIp());
|
||||||
/**
|
/**
|
||||||
* Проверка корректности полей формы
|
* Проверка корректности полей формы
|
||||||
|
@ -380,7 +380,7 @@ class ActionQuestion extends Action {
|
||||||
if ($oTopic->getQuestionCountVote()==0) {
|
if ($oTopic->getQuestionCountVote()==0) {
|
||||||
$oTopic->clearQuestionAnswer();
|
$oTopic->clearQuestionAnswer();
|
||||||
foreach (getRequest('answer',array()) as $sAnswer) {
|
foreach (getRequest('answer',array()) as $sAnswer) {
|
||||||
$oTopic->addQuestionAnswer($sAnswer);
|
$oTopic->addQuestionAnswer((string)$sAnswer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -476,6 +476,7 @@ class ActionQuestion extends Action {
|
||||||
*/
|
*/
|
||||||
$aAnswers=getRequest('answer',array());
|
$aAnswers=getRequest('answer',array());
|
||||||
foreach ($aAnswers as $key => $sAnswer) {
|
foreach ($aAnswers as $key => $sAnswer) {
|
||||||
|
$sAnswer=(string)$sAnswer;
|
||||||
if (trim($sAnswer)=='') {
|
if (trim($sAnswer)=='') {
|
||||||
unset($aAnswers[$key]);
|
unset($aAnswers[$key]);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -148,11 +148,11 @@ class ActionRegistration extends Action {
|
||||||
/**
|
/**
|
||||||
* Заполняем поля (данные)
|
* Заполняем поля (данные)
|
||||||
*/
|
*/
|
||||||
$oUser->setLogin(getRequest('login'));
|
$oUser->setLogin(getRequestStr('login'));
|
||||||
$oUser->setMail(getRequest('mail'));
|
$oUser->setMail(getRequestStr('mail'));
|
||||||
$oUser->setPassword(getRequest('password'));
|
$oUser->setPassword(getRequestStr('password'));
|
||||||
$oUser->setPasswordConfirm(getRequest('password_confirm'));
|
$oUser->setPasswordConfirm(getRequestStr('password_confirm'));
|
||||||
$oUser->setCaptcha(getRequest('captcha'));
|
$oUser->setCaptcha(getRequestStr('captcha'));
|
||||||
$oUser->setDateRegister(date("Y-m-d H:i:s"));
|
$oUser->setDateRegister(date("Y-m-d H:i:s"));
|
||||||
$oUser->setIpRegister(func_getIp());
|
$oUser->setIpRegister(func_getIp());
|
||||||
/**
|
/**
|
||||||
|
@ -198,10 +198,10 @@ class ActionRegistration extends Action {
|
||||||
/**
|
/**
|
||||||
* Отправляем на мыло письмо о подтверждении регистрации
|
* Отправляем на мыло письмо о подтверждении регистрации
|
||||||
*/
|
*/
|
||||||
$this->Notify_SendRegistrationActivate($oUser,getRequest('password'));
|
$this->Notify_SendRegistrationActivate($oUser,getRequestStr('password'));
|
||||||
$this->Viewer_AssignAjax('sUrlRedirect',Router::GetPath('registration').'confirm/');
|
$this->Viewer_AssignAjax('sUrlRedirect',Router::GetPath('registration').'confirm/');
|
||||||
} else {
|
} else {
|
||||||
$this->Notify_SendRegistration($oUser,getRequest('password'));
|
$this->Notify_SendRegistration($oUser,getRequestStr('password'));
|
||||||
$oUser=$this->User_GetUserById($oUser->getId());
|
$oUser=$this->User_GetUserById($oUser->getId());
|
||||||
/**
|
/**
|
||||||
* Сразу авторизуем
|
* Сразу авторизуем
|
||||||
|
@ -212,8 +212,8 @@ class ActionRegistration extends Action {
|
||||||
* Определяем URL для редиректа после авторизации
|
* Определяем URL для редиректа после авторизации
|
||||||
*/
|
*/
|
||||||
$sUrl=Config::Get('module.user.redirect_after_registration');
|
$sUrl=Config::Get('module.user.redirect_after_registration');
|
||||||
if (getRequest('return-path')) {
|
if (getRequestStr('return-path')) {
|
||||||
$sUrl=getRequest('return-path');
|
$sUrl=getRequestStr('return-path');
|
||||||
}
|
}
|
||||||
$this->Viewer_AssignAjax('sUrlRedirect',$sUrl ? $sUrl : Config::Get('path.root.web'));
|
$this->Viewer_AssignAjax('sUrlRedirect',$sUrl ? $sUrl : Config::Get('path.root.web'));
|
||||||
$this->Message_AddNoticeSingle($this->Lang_Get('registration_ok'));
|
$this->Message_AddNoticeSingle($this->Lang_Get('registration_ok'));
|
||||||
|
@ -304,7 +304,7 @@ class ActionRegistration extends Action {
|
||||||
if ($this->CheckInviteRegister()) {
|
if ($this->CheckInviteRegister()) {
|
||||||
$sInviteId=$this->GetInviteRegister();
|
$sInviteId=$this->GetInviteRegister();
|
||||||
} else {
|
} else {
|
||||||
$sInviteId=getRequest('invite_code');
|
$sInviteId=getRequestStr('invite_code');
|
||||||
}
|
}
|
||||||
$oInvate=$this->User_GetInviteByCode($sInviteId);
|
$oInvate=$this->User_GetInviteByCode($sInviteId);
|
||||||
if ($oInvate) {
|
if ($oInvate) {
|
||||||
|
|
|
@ -169,7 +169,7 @@ class ActionSearch extends Action {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function PrepareRequest(){
|
private function PrepareRequest(){
|
||||||
$aReq['q'] = getRequest('q');
|
$aReq['q'] = getRequestStr('q');
|
||||||
if (!func_check($aReq['q'],'text', 2, 255)) {
|
if (!func_check($aReq['q'],'text', 2, 255)) {
|
||||||
/**
|
/**
|
||||||
* Если запрос слишком короткий перенаправляем на начальную страницу поиска
|
* Если запрос слишком короткий перенаправляем на начальную страницу поиска
|
||||||
|
|
|
@ -360,8 +360,8 @@ class ActionSettings extends Action {
|
||||||
if (isPost('submit_settings_tuning')) {
|
if (isPost('submit_settings_tuning')) {
|
||||||
$this->Security_ValidateSendForm();
|
$this->Security_ValidateSendForm();
|
||||||
|
|
||||||
if (in_array(getRequest('settings_general_timezone'),$aTimezoneList)) {
|
if (in_array(getRequestStr('settings_general_timezone'),$aTimezoneList)) {
|
||||||
$this->oUserCurrent->setSettingsTimezone(getRequest('settings_general_timezone'));
|
$this->oUserCurrent->setSettingsTimezone(getRequestStr('settings_general_timezone'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->oUserCurrent->setSettingsNoticeNewTopic( getRequest('settings_notice_new_topic') ? 1 : 0 );
|
$this->oUserCurrent->setSettingsNoticeNewTopic( getRequest('settings_notice_new_topic') ? 1 : 0 );
|
||||||
|
@ -420,7 +420,7 @@ class ActionSettings extends Action {
|
||||||
/**
|
/**
|
||||||
* Емайл корректен?
|
* Емайл корректен?
|
||||||
*/
|
*/
|
||||||
if (!func_check(getRequest('invite_mail'),'mail')) {
|
if (!func_check(getRequestStr('invite_mail'),'mail')) {
|
||||||
$this->Message_AddError($this->Lang_Get('settings_invite_mail_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('settings_invite_mail_error'),$this->Lang_Get('error'));
|
||||||
$bError=true;
|
$bError=true;
|
||||||
}
|
}
|
||||||
|
@ -433,7 +433,7 @@ class ActionSettings extends Action {
|
||||||
*/
|
*/
|
||||||
if (!$bError) {
|
if (!$bError) {
|
||||||
$oInvite=$this->User_GenerateInvite($this->oUserCurrent);
|
$oInvite=$this->User_GenerateInvite($this->oUserCurrent);
|
||||||
$this->Notify_SendInvite($this->oUserCurrent,getRequest('invite_mail'),$oInvite);
|
$this->Notify_SendInvite($this->oUserCurrent,getRequestStr('invite_mail'),$oInvite);
|
||||||
$this->Message_AddNoticeSingle($this->Lang_Get('settings_invite_submit_ok'));
|
$this->Message_AddNoticeSingle($this->Lang_Get('settings_invite_submit_ok'));
|
||||||
$this->Hook_Run('settings_invate_send_after', array('oUser'=>$this->oUserCurrent));
|
$this->Hook_Run('settings_invate_send_after', array('oUser'=>$this->oUserCurrent));
|
||||||
}
|
}
|
||||||
|
@ -461,8 +461,8 @@ class ActionSettings extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверка мыла
|
* Проверка мыла
|
||||||
*/
|
*/
|
||||||
if (func_check(getRequest('mail'),'mail')) {
|
if (func_check(getRequestStr('mail'),'mail')) {
|
||||||
if ($oUserMail=$this->User_GetUserByMail(getRequest('mail')) and $oUserMail->getId()!=$this->oUserCurrent->getId()) {
|
if ($oUserMail=$this->User_GetUserByMail(getRequestStr('mail')) and $oUserMail->getId()!=$this->oUserCurrent->getId()) {
|
||||||
$this->Message_AddError($this->Lang_Get('settings_profile_mail_error_used'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('settings_profile_mail_error_used'),$this->Lang_Get('error'));
|
||||||
$bError=true;
|
$bError=true;
|
||||||
}
|
}
|
||||||
|
@ -473,11 +473,11 @@ class ActionSettings extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверка на смену пароля
|
* Проверка на смену пароля
|
||||||
*/
|
*/
|
||||||
if (getRequest('password','')!='') {
|
if (getRequestStr('password','')!='') {
|
||||||
if (func_check(getRequest('password'),'password',5)) {
|
if (func_check(getRequestStr('password'),'password',5)) {
|
||||||
if (getRequest('password')==getRequest('password_confirm')) {
|
if (getRequestStr('password')==getRequestStr('password_confirm')) {
|
||||||
if (func_encrypt(getRequest('password_now'))==$this->oUserCurrent->getPassword()) {
|
if (func_encrypt(getRequestStr('password_now'))==$this->oUserCurrent->getPassword()) {
|
||||||
$this->oUserCurrent->setPassword(func_encrypt(getRequest('password')));
|
$this->oUserCurrent->setPassword(func_encrypt(getRequestStr('password')));
|
||||||
} else {
|
} else {
|
||||||
$bError=true;
|
$bError=true;
|
||||||
$this->Message_AddError($this->Lang_Get('settings_profile_password_current_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('settings_profile_password_current_error'),$this->Lang_Get('error'));
|
||||||
|
@ -508,8 +508,8 @@ class ActionSettings extends Action {
|
||||||
/**
|
/**
|
||||||
* Подтверждение смены емайла
|
* Подтверждение смены емайла
|
||||||
*/
|
*/
|
||||||
if (getRequest('mail') and getRequest('mail')!=$this->oUserCurrent->getMail()) {
|
if (getRequestStr('mail') and getRequestStr('mail')!=$this->oUserCurrent->getMail()) {
|
||||||
if ($oChangemail=$this->User_MakeUserChangemail($this->oUserCurrent,getRequest('mail'))) {
|
if ($oChangemail=$this->User_MakeUserChangemail($this->oUserCurrent,getRequestStr('mail'))) {
|
||||||
if ($oChangemail->getMailFrom()) {
|
if ($oChangemail->getMailFrom()) {
|
||||||
$this->Message_AddNotice($this->Lang_Get('settings_profile_mail_change_from_notice'));
|
$this->Message_AddNotice($this->Lang_Get('settings_profile_mail_change_from_notice'));
|
||||||
} else {
|
} else {
|
||||||
|
@ -556,43 +556,43 @@ class ActionSettings extends Action {
|
||||||
* Определяем гео-объект
|
* Определяем гео-объект
|
||||||
*/
|
*/
|
||||||
if (getRequest('geo_city')) {
|
if (getRequest('geo_city')) {
|
||||||
$oGeoObject=$this->Geo_GetGeoObject('city',getRequest('geo_city'));
|
$oGeoObject=$this->Geo_GetGeoObject('city',getRequestStr('geo_city'));
|
||||||
} elseif (getRequest('geo_region')) {
|
} elseif (getRequest('geo_region')) {
|
||||||
$oGeoObject=$this->Geo_GetGeoObject('region',getRequest('geo_region'));
|
$oGeoObject=$this->Geo_GetGeoObject('region',getRequestStr('geo_region'));
|
||||||
} elseif (getRequest('geo_country')) {
|
} elseif (getRequest('geo_country')) {
|
||||||
$oGeoObject=$this->Geo_GetGeoObject('country',getRequest('geo_country'));
|
$oGeoObject=$this->Geo_GetGeoObject('country',getRequestStr('geo_country'));
|
||||||
} else {
|
} else {
|
||||||
$oGeoObject=null;
|
$oGeoObject=null;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Проверяем имя
|
* Проверяем имя
|
||||||
*/
|
*/
|
||||||
if (func_check(getRequest('profile_name'),'text',2,Config::Get('module.user.name_max'))) {
|
if (func_check(getRequestStr('profile_name'),'text',2,Config::Get('module.user.name_max'))) {
|
||||||
$this->oUserCurrent->setProfileName(getRequest('profile_name'));
|
$this->oUserCurrent->setProfileName(getRequestStr('profile_name'));
|
||||||
} else {
|
} else {
|
||||||
$this->oUserCurrent->setProfileName(null);
|
$this->oUserCurrent->setProfileName(null);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Проверяем пол
|
* Проверяем пол
|
||||||
*/
|
*/
|
||||||
if (in_array(getRequest('profile_sex'),array('man','woman','other'))) {
|
if (in_array(getRequestStr('profile_sex'),array('man','woman','other'))) {
|
||||||
$this->oUserCurrent->setProfileSex(getRequest('profile_sex'));
|
$this->oUserCurrent->setProfileSex(getRequestStr('profile_sex'));
|
||||||
} else {
|
} else {
|
||||||
$this->oUserCurrent->setProfileSex('other');
|
$this->oUserCurrent->setProfileSex('other');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Проверяем дату рождения
|
* Проверяем дату рождения
|
||||||
*/
|
*/
|
||||||
if (func_check(getRequest('profile_birthday_day'),'id',1,2) and func_check(getRequest('profile_birthday_month'),'id',1,2) and func_check(getRequest('profile_birthday_year'),'id',4,4)) {
|
if (func_check(getRequestStr('profile_birthday_day'),'id',1,2) and func_check(getRequestStr('profile_birthday_month'),'id',1,2) and func_check(getRequestStr('profile_birthday_year'),'id',4,4)) {
|
||||||
$this->oUserCurrent->setProfileBirthday(date("Y-m-d H:i:s",mktime(0,0,0,getRequest('profile_birthday_month'),getRequest('profile_birthday_day'),getRequest('profile_birthday_year'))));
|
$this->oUserCurrent->setProfileBirthday(date("Y-m-d H:i:s",mktime(0,0,0,getRequestStr('profile_birthday_month'),getRequestStr('profile_birthday_day'),getRequestStr('profile_birthday_year'))));
|
||||||
} else {
|
} else {
|
||||||
$this->oUserCurrent->setProfileBirthday(null);
|
$this->oUserCurrent->setProfileBirthday(null);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Проверяем информацию о себе
|
* Проверяем информацию о себе
|
||||||
*/
|
*/
|
||||||
if (func_check(getRequest('profile_about'),'text',1,3000)) {
|
if (func_check(getRequestStr('profile_about'),'text',1,3000)) {
|
||||||
$this->oUserCurrent->setProfileAbout($this->Text_Parser(getRequest('profile_about')));
|
$this->oUserCurrent->setProfileAbout($this->Text_Parser(getRequestStr('profile_about')));
|
||||||
} else {
|
} else {
|
||||||
$this->oUserCurrent->setProfileAbout(null);
|
$this->oUserCurrent->setProfileAbout(null);
|
||||||
}
|
}
|
||||||
|
@ -644,7 +644,7 @@ class ActionSettings extends Action {
|
||||||
$aData = array();
|
$aData = array();
|
||||||
foreach ($aFields as $iId => $aField) {
|
foreach ($aFields as $iId => $aField) {
|
||||||
if (isset($_REQUEST['profile_user_field_'.$iId])) {
|
if (isset($_REQUEST['profile_user_field_'.$iId])) {
|
||||||
$aData[$iId] = (string)getRequest('profile_user_field_'.$iId);
|
$aData[$iId] = getRequestStr('profile_user_field_'.$iId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->User_setUserFieldsValues($this->oUserCurrent->getId(), $aData);
|
$this->User_setUserFieldsValues($this->oUserCurrent->getId(), $aData);
|
||||||
|
@ -661,6 +661,7 @@ class ActionSettings extends Action {
|
||||||
$aFieldsContactValue=getRequest('profile_user_field_value');
|
$aFieldsContactValue=getRequest('profile_user_field_value');
|
||||||
if (is_array($aFieldsContactType)) {
|
if (is_array($aFieldsContactType)) {
|
||||||
foreach($aFieldsContactType as $k=>$v) {
|
foreach($aFieldsContactType as $k=>$v) {
|
||||||
|
$v=(string)$v;
|
||||||
if (isset($aFields[$v]) and isset($aFieldsContactValue[$k]) and is_string($aFieldsContactValue[$k])) {
|
if (isset($aFields[$v]) and isset($aFieldsContactValue[$k]) and is_string($aFieldsContactValue[$k])) {
|
||||||
$this->User_setUserFieldsValues($this->oUserCurrent->getId(), array($v=>$aFieldsContactValue[$k]), Config::Get('module.user.userfield_max_identical'));
|
$this->User_setUserFieldsValues($this->oUserCurrent->getId(), array($v=>$aFieldsContactValue[$k]), Config::Get('module.user.userfield_max_identical'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ class ActionStream extends Action {
|
||||||
/**
|
/**
|
||||||
* Активируем/деактивируем тип
|
* Активируем/деактивируем тип
|
||||||
*/
|
*/
|
||||||
$this->Stream_switchUserEventType($this->oUserCurrent->getId(), getRequest('type'));
|
$this->Stream_switchUserEventType($this->oUserCurrent->getId(), getRequestStr('type'));
|
||||||
$this->Message_AddNotice($this->Lang_Get('stream_subscribes_updated'), $this->Lang_Get('attention'));
|
$this->Message_AddNotice($this->Lang_Get('stream_subscribes_updated'), $this->Lang_Get('attention'));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -157,7 +157,7 @@ class ActionStream extends Action {
|
||||||
/**
|
/**
|
||||||
* Необходимо передать последний просмотренный ID событий
|
* Необходимо передать последний просмотренный ID событий
|
||||||
*/
|
*/
|
||||||
$iFromId = getRequest('last_id');
|
$iFromId = getRequestStr('last_id');
|
||||||
if (!$iFromId) {
|
if (!$iFromId) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
@ -169,7 +169,7 @@ class ActionStream extends Action {
|
||||||
|
|
||||||
$oViewer=$this->Viewer_GetLocalViewer();
|
$oViewer=$this->Viewer_GetLocalViewer();
|
||||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||||
$oViewer->Assign('sDateLast', getRequest('date_last'));
|
$oViewer->Assign('sDateLast', getRequestStr('date_last'));
|
||||||
if (count($aEvents)) {
|
if (count($aEvents)) {
|
||||||
$oEvenLast=end($aEvents);
|
$oEvenLast=end($aEvents);
|
||||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||||
|
@ -198,7 +198,7 @@ class ActionStream extends Action {
|
||||||
/**
|
/**
|
||||||
* Необходимо передать последний просмотренный ID событий
|
* Необходимо передать последний просмотренный ID событий
|
||||||
*/
|
*/
|
||||||
$iFromId = getRequest('last_id');
|
$iFromId = getRequestStr('last_id');
|
||||||
if (!$iFromId) {
|
if (!$iFromId) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
@ -210,7 +210,7 @@ class ActionStream extends Action {
|
||||||
|
|
||||||
$oViewer=$this->Viewer_GetLocalViewer();
|
$oViewer=$this->Viewer_GetLocalViewer();
|
||||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||||
$oViewer->Assign('sDateLast', getRequest('date_last'));
|
$oViewer->Assign('sDateLast', getRequestStr('date_last'));
|
||||||
if (count($aEvents)) {
|
if (count($aEvents)) {
|
||||||
$oEvenLast=end($aEvents);
|
$oEvenLast=end($aEvents);
|
||||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||||
|
@ -239,12 +239,12 @@ class ActionStream extends Action {
|
||||||
/**
|
/**
|
||||||
* Необходимо передать последний просмотренный ID событий
|
* Необходимо передать последний просмотренный ID событий
|
||||||
*/
|
*/
|
||||||
$iFromId = getRequest('last_id');
|
$iFromId = getRequestStr('last_id');
|
||||||
if (!$iFromId) {
|
if (!$iFromId) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!($oUser=$this->User_GetUserById(getRequest('user_id')))) {
|
if (!($oUser=$this->User_GetUserById(getRequestStr('user_id')))) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,7 @@ class ActionStream extends Action {
|
||||||
|
|
||||||
$oViewer=$this->Viewer_GetLocalViewer();
|
$oViewer=$this->Viewer_GetLocalViewer();
|
||||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||||
$oViewer->Assign('sDateLast', getRequest('date_last'));
|
$oViewer->Assign('sDateLast', getRequestStr('date_last'));
|
||||||
if (count($aEvents)) {
|
if (count($aEvents)) {
|
||||||
$oEvenLast=end($aEvents);
|
$oEvenLast=end($aEvents);
|
||||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||||
|
@ -284,17 +284,17 @@ class ActionStream extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем существование пользователя
|
* Проверяем существование пользователя
|
||||||
*/
|
*/
|
||||||
if (!$this->User_getUserById(getRequest('id'))) {
|
if (!$this->User_getUserById(getRequestStr('id'))) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
}
|
}
|
||||||
if ($this->oUserCurrent->getId() == getRequest('id')) {
|
if ($this->oUserCurrent->getId() == getRequestStr('id')) {
|
||||||
$this->Message_AddError($this->Lang_Get('stream_error_subscribe_to_yourself'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('stream_error_subscribe_to_yourself'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Подписываем на пользователя
|
* Подписываем на пользователя
|
||||||
*/
|
*/
|
||||||
$this->Stream_subscribeUser($this->oUserCurrent->getId(), getRequest('id'));
|
$this->Stream_subscribeUser($this->oUserCurrent->getId(), getRequestStr('id'));
|
||||||
$this->Message_AddNotice($this->Lang_Get('stream_subscribes_updated'), $this->Lang_Get('attention'));
|
$this->Message_AddNotice($this->Lang_Get('stream_subscribes_updated'), $this->Lang_Get('attention'));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -319,9 +319,9 @@ class ActionStream extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем существование пользователя
|
* Проверяем существование пользователя
|
||||||
*/
|
*/
|
||||||
$oUser = $this->User_getUserByLogin(getRequest('login'));
|
$oUser = $this->User_getUserByLogin(getRequestStr('login'));
|
||||||
if (!$oUser) {
|
if (!$oUser) {
|
||||||
$this->Message_AddError($this->Lang_Get('user_not_found',array('login'=>htmlspecialchars(getRequest('login')))),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('user_not_found',array('login'=>htmlspecialchars(getRequestStr('login')))),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->oUserCurrent->getId() == $oUser->getId()) {
|
if ($this->oUserCurrent->getId() == $oUser->getId()) {
|
||||||
|
@ -356,13 +356,13 @@ class ActionStream extends Action {
|
||||||
/**
|
/**
|
||||||
* Пользователь с таким ID существует?
|
* Пользователь с таким ID существует?
|
||||||
*/
|
*/
|
||||||
if (!$this->User_getUserById(getRequest('id'))) {
|
if (!$this->User_getUserById(getRequestStr('id'))) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Отписываем
|
* Отписываем
|
||||||
*/
|
*/
|
||||||
$this->Stream_unsubscribeUser($this->oUserCurrent->getId(), getRequest('id'));
|
$this->Stream_unsubscribeUser($this->oUserCurrent->getId(), getRequestStr('id'));
|
||||||
$this->Message_AddNotice($this->Lang_Get('stream_subscribes_updated'), $this->Lang_Get('attention'));
|
$this->Message_AddNotice($this->Lang_Get('stream_subscribes_updated'), $this->Lang_Get('attention'));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -88,7 +88,7 @@ class ActionSubscribe extends Action {
|
||||||
/**
|
/**
|
||||||
* Получаем емайл подписки и проверяем его на валидность
|
* Получаем емайл подписки и проверяем его на валидность
|
||||||
*/
|
*/
|
||||||
$sMail=getRequest('mail');
|
$sMail=getRequestStr('mail');
|
||||||
if ($this->oUserCurrent) {
|
if ($this->oUserCurrent) {
|
||||||
$sMail=$this->oUserCurrent->getMail();
|
$sMail=$this->oUserCurrent->getMail();
|
||||||
}
|
}
|
||||||
|
@ -99,12 +99,12 @@ class ActionSubscribe extends Action {
|
||||||
/**
|
/**
|
||||||
* Получаем тип объекта подписки
|
* Получаем тип объекта подписки
|
||||||
*/
|
*/
|
||||||
$sTargetType=getRequest('target_type');
|
$sTargetType=getRequestStr('target_type');
|
||||||
if (!$this->Subscribe_IsAllowTargetType($sTargetType)) {
|
if (!$this->Subscribe_IsAllowTargetType($sTargetType)) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
$sTargetId=getRequest('target_id') ? getRequest('target_id') : null;
|
$sTargetId=getRequestStr('target_id') ? getRequestStr('target_id') : null;
|
||||||
$iValue=getRequest('value') ? 1 : 0;
|
$iValue=getRequest('value') ? 1 : 0;
|
||||||
|
|
||||||
$oSubscribe=null;
|
$oSubscribe=null;
|
||||||
|
|
|
@ -216,7 +216,7 @@ class ActionTalk extends Action {
|
||||||
/**
|
/**
|
||||||
* Дата старта поиска
|
* Дата старта поиска
|
||||||
*/
|
*/
|
||||||
if($start=getRequest('start')) {
|
if($start=getRequestStr('start')) {
|
||||||
if(func_check($start,'text',6,10) && substr_count($start,'.')==2) {
|
if(func_check($start,'text',6,10) && substr_count($start,'.')==2) {
|
||||||
list($d,$m,$y)=explode('.',$start);
|
list($d,$m,$y)=explode('.',$start);
|
||||||
if(@checkdate($m,$d,$y)) {
|
if(@checkdate($m,$d,$y)) {
|
||||||
|
@ -239,7 +239,7 @@ class ActionTalk extends Action {
|
||||||
/**
|
/**
|
||||||
* Дата окончания поиска
|
* Дата окончания поиска
|
||||||
*/
|
*/
|
||||||
if($end=getRequest('end')) {
|
if($end=getRequestStr('end')) {
|
||||||
if(func_check($end,'text',6,10) && substr_count($end,'.')==2) {
|
if(func_check($end,'text',6,10) && substr_count($end,'.')==2) {
|
||||||
list($d,$m,$y)=explode('.',$end);
|
list($d,$m,$y)=explode('.',$end);
|
||||||
if(@checkdate($m,$d,$y)) {
|
if(@checkdate($m,$d,$y)) {
|
||||||
|
@ -377,7 +377,7 @@ class ActionTalk extends Action {
|
||||||
/**
|
/**
|
||||||
* Отправляем письмо
|
* Отправляем письмо
|
||||||
*/
|
*/
|
||||||
if ($oTalk=$this->Talk_SendTalk($this->Text_Parser(strip_tags(getRequest('talk_title'))),$this->Text_Parser(getRequest('talk_text')),$this->oUserCurrent,$this->aUsersId)) {
|
if ($oTalk=$this->Talk_SendTalk($this->Text_Parser(strip_tags(getRequestStr('talk_title'))),$this->Text_Parser(getRequestStr('talk_text')),$this->oUserCurrent,$this->aUsersId)) {
|
||||||
Router::Location(Router::GetPath('talk').'read/'.$oTalk->getId().'/');
|
Router::Location(Router::GetPath('talk').'read/'.$oTalk->getId().'/');
|
||||||
} else {
|
} else {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'));
|
||||||
|
@ -463,14 +463,14 @@ class ActionTalk extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем есть ли заголовок
|
* Проверяем есть ли заголовок
|
||||||
*/
|
*/
|
||||||
if (!func_check(getRequest('talk_title'),'text',2,200)) {
|
if (!func_check(getRequestStr('talk_title'),'text',2,200)) {
|
||||||
$this->Message_AddError($this->Lang_Get('talk_create_title_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('talk_create_title_error'),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Проверяем есть ли содержание топика
|
* Проверяем есть ли содержание топика
|
||||||
*/
|
*/
|
||||||
if (!func_check(getRequest('talk_text'),'text',2,3000)) {
|
if (!func_check(getRequestStr('talk_text'),'text',2,3000)) {
|
||||||
$this->Message_AddError($this->Lang_Get('talk_create_text_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('talk_create_text_error'),$this->Lang_Get('error'));
|
||||||
$bOk=false;
|
$bOk=false;
|
||||||
}
|
}
|
||||||
|
@ -537,7 +537,7 @@ class ActionTalk extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$idCommentLast=getRequest('idCommentLast');
|
$idCommentLast=getRequestStr('idCommentLast');
|
||||||
/**
|
/**
|
||||||
* Проверям авторизован ли пользователь
|
* Проверям авторизован ли пользователь
|
||||||
*/
|
*/
|
||||||
|
@ -548,7 +548,7 @@ class ActionTalk extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем разговор
|
* Проверяем разговор
|
||||||
*/
|
*/
|
||||||
if (!($oTalk=$this->Talk_GetTalkById(getRequest('idTarget')))) {
|
if (!($oTalk=$this->Talk_GetTalkById(getRequestStr('idTarget')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -611,7 +611,7 @@ class ActionTalk extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем разговор
|
* Проверяем разговор
|
||||||
*/
|
*/
|
||||||
if (!($oTalk=$this->Talk_GetTalkById(getRequest('cmt_target_id')))) {
|
if (!($oTalk=$this->Talk_GetTalkById(getRequestStr('cmt_target_id')))) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -629,7 +629,7 @@ class ActionTalk extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем текст комментария
|
* Проверяем текст комментария
|
||||||
*/
|
*/
|
||||||
$sText=$this->Text_Parser(getRequest('comment_text'));
|
$sText=$this->Text_Parser(getRequestStr('comment_text'));
|
||||||
if (!func_check($sText,'text',2,3000)) {
|
if (!func_check($sText,'text',2,3000)) {
|
||||||
$this->Message_AddErrorSingle($this->Lang_Get('talk_comment_add_text_error'),$this->Lang_Get('error'));
|
$this->Message_AddErrorSingle($this->Lang_Get('talk_comment_add_text_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
@ -724,7 +724,7 @@ class ActionTalk extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$sUsers=(string)getRequest('users',null,'post');
|
$sUsers=getRequestStr('users',null,'post');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
@ -817,7 +817,7 @@ class ActionTalk extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$idTarget=(string)getRequest('idTarget',null,'post');
|
$idTarget=getRequestStr('idTarget',null,'post');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
@ -882,8 +882,8 @@ class ActionTalk extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$idTarget=(string)getRequest('idTarget',null,'post');
|
$idTarget=getRequestStr('idTarget',null,'post');
|
||||||
$idTalk=(string)getRequest('idTalk',null,'post');
|
$idTalk=getRequestStr('idTalk',null,'post');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
@ -960,8 +960,8 @@ class ActionTalk extends Action {
|
||||||
* Устанавливаем формат Ajax ответа
|
* Устанавливаем формат Ajax ответа
|
||||||
*/
|
*/
|
||||||
$this->Viewer_SetResponseAjax('json');
|
$this->Viewer_SetResponseAjax('json');
|
||||||
$sUsers=(string)getRequest('users',null,'post');
|
$sUsers=getRequestStr('users',null,'post');
|
||||||
$idTalk=(string)getRequest('idTalk',null,'post');
|
$idTalk=getRequestStr('idTalk',null,'post');
|
||||||
/**
|
/**
|
||||||
* Если пользователь не авторизирован, возвращаем ошибку
|
* Если пользователь не авторизирован, возвращаем ошибку
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -239,10 +239,10 @@ class ActionTopic extends Action {
|
||||||
/**
|
/**
|
||||||
* Заполняем поля для валидации
|
* Заполняем поля для валидации
|
||||||
*/
|
*/
|
||||||
$oTopic->setBlogId(getRequest('blog_id'));
|
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||||
$oTopic->setTextSource(getRequest('topic_text'));
|
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||||
$oTopic->setTags(getRequest('topic_tags'));
|
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||||
$oTopic->setType('topic');
|
$oTopic->setType('topic');
|
||||||
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
||||||
|
@ -373,10 +373,10 @@ class ActionTopic extends Action {
|
||||||
/**
|
/**
|
||||||
* Заполняем поля для валидации
|
* Заполняем поля для валидации
|
||||||
*/
|
*/
|
||||||
$oTopic->setBlogId(getRequest('blog_id'));
|
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||||
$oTopic->setTextSource(getRequest('topic_text'));
|
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||||
$oTopic->setTags(getRequest('topic_tags'));
|
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||||
$oTopic->setUserIp(func_getIp());
|
$oTopic->setUserIp(func_getIp());
|
||||||
/**
|
/**
|
||||||
* Проверка корректности полей формы
|
* Проверка корректности полей формы
|
||||||
|
|
|
@ -92,7 +92,7 @@ class ActionUserfeed extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем последний просмотренный ID топика
|
* Проверяем последний просмотренный ID топика
|
||||||
*/
|
*/
|
||||||
$iFromId = getRequest('last_id');
|
$iFromId = getRequestStr('last_id');
|
||||||
if (!$iFromId) {
|
if (!$iFromId) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
|
@ -132,7 +132,7 @@ class ActionUserfeed extends Action {
|
||||||
if (!getRequest('id')) {
|
if (!getRequest('id')) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
}
|
}
|
||||||
$sType = (string)getRequest('type');
|
$sType = getRequestStr('type');
|
||||||
$iType = null;
|
$iType = null;
|
||||||
/**
|
/**
|
||||||
* Определяем тип подписки
|
* Определяем тип подписки
|
||||||
|
@ -143,7 +143,7 @@ class ActionUserfeed extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем существование блога
|
* Проверяем существование блога
|
||||||
*/
|
*/
|
||||||
if (!$this->Blog_GetBlogById(getRequest('id'))) {
|
if (!$this->Blog_GetBlogById(getRequestStr('id'))) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -153,11 +153,11 @@ class ActionUserfeed extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем существование пользователя
|
* Проверяем существование пользователя
|
||||||
*/
|
*/
|
||||||
if (!$this->User_GetUserById(getRequest('id'))) {
|
if (!$this->User_GetUserById(getRequestStr('id'))) {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->oUserCurrent->getId() == getRequest('id')) {
|
if ($this->oUserCurrent->getId() == getRequestStr('id')) {
|
||||||
$this->Message_AddError($this->Lang_Get('userfeed_error_subscribe_to_yourself'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('userfeed_error_subscribe_to_yourself'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ class ActionUserfeed extends Action {
|
||||||
/**
|
/**
|
||||||
* Подписываем
|
* Подписываем
|
||||||
*/
|
*/
|
||||||
$this->Userfeed_subscribeUser($this->oUserCurrent->getId(), $iType, getRequest('id'));
|
$this->Userfeed_subscribeUser($this->oUserCurrent->getId(), $iType, getRequestStr('id'));
|
||||||
$this->Message_AddNotice($this->Lang_Get('userfeed_subscribes_updated'), $this->Lang_Get('attention'));
|
$this->Message_AddNotice($this->Lang_Get('userfeed_subscribes_updated'), $this->Lang_Get('attention'));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -191,9 +191,9 @@ class ActionUserfeed extends Action {
|
||||||
/**
|
/**
|
||||||
* Проверяем существование прользователя
|
* Проверяем существование прользователя
|
||||||
*/
|
*/
|
||||||
$oUser = $this->User_getUserByLogin(getRequest('login'));
|
$oUser = $this->User_getUserByLogin(getRequestStr('login'));
|
||||||
if (!$oUser) {
|
if (!$oUser) {
|
||||||
$this->Message_AddError($this->Lang_Get('user_not_found',array('login'=>htmlspecialchars(getRequest('login')))),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('user_not_found',array('login'=>htmlspecialchars(getRequestStr('login')))),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -231,7 +231,7 @@ class ActionUserfeed extends Action {
|
||||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$sType = (string)getRequest('type');
|
$sType = getRequestStr('type');
|
||||||
$iType = null;
|
$iType = null;
|
||||||
/**
|
/**
|
||||||
* Определяем от чего отписываемся
|
* Определяем от чего отписываемся
|
||||||
|
@ -250,7 +250,7 @@ class ActionUserfeed extends Action {
|
||||||
/**
|
/**
|
||||||
* Отписываем пользователя
|
* Отписываем пользователя
|
||||||
*/
|
*/
|
||||||
$this->Userfeed_unsubscribeUser($this->oUserCurrent->getId(), $iType, getRequest('id'));
|
$this->Userfeed_unsubscribeUser($this->oUserCurrent->getId(), $iType, getRequestStr('id'));
|
||||||
$this->Message_AddNotice($this->Lang_Get('userfeed_subscribes_updated'), $this->Lang_Get('attention'));
|
$this->Message_AddNotice($this->Lang_Get('userfeed_subscribes_updated'), $this->Lang_Get('attention'));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -418,7 +418,7 @@ class ModuleTalk extends Module {
|
||||||
$aTalkId=array($aTalkId);
|
$aTalkId=array($aTalkId);
|
||||||
}
|
}
|
||||||
foreach ($aTalkId as $sTalkId) {
|
foreach ($aTalkId as $sTalkId) {
|
||||||
if ($oTalk=$this->Talk_GetTalkById($sTalkId)) {
|
if ($oTalk=$this->Talk_GetTalkById((string)$sTalkId)) {
|
||||||
if ($oTalkUser=$this->Talk_GetTalkUser($oTalk->getId(),$iUserId)) {
|
if ($oTalkUser=$this->Talk_GetTalkUser($oTalk->getId(),$iUserId)) {
|
||||||
$oTalkUser->setDateLast(date("Y-m-d H:i:s"));
|
$oTalkUser->setDateLast(date("Y-m-d H:i:s"));
|
||||||
if ($oTalk->getCommentIdLast()) {
|
if ($oTalk->getCommentIdLast()) {
|
||||||
|
@ -447,7 +447,7 @@ class ModuleTalk extends Module {
|
||||||
$this->DeleteFavouriteTalk(
|
$this->DeleteFavouriteTalk(
|
||||||
Engine::GetEntity('Favourite',
|
Engine::GetEntity('Favourite',
|
||||||
array(
|
array(
|
||||||
'target_id' => $sTalkId,
|
'target_id' => (string)$sTalkId,
|
||||||
'target_type' => 'talk',
|
'target_type' => 'talk',
|
||||||
'user_id' => $sUserId
|
'user_id' => $sUserId
|
||||||
)
|
)
|
||||||
|
@ -456,6 +456,7 @@ class ModuleTalk extends Module {
|
||||||
}
|
}
|
||||||
// Нужно почистить зависимые кеши
|
// Нужно почистить зависимые кеши
|
||||||
foreach ($aTalkId as $sTalkId) {
|
foreach ($aTalkId as $sTalkId) {
|
||||||
|
$sTalkId=(string)$sTalkId;
|
||||||
$this->Cache_Clean(
|
$this->Cache_Clean(
|
||||||
Zend_Cache::CLEANING_MODE_MATCHING_TAG,
|
Zend_Cache::CLEANING_MODE_MATCHING_TAG,
|
||||||
array("update_talk_user_{$sTalkId}")
|
array("update_talk_user_{$sTalkId}")
|
||||||
|
@ -466,6 +467,7 @@ class ModuleTalk extends Module {
|
||||||
|
|
||||||
// Удаляем пустые беседы, если в них нет пользователей
|
// Удаляем пустые беседы, если в них нет пользователей
|
||||||
foreach ($aTalkId as $sTalkId) {
|
foreach ($aTalkId as $sTalkId) {
|
||||||
|
$sTalkId=(string)$sTalkId;
|
||||||
if (!count($this->GetUsersTalk($sTalkId, array(self::TALK_USER_ACTIVE)))) {
|
if (!count($this->GetUsersTalk($sTalkId, array(self::TALK_USER_ACTIVE)))) {
|
||||||
$this->DeleteTalk($sTalkId);
|
$this->DeleteTalk($sTalkId);
|
||||||
}
|
}
|
||||||
|
|
2
engine/console/.htaccess
Normal file
2
engine/console/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Order Deny,Allow
|
||||||
|
Deny from all
|
2
engine/include/.htaccess
Normal file
2
engine/include/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Order Deny,Allow
|
||||||
|
Deny from all
|
|
@ -102,6 +102,19 @@ function getRequest($sName,$default=null,$sType=null) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* функция доступа к GET POST параметрам, которая значение принудительно приводит к строке
|
||||||
|
*
|
||||||
|
* @param string $sName
|
||||||
|
* @param mixed $default
|
||||||
|
* @param string $sType
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function getRequestStr($sName,$default=null,$sType=null) {
|
||||||
|
return (string)getRequest($sName,$default,$sType);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Определяет был ли передан указанный параметр методом POST
|
* Определяет был ли передан указанный параметр методом POST
|
||||||
*
|
*
|
||||||
|
|
2
engine/lib/internal/ConfigSimple/.htaccess
Normal file
2
engine/lib/internal/ConfigSimple/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Order Deny,Allow
|
||||||
|
Deny from all
|
2
engine/lib/internal/ProfilerSimple/.htaccess
Normal file
2
engine/lib/internal/ProfilerSimple/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Order Deny,Allow
|
||||||
|
Deny from all
|
2
engine/modules/.htaccess
Normal file
2
engine/modules/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Order Deny,Allow
|
||||||
|
Deny from all
|
|
@ -354,6 +354,7 @@ class ModulePlugin extends Module {
|
||||||
|
|
||||||
$aActivePlugins=$this->GetActivePlugins();
|
$aActivePlugins=$this->GetActivePlugins();
|
||||||
foreach ($aPlugins as $sPluginCode) {
|
foreach ($aPlugins as $sPluginCode) {
|
||||||
|
if (!is_string($sPluginCode)) continue;
|
||||||
/**
|
/**
|
||||||
* Если плагин активен, деактивируем его
|
* Если плагин активен, деактивируем его
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue