mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 14:50:48 +03:00
Обновление до всех фиксов ядра из транковой версии
This commit is contained in:
parent
ff0be566c3
commit
479e97bea1
17
.htaccess
17
.htaccess
|
@ -8,8 +8,17 @@ RewriteRule ^(.*)$ ./index.php
|
|||
# Alternative rule
|
||||
#RewriteRule ^(.*)$ /index.php
|
||||
|
||||
<Files "plugins.dat">
|
||||
order allow,deny
|
||||
deny from all
|
||||
</Files>
|
||||
|
||||
# Deny access
|
||||
<Files "plugins.dat">
|
||||
order allow,deny
|
||||
deny from all
|
||||
</Files>
|
||||
<Files "plugin.xml">
|
||||
order allow,deny
|
||||
deny from all
|
||||
</Files>
|
||||
<Files ~ "\.tpl$">
|
||||
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);
|
||||
}
|
||||
/**
|
||||
|
@ -171,7 +171,7 @@ class ActionAdmin extends Action {
|
|||
*/
|
||||
protected function EventUserFields()
|
||||
{
|
||||
switch(getRequest('action')) {
|
||||
switch(getRequestStr('action')) {
|
||||
/**
|
||||
* Создание нового поля
|
||||
*/
|
||||
|
@ -184,11 +184,11 @@ class ActionAdmin extends Action {
|
|||
return;
|
||||
}
|
||||
$oField = Engine::GetEntity('User_Field');
|
||||
$oField->setName(getRequest('name'));
|
||||
$oField->setTitle(getRequest('title'));
|
||||
$oField->setPattern(getRequest('pattern'));
|
||||
if (in_array(getRequest('type'),$this->User_GetUserFieldTypes())) {
|
||||
$oField->setType(getRequest('type'));
|
||||
$oField->setName(getRequestStr('name'));
|
||||
$oField->setTitle(getRequestStr('title'));
|
||||
$oField->setPattern(getRequestStr('pattern'));
|
||||
if (in_array(getRequestStr('type'),$this->User_GetUserFieldTypes())) {
|
||||
$oField->setType(getRequestStr('type'));
|
||||
} else {
|
||||
$oField->setType('');
|
||||
}
|
||||
|
@ -214,11 +214,11 @@ class ActionAdmin extends Action {
|
|||
* Обрабатываем как ajax запрос (json)
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
if (!getRequest('id')) {
|
||||
if (!getRequestStr('id')) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
}
|
||||
$this->User_deleteUserField(getRequest('id'));
|
||||
$this->User_deleteUserField(getRequestStr('id'));
|
||||
$this->Message_AddNotice($this->Lang_Get('user_field_deleted'),$this->Lang_Get('attention'));
|
||||
break;
|
||||
/**
|
||||
|
@ -229,11 +229,11 @@ class ActionAdmin extends Action {
|
|||
* Обрабатываем как ajax запрос (json)
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
if (!getRequest('id')) {
|
||||
if (!getRequestStr('id')) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
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'));
|
||||
return false;
|
||||
}
|
||||
|
@ -241,12 +241,12 @@ class ActionAdmin extends Action {
|
|||
return;
|
||||
}
|
||||
$oField = Engine::GetEntity('User_Field');
|
||||
$oField->setId(getRequest('id'));
|
||||
$oField->setName(getRequest('name'));
|
||||
$oField->setTitle(getRequest('title'));
|
||||
$oField->setPattern(getRequest('pattern'));
|
||||
if (in_array(getRequest('type'),$this->User_GetUserFieldTypes())) {
|
||||
$oField->setType(getRequest('type'));
|
||||
$oField->setId(getRequestStr('id'));
|
||||
$oField->setName(getRequestStr('name'));
|
||||
$oField->setTitle(getRequestStr('title'));
|
||||
$oField->setPattern(getRequestStr('pattern'));
|
||||
if (in_array(getRequestStr('type'),$this->User_GetUserFieldTypes())) {
|
||||
$oField->setType(getRequestStr('type'));
|
||||
} else {
|
||||
$oField->setType('');
|
||||
}
|
||||
|
@ -280,18 +280,18 @@ class ActionAdmin extends Action {
|
|||
*/
|
||||
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'));
|
||||
return false;
|
||||
}
|
||||
if (!getRequest('name')) {
|
||||
if (!getRequestStr('name')) {
|
||||
$this->Message_AddError($this->Lang_Get('user_field_error_add_no_name'),$this->Lang_Get('error'));
|
||||
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'));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ class ActionAjax extends Action {
|
|||
* Получение списка регионов по стране
|
||||
*/
|
||||
protected function EventGeoGetRegions() {
|
||||
$iCountryId=getRequest('country');
|
||||
$iCountryId=getRequestStr('country');
|
||||
$iLimit=200;
|
||||
if (is_numeric(getRequest('limit')) and getRequest('limit')>0) {
|
||||
$iLimit=getRequest('limit');
|
||||
|
@ -156,7 +156,7 @@ class ActionAjax extends Action {
|
|||
* Получение списка городов по региону
|
||||
*/
|
||||
protected function EventGeoGetCities() {
|
||||
$iRegionId=getRequest('region');
|
||||
$iRegionId=getRequestStr('region');
|
||||
$iLimit=500;
|
||||
if (is_numeric(getRequest('limit')) and getRequest('limit')>0) {
|
||||
$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'));
|
||||
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'))) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('comment_vote_error_value'),$this->Lang_Get('attention'));
|
||||
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'));
|
||||
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'))) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('attention'));
|
||||
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'));
|
||||
return;
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ class ActionAjax extends Action {
|
|||
*/
|
||||
switch($this->ACL_CanVoteBlog($this->oUserCurrent,$oBlog)) {
|
||||
case ModuleACL::CAN_VOTE_BLOG_TRUE:
|
||||
$iValue=getRequest('value',null,'post');
|
||||
$iValue=getRequestStr('value',null,'post');
|
||||
if (in_array($iValue,array('1','-1'))) {
|
||||
$oBlogVote=Engine::GetEntity('Vote');
|
||||
$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'));
|
||||
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'))) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('attention'));
|
||||
return;
|
||||
|
@ -525,8 +525,8 @@ class ActionAjax extends Action {
|
|||
/**
|
||||
* Параметры голосования
|
||||
*/
|
||||
$idAnswer=getRequest('idAnswer',null,'post');
|
||||
$idTopic=getRequest('idTopic',null,'post');
|
||||
$idAnswer=getRequestStr('idAnswer',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();
|
||||
$aTagsNewLow=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'))) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
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'));
|
||||
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'))) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
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'));
|
||||
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'))) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
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'));
|
||||
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'));
|
||||
return;
|
||||
}
|
||||
|
@ -975,9 +975,9 @@ class ActionAjax extends Action {
|
|||
$oTopic=Engine::GetEntity('ModuleTopic_EntityTopic');
|
||||
$oTopic->_setValidateScenario($sType); // зависит от типа топика
|
||||
|
||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
||||
$oTopic->setTextSource(getRequest('topic_text'));
|
||||
$oTopic->setTags(getRequest('topic_tags'));
|
||||
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||
$oTopic->setType($sType);
|
||||
|
@ -992,16 +992,10 @@ class ActionAjax extends Action {
|
|||
/**
|
||||
* Формируем текст топика
|
||||
*/
|
||||
if (in_array($sType,array('link','question'))) {
|
||||
$oTopic->setCutText(null);
|
||||
$oTopic->setText(htmlspecialchars($oTopic->getTextSource()));
|
||||
$oTopic->setTextShort(htmlspecialchars($oTopic->getTextSource()));
|
||||
} else {
|
||||
list($sTextShort,$sTextNew,$sTextCut) = $this->Text_Cut($oTopic->getTextSource());
|
||||
$oTopic->setCutText($sTextCut);
|
||||
$oTopic->setText($this->Text_Parser($sTextNew));
|
||||
$oTopic->setTextShort($this->Text_Parser($sTextShort));
|
||||
}
|
||||
list($sTextShort,$sTextNew,$sTextCut) = $this->Text_Cut($oTopic->getTextSource());
|
||||
$oTopic->setCutText($sTextCut);
|
||||
$oTopic->setText($this->Text_Parser($sTextNew));
|
||||
$oTopic->setTextShort($this->Text_Parser($sTextShort));
|
||||
/**
|
||||
* Рендерим шаблон для предпросмотра топика
|
||||
*/
|
||||
|
@ -1023,7 +1017,7 @@ class ActionAjax extends Action {
|
|||
*
|
||||
*/
|
||||
protected function EventPreviewText() {
|
||||
$sText=(string)getRequest('text',null,'post');
|
||||
$sText=getRequestStr('text',null,'post');
|
||||
$bSave=getRequest('save',null,'post');
|
||||
/**
|
||||
* Экранировать или нет HTML теги
|
||||
|
@ -1163,7 +1157,7 @@ class ActionAjax extends Action {
|
|||
/**
|
||||
* Комментарий существует?
|
||||
*/
|
||||
$idComment=getRequest('idComment',null,'post');
|
||||
$idComment=getRequestStr('idComment',null,'post');
|
||||
if (!($oComment=$this->Comment_GetCommentById($idComment))) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
|
|
|
@ -198,16 +198,16 @@ class ActionBlog extends Action {
|
|||
*/
|
||||
$oBlog=Engine::GetEntity('Blog');
|
||||
$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->setType(getRequest('blog_type'));
|
||||
$oBlog->setType(getRequestStr('blog_type'));
|
||||
$oBlog->setDateAdd(date("Y-m-d H:i:s"));
|
||||
$oBlog->setLimitRatingTopic(getRequest('blog_limit_rating_topic'));
|
||||
$oBlog->setUrl((string)getRequest('blog_url'));
|
||||
$oBlog->setLimitRatingTopic(getRequestStr('blog_limit_rating_topic'));
|
||||
$oBlog->setUrl(getRequestStr('blog_url'));
|
||||
$oBlog->setAvatar(null);
|
||||
/**
|
||||
* Загрузка аватара, делаем ресайзы
|
||||
|
@ -299,23 +299,23 @@ class ActionBlog extends Action {
|
|||
if (!$this->checkBlogFields($oBlog)) {
|
||||
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);
|
||||
/**
|
||||
* Сбрасываем кеш, если поменяли тип блога
|
||||
* Нужна доработка, т.к. в этом блоге могут быть топики других юзеров
|
||||
*/
|
||||
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()}"));
|
||||
}
|
||||
$oBlog->setType(getRequest('blog_type'));
|
||||
$oBlog->setLimitRatingTopic(getRequest('blog_limit_rating_topic'));
|
||||
$oBlog->setType(getRequestStr('blog_type'));
|
||||
$oBlog->setLimitRatingTopic(getRequestStr('blog_limit_rating_topic'));
|
||||
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();
|
||||
}
|
||||
foreach ($aUserRank as $sUserId => $sRank) {
|
||||
$sRank=(string)$sRank;
|
||||
if (!($oBlogUser=$this->Blog_GetBlogUserByBlogIdAndUserId($oBlog->getId(),$sUserId))) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
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'));
|
||||
$bOk=false;
|
||||
} else {
|
||||
/**
|
||||
* Проверяем есть ли уже блог с таким названием
|
||||
*/
|
||||
if ($oBlogExists=$this->Blog_GetBlogByTitle(getRequest('blog_title'))) {
|
||||
if ($oBlogExists=$this->Blog_GetBlogByTitle(getRequestStr('blog_title'))) {
|
||||
if (!$oBlog or $oBlog->getId()!=$oBlogExists->getId()) {
|
||||
$this->Message_AddError($this->Lang_Get('blog_create_title_error_unique'),$this->Lang_Get('error'));
|
||||
$bOk=false;
|
||||
|
@ -517,9 +518,9 @@ class ActionBlog extends Action {
|
|||
* Проверяем есть ли URL блога, с заменой всех пробельных символов на "_"
|
||||
*/
|
||||
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;
|
||||
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'));
|
||||
$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'));
|
||||
$bOk=false;
|
||||
}
|
||||
/**
|
||||
* Проверяем есть ли уже блог с таким 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()) {
|
||||
$this->Message_AddError($this->Lang_Get('blog_create_url_error_unique'),$this->Lang_Get('error'));
|
||||
$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'));
|
||||
$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'));
|
||||
$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'));
|
||||
$bOk=false;
|
||||
}
|
||||
|
@ -573,8 +574,8 @@ class ActionBlog extends Action {
|
|||
*/
|
||||
protected function EventTopics() {
|
||||
$sPeriod=1; // по дефолту 1 день
|
||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequest('period');
|
||||
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequestStr('period');
|
||||
}
|
||||
$sShowType=$this->sCurrentEvent;
|
||||
if (!in_array($sShowType,array('discussed','top'))) {
|
||||
|
@ -738,6 +739,7 @@ class ActionBlog extends Action {
|
|||
$sTextSeo=strip_tags($oTopic->getText());
|
||||
$this->Viewer_SetHtmlDescription(func_text_words($sTextSeo, Config::Get('seo.description_words_count')));
|
||||
$this->Viewer_SetHtmlKeywords($oTopic->getTags());
|
||||
$this->Viewer_SetHtmlCanonical($oTopic->getUrl());
|
||||
/**
|
||||
* Вызов хуков
|
||||
*/
|
||||
|
@ -812,8 +814,8 @@ class ActionBlog extends Action {
|
|||
*/
|
||||
protected function EventShowBlog() {
|
||||
$sPeriod=1; // по дефолту 1 день
|
||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequest('period');
|
||||
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequestStr('period');
|
||||
}
|
||||
$sBlogUrl=$this->sCurrentEvent;
|
||||
$sShowType=in_array($this->GetParamEventMatch(0,0),array('bad','new','newall','discussed','top')) ? $this->GetParamEventMatch(0,0) : 'good';
|
||||
|
@ -959,7 +961,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'));
|
||||
return;
|
||||
}
|
||||
|
@ -994,7 +996,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)) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('topic_comment_add_text_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
|
@ -1123,14 +1125,14 @@ class ActionBlog extends Action {
|
|||
/**
|
||||
* Топик существует?
|
||||
*/
|
||||
$idTopic=getRequest('idTarget',null,'post');
|
||||
$idTopic=getRequestStr('idTarget',null,'post');
|
||||
if (!($oTopic=$this->Topic_GetTopicById($idTopic))) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
}
|
||||
|
||||
$idCommentLast=getRequest('idCommentLast',null,'post');
|
||||
$selfIdComment=getRequest('selfIdComment',null,'post');
|
||||
$idCommentLast=getRequestStr('idCommentLast',null,'post');
|
||||
$selfIdComment=getRequestStr('selfIdComment',null,'post');
|
||||
$aComments=array();
|
||||
/**
|
||||
* Если используется постраничность, возвращаем только добавленный комментарий
|
||||
|
@ -1190,7 +1192,7 @@ class ActionBlog extends Action {
|
|||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$sUsers=getRequest('users',null,'post');
|
||||
$sBlogId=getRequest('idBlog',null,'post');
|
||||
$sBlogId=getRequestStr('idBlog',null,'post');
|
||||
/**
|
||||
* Если пользователь не авторизирован, возвращаем ошибку
|
||||
*/
|
||||
|
@ -1336,8 +1338,8 @@ class ActionBlog extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$sUserId=getRequest('idUser',null,'post');
|
||||
$sBlogId=getRequest('idBlog',null,'post');
|
||||
$sUserId=getRequestStr('idUser',null,'post');
|
||||
$sBlogId=getRequestStr('idBlog',null,'post');
|
||||
/**
|
||||
* Если пользователь не авторизирован, возвращаем ошибку
|
||||
*/
|
||||
|
@ -1386,8 +1388,8 @@ class ActionBlog extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$sUserId=getRequest('idUser',null,'post');
|
||||
$sBlogId=getRequest('idBlog',null,'post');
|
||||
$sUserId=getRequestStr('idUser',null,'post');
|
||||
$sBlogId=getRequestStr('idBlog',null,'post');
|
||||
/**
|
||||
* Если пользователь не авторизирован, возвращаем ошибку
|
||||
*/
|
||||
|
@ -1488,7 +1490,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) {
|
||||
return $this->EventNotFound();
|
||||
}
|
||||
|
@ -1602,7 +1604,7 @@ class ActionBlog extends Action {
|
|||
*
|
||||
* (-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)){
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('blog_admin_delete_move_error'),$this->Lang_Get('error'),true);
|
||||
Router::Location($oBlog->getUrlFull());
|
||||
|
@ -1644,7 +1646,7 @@ class ActionBlog extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$sBlogId=getRequest('idBlog',null,'post');
|
||||
$sBlogId=getRequestStr('idBlog',null,'post');
|
||||
/**
|
||||
* Определяем тип блога и получаем его
|
||||
*/
|
||||
|
@ -1682,7 +1684,7 @@ class ActionBlog extends Action {
|
|||
/**
|
||||
* Блог существует?
|
||||
*/
|
||||
$idBlog=getRequest('idBlog',null,'post');
|
||||
$idBlog=getRequestStr('idBlog',null,'post');
|
||||
if (!($oBlog=$this->Blog_GetBlogById($idBlog))) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
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);
|
||||
}
|
||||
if (!$sTitle) {
|
||||
|
@ -87,14 +87,14 @@ class ActionBlogs extends Action {
|
|||
*/
|
||||
$sOrder='blog_rating';
|
||||
if (getRequest('order')) {
|
||||
$sOrder=(string)getRequest('order');
|
||||
$sOrder=getRequestStr('order');
|
||||
}
|
||||
/**
|
||||
* В каком направлении сортировать
|
||||
*/
|
||||
$sOrderWay='desc';
|
||||
if (getRequest('order_way')) {
|
||||
$sOrderWay=(string)getRequest('order_way');
|
||||
$sOrderWay=getRequestStr('order_way');
|
||||
}
|
||||
/**
|
||||
* Фильтр поиска блогов
|
||||
|
|
|
@ -79,8 +79,8 @@ class ActionIndex extends Action {
|
|||
$this->AddEventPreg('/^(page([1-9]\d{0,5}))?$/i','EventIndex');
|
||||
$this->AddEventPreg('/^new$/i','/^(page([1-9]\d{0,5}))?$/i','EventNew');
|
||||
$this->AddEventPreg('/^newall$/i','/^(page([1-9]\d{0,5}))?$/i','EventNewAll');
|
||||
$this->AddEventPreg('/^discussed/i','/^(page([1-9]\d{0,5}))?$/i','EventDiscussed');
|
||||
$this->AddEventPreg('/^top/i','/^(page([1-9]\d{0,5}))?$/i','EventTop');
|
||||
$this->AddEventPreg('/^discussed$/i','/^(page([1-9]\d{0,5}))?$/i','EventDiscussed');
|
||||
$this->AddEventPreg('/^top$/i','/^(page([1-9]\d{0,5}))?$/i','EventTop');
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,8 +94,8 @@ class ActionIndex extends Action {
|
|||
*/
|
||||
protected function EventTop() {
|
||||
$sPeriod=1; // по дефолту 1 день
|
||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequest('period');
|
||||
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequestStr('period');
|
||||
}
|
||||
/**
|
||||
* Меню
|
||||
|
@ -145,8 +145,8 @@ class ActionIndex extends Action {
|
|||
*/
|
||||
protected function EventDiscussed() {
|
||||
$sPeriod=1; // по дефолту 1 день
|
||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequest('period');
|
||||
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequestStr('period');
|
||||
}
|
||||
/**
|
||||
* Меню
|
||||
|
@ -319,4 +319,4 @@ class ActionIndex extends Action {
|
|||
$this->Viewer_Assign('iCountTopicsPersonalNew',$this->iCountTopicsPersonalNew);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -219,13 +219,13 @@ class ActionLink extends Action {
|
|||
/**
|
||||
* Заполняем поля для валидации
|
||||
*/
|
||||
$oTopic->setBlogId(getRequest('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
||||
$oTopic->setTextSource(getRequest('topic_text'));
|
||||
$oTopic->setTags(getRequest('topic_tags'));
|
||||
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||
$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->setUserIp(func_getIp());
|
||||
/**
|
||||
|
@ -347,11 +347,11 @@ class ActionLink extends Action {
|
|||
/**
|
||||
* Заполняем поля для валидации
|
||||
*/
|
||||
$oTopic->setBlogId(getRequest('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
||||
$oTopic->setLinkUrl(getRequest('topic_link_url'));
|
||||
$oTopic->setTextSource(getRequest('topic_text'));
|
||||
$oTopic->setTags(getRequest('topic_tags'));
|
||||
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||
$oTopic->setLinkUrl(getRequestStr('topic_link_url'));
|
||||
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||
$oTopic->setUserIp(func_getIp());
|
||||
/**
|
||||
* Проверка корректности полей формы
|
||||
|
|
|
@ -87,8 +87,8 @@ class ActionLogin extends Action {
|
|||
* Определяем редирект
|
||||
*/
|
||||
$sUrl=Config::Get('module.user.redirect_after_login');
|
||||
if (getRequest('return-path')) {
|
||||
$sUrl=getRequest('return-path');
|
||||
if (getRequestStr('return-path')) {
|
||||
$sUrl=getRequestStr('return-path');
|
||||
}
|
||||
$this->Viewer_AssignAjax('sUrlRedirect',$sUrl ? $sUrl : Config::Get('path.root.web'));
|
||||
return;
|
||||
|
@ -112,7 +112,7 @@ class ActionLogin extends Action {
|
|||
protected function EventAjaxReactivation() {
|
||||
$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()) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('registration_activate_error_reactivate'));
|
||||
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';
|
||||
if (getRequest('order')) {
|
||||
$sOrder=(string)getRequest('order');
|
||||
$sOrder=getRequestStr('order');
|
||||
}
|
||||
/**
|
||||
* В каком направлении сортировать
|
||||
*/
|
||||
$sOrderWay='desc';
|
||||
if (getRequest('order_way')) {
|
||||
$sOrderWay=(string)getRequest('order_way');
|
||||
$sOrderWay=getRequestStr('order_way');
|
||||
}
|
||||
$aFilter=array(
|
||||
'activate' => 1
|
||||
|
|
|
@ -58,8 +58,8 @@ class ActionPersonalBlog extends Action {
|
|||
$this->AddEventPreg('/^bad$/i','/^(page([1-9]\d{0,5}))?$/i','EventTopics');
|
||||
$this->AddEventPreg('/^new$/i','/^(page([1-9]\d{0,5}))?$/i','EventTopics');
|
||||
$this->AddEventPreg('/^newall$/i','/^(page([1-9]\d{0,5}))?$/i','EventTopics');
|
||||
$this->AddEventPreg('/^discussed/i','/^(page([1-9]\d{0,5}))?$/i','EventTopics');
|
||||
$this->AddEventPreg('/^top/i','/^(page([1-9]\d{0,5}))?$/i','EventTopics');
|
||||
$this->AddEventPreg('/^discussed$/i','/^(page([1-9]\d{0,5}))?$/i','EventTopics');
|
||||
$this->AddEventPreg('/^top$/i','/^(page([1-9]\d{0,5}))?$/i','EventTopics');
|
||||
}
|
||||
|
||||
|
||||
|
@ -74,8 +74,8 @@ class ActionPersonalBlog extends Action {
|
|||
*/
|
||||
protected function EventTopics() {
|
||||
$sPeriod=1; // по дефолту 1 день
|
||||
if (in_array(getRequest('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequest('period');
|
||||
if (in_array(getRequestStr('period'),array(1,7,30,'all'))) {
|
||||
$sPeriod=getRequestStr('period');
|
||||
}
|
||||
$sShowType=$this->sCurrentEvent;
|
||||
if (!in_array($sShowType,array('discussed','top'))) {
|
||||
|
@ -152,4 +152,4 @@ class ActionPersonalBlog extends Action {
|
|||
$this->Viewer_Assign('iCountTopicsNew',$iCountTopicsNew);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -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')) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'), $this->Lang_Get('error'));
|
||||
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();
|
||||
if (count($aPhotos)) {
|
||||
/**
|
||||
|
@ -137,7 +137,7 @@ class ActionPhotoset extends Action {
|
|||
/**
|
||||
* Поиск фото по id
|
||||
*/
|
||||
$oPhoto = $this->Topic_getTopicPhotoById(getRequest('id'));
|
||||
$oPhoto = $this->Topic_getTopicPhotoById(getRequestStr('id'));
|
||||
if ($oPhoto) {
|
||||
if ($oPhoto->getTopicId()) {
|
||||
/**
|
||||
|
@ -188,16 +188,16 @@ class ActionPhotoset extends Action {
|
|||
/**
|
||||
* Поиск фото по id
|
||||
*/
|
||||
$oPhoto = $this->Topic_getTopicPhotoById(getRequest('id'));
|
||||
$oPhoto = $this->Topic_getTopicPhotoById(getRequestStr('id'));
|
||||
if ($oPhoto) {
|
||||
if ($oPhoto->getTopicId()) {
|
||||
// проверяем права на топик
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
$oPhoto->setDescription(htmlspecialchars(strip_tags(getRequest('text'))));
|
||||
$oPhoto->setDescription(htmlspecialchars(strip_tags(getRequestStr('text'))));
|
||||
$this->Topic_updateTopicPhoto($oPhoto);
|
||||
}
|
||||
}
|
||||
|
@ -232,12 +232,12 @@ class ActionPhotoset extends Action {
|
|||
return false;
|
||||
}
|
||||
|
||||
$iTopicId = getRequest('topic_id');
|
||||
$iTopicId = getRequestStr('topic_id');
|
||||
$sTargetId = null;
|
||||
$iCountPhotos = 0;
|
||||
// Если от сервера не пришёл id топика, то пытаемся определить временный код для нового топика. Если и его нет. то это ошибка
|
||||
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) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'), $this->Lang_Get('error'));
|
||||
return false;
|
||||
|
@ -430,10 +430,10 @@ class ActionPhotoset extends Action {
|
|||
/**
|
||||
* Заполняем поля для валидации
|
||||
*/
|
||||
$oTopic->setBlogId(getRequest('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
||||
$oTopic->setTextSource(getRequest('topic_text'));
|
||||
$oTopic->setTags(getRequest('topic_tags'));
|
||||
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||
$oTopic->setType('photoset');
|
||||
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
||||
|
@ -488,7 +488,7 @@ class ActionPhotoset extends Action {
|
|||
|
||||
$sTargetTmp=$_COOKIE['ls_photoset_target_tmp'];
|
||||
$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];
|
||||
}
|
||||
$oTopic->setPhotosetMainPhotoId($oPhotoMain->getId());
|
||||
|
@ -586,10 +586,10 @@ class ActionPhotoset extends Action {
|
|||
/**
|
||||
* Заполняем поля для валидации
|
||||
*/
|
||||
$oTopic->setBlogId(getRequest('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
||||
$oTopic->setTextSource(getRequest('topic_text'));
|
||||
$oTopic->setTags(getRequest('topic_tags'));
|
||||
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||
$oTopic->setUserIp(func_getIp());
|
||||
/**
|
||||
* Проверка корректности полей формы
|
||||
|
@ -640,7 +640,7 @@ class ActionPhotoset extends Action {
|
|||
$oTopic->setTextShort($this->Text_Parser($sTextShort));
|
||||
|
||||
$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];
|
||||
}
|
||||
$oTopic->setPhotosetMainPhotoId($oPhotoMain->getId());
|
||||
|
|
|
@ -454,8 +454,8 @@ class ActionProfile extends Action {
|
|||
$oWall->_setValidateScenario('add');
|
||||
$oWall->setWallUserId($this->oUserProfile->getId());
|
||||
$oWall->setUserId($this->oUserCurrent->getId());
|
||||
$oWall->setText(getRequest('sText'));
|
||||
$oWall->setPid(getRequest('iPid'));
|
||||
$oWall->setText(getRequestStr('sText'));
|
||||
$oWall->setPid(getRequestStr('iPid'));
|
||||
|
||||
$this->Hook_Run('wall_add_validate_before', array('oWall'=>$oWall));
|
||||
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();
|
||||
}
|
||||
/**
|
||||
|
@ -565,7 +565,7 @@ class ActionProfile extends Action {
|
|||
if (!$this->CheckUserProfile()) {
|
||||
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();
|
||||
}
|
||||
/**
|
||||
|
@ -611,9 +611,9 @@ class ActionProfile extends Action {
|
|||
* Создаем заметку и проводим валидацию
|
||||
*/
|
||||
$oNote=Engine::GetEntity('ModuleUser_EntityNote');
|
||||
$oNote->setTargetUserId(getRequest('iUserId'));
|
||||
$oNote->setTargetUserId(getRequestStr('iUserId'));
|
||||
$oNote->setUserId($this->oUserCurrent->getId());
|
||||
$oNote->setText((string)getRequest('text'));
|
||||
$oNote->setText(getRequestStr('text'));
|
||||
|
||||
if ($oNote->_Validate()) {
|
||||
/**
|
||||
|
@ -641,7 +641,7 @@ class ActionProfile extends Action {
|
|||
return parent::EventNotFound();
|
||||
}
|
||||
|
||||
if (!($oUserTarget=$this->User_GetUserById(getRequest('iUserId')))) {
|
||||
if (!($oUserTarget=$this->User_GetUserById(getRequestStr('iUserId')))) {
|
||||
return parent::EventNotFound();
|
||||
}
|
||||
if (!($oNote=$this->User_GetUserNote($oUserTarget->getId(),$this->oUserCurrent->getId()))) {
|
||||
|
@ -696,7 +696,7 @@ class ActionProfile extends Action {
|
|||
/**
|
||||
* Из реквеста дешефруем 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) {
|
||||
return $this->EventNotFound();
|
||||
}
|
||||
|
@ -776,7 +776,7 @@ class ActionProfile extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$sUserId=getRequest('idUser',null,'post');
|
||||
$sUserId=getRequestStr('idUser',null,'post');
|
||||
/**
|
||||
* Если пользователь не авторизирован, возвращаем ошибку
|
||||
*/
|
||||
|
@ -896,8 +896,8 @@ class ActionProfile extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$sUserId=getRequest('idUser');
|
||||
$sUserText=getRequest('userText','');
|
||||
$sUserId=getRequestStr('idUser');
|
||||
$sUserText=getRequestStr('userText','');
|
||||
/**
|
||||
* Если пользователь не авторизирован, возвращаем ошибку
|
||||
*/
|
||||
|
@ -1120,7 +1120,7 @@ class ActionProfile extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$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->setTitle(strip_tags(getRequest('topic_title')));
|
||||
$oTopic->setTextSource(getRequest('topic_text'));
|
||||
$oTopic->setTags(getRequest('topic_tags'));
|
||||
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||
$oTopic->setType('question');
|
||||
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
||||
|
@ -246,7 +246,7 @@ class ActionQuestion extends Action {
|
|||
*/
|
||||
$oTopic->clearQuestionAnswer();
|
||||
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) {
|
||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
||||
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||
}
|
||||
$oTopic->setTextSource(getRequest('topic_text'));
|
||||
$oTopic->setTags(getRequest('topic_tags'));
|
||||
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||
$oTopic->setUserIp(func_getIp());
|
||||
/**
|
||||
* Проверка корректности полей формы
|
||||
|
@ -380,7 +380,7 @@ class ActionQuestion extends Action {
|
|||
if ($oTopic->getQuestionCountVote()==0) {
|
||||
$oTopic->clearQuestionAnswer();
|
||||
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());
|
||||
foreach ($aAnswers as $key => $sAnswer) {
|
||||
$sAnswer=(string)$sAnswer;
|
||||
if (trim($sAnswer)=='') {
|
||||
unset($aAnswers[$key]);
|
||||
continue;
|
||||
|
|
|
@ -148,11 +148,11 @@ class ActionRegistration extends Action {
|
|||
/**
|
||||
* Заполняем поля (данные)
|
||||
*/
|
||||
$oUser->setLogin(getRequest('login'));
|
||||
$oUser->setMail(getRequest('mail'));
|
||||
$oUser->setPassword(getRequest('password'));
|
||||
$oUser->setPasswordConfirm(getRequest('password_confirm'));
|
||||
$oUser->setCaptcha(getRequest('captcha'));
|
||||
$oUser->setLogin(getRequestStr('login'));
|
||||
$oUser->setMail(getRequestStr('mail'));
|
||||
$oUser->setPassword(getRequestStr('password'));
|
||||
$oUser->setPasswordConfirm(getRequestStr('password_confirm'));
|
||||
$oUser->setCaptcha(getRequestStr('captcha'));
|
||||
$oUser->setDateRegister(date("Y-m-d H:i:s"));
|
||||
$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/');
|
||||
} else {
|
||||
$this->Notify_SendRegistration($oUser,getRequest('password'));
|
||||
$this->Notify_SendRegistration($oUser,getRequestStr('password'));
|
||||
$oUser=$this->User_GetUserById($oUser->getId());
|
||||
/**
|
||||
* Сразу авторизуем
|
||||
|
@ -212,8 +212,8 @@ class ActionRegistration extends Action {
|
|||
* Определяем URL для редиректа после авторизации
|
||||
*/
|
||||
$sUrl=Config::Get('module.user.redirect_after_registration');
|
||||
if (getRequest('return-path')) {
|
||||
$sUrl=getRequest('return-path');
|
||||
if (getRequestStr('return-path')) {
|
||||
$sUrl=getRequestStr('return-path');
|
||||
}
|
||||
$this->Viewer_AssignAjax('sUrlRedirect',$sUrl ? $sUrl : Config::Get('path.root.web'));
|
||||
$this->Message_AddNoticeSingle($this->Lang_Get('registration_ok'));
|
||||
|
@ -304,7 +304,7 @@ class ActionRegistration extends Action {
|
|||
if ($this->CheckInviteRegister()) {
|
||||
$sInviteId=$this->GetInviteRegister();
|
||||
} else {
|
||||
$sInviteId=getRequest('invite_code');
|
||||
$sInviteId=getRequestStr('invite_code');
|
||||
}
|
||||
$oInvate=$this->User_GetInviteByCode($sInviteId);
|
||||
if ($oInvate) {
|
||||
|
|
|
@ -169,7 +169,7 @@ class ActionSearch extends Action {
|
|||
* @return array
|
||||
*/
|
||||
private function PrepareRequest(){
|
||||
$aReq['q'] = getRequest('q');
|
||||
$aReq['q'] = getRequestStr('q');
|
||||
if (!func_check($aReq['q'],'text', 2, 255)) {
|
||||
/**
|
||||
* Если запрос слишком короткий перенаправляем на начальную страницу поиска
|
||||
|
|
|
@ -360,8 +360,8 @@ class ActionSettings extends Action {
|
|||
if (isPost('submit_settings_tuning')) {
|
||||
$this->Security_ValidateSendForm();
|
||||
|
||||
if (in_array(getRequest('settings_general_timezone'),$aTimezoneList)) {
|
||||
$this->oUserCurrent->setSettingsTimezone(getRequest('settings_general_timezone'));
|
||||
if (in_array(getRequestStr('settings_general_timezone'),$aTimezoneList)) {
|
||||
$this->oUserCurrent->setSettingsTimezone(getRequestStr('settings_general_timezone'));
|
||||
}
|
||||
|
||||
$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'));
|
||||
$bError=true;
|
||||
}
|
||||
|
@ -433,7 +433,7 @@ class ActionSettings extends Action {
|
|||
*/
|
||||
if (!$bError) {
|
||||
$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->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 ($oUserMail=$this->User_GetUserByMail(getRequest('mail')) and $oUserMail->getId()!=$this->oUserCurrent->getId()) {
|
||||
if (func_check(getRequestStr('mail'),'mail')) {
|
||||
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'));
|
||||
$bError=true;
|
||||
}
|
||||
|
@ -473,11 +473,11 @@ class ActionSettings extends Action {
|
|||
/**
|
||||
* Проверка на смену пароля
|
||||
*/
|
||||
if (getRequest('password','')!='') {
|
||||
if (func_check(getRequest('password'),'password',5)) {
|
||||
if (getRequest('password')==getRequest('password_confirm')) {
|
||||
if (func_encrypt(getRequest('password_now'))==$this->oUserCurrent->getPassword()) {
|
||||
$this->oUserCurrent->setPassword(func_encrypt(getRequest('password')));
|
||||
if (getRequestStr('password','')!='') {
|
||||
if (func_check(getRequestStr('password'),'password',5)) {
|
||||
if (getRequestStr('password')==getRequestStr('password_confirm')) {
|
||||
if (func_encrypt(getRequestStr('password_now'))==$this->oUserCurrent->getPassword()) {
|
||||
$this->oUserCurrent->setPassword(func_encrypt(getRequestStr('password')));
|
||||
} else {
|
||||
$bError=true;
|
||||
$this->Message_AddError($this->Lang_Get('settings_profile_password_current_error'),$this->Lang_Get('error'));
|
||||
|
@ -508,9 +508,13 @@ class ActionSettings extends Action {
|
|||
/**
|
||||
* Подтверждение смены емайла
|
||||
*/
|
||||
if (getRequest('mail') and getRequest('mail')!=$this->oUserCurrent->getMail()) {
|
||||
if ($this->User_MakeUserChangemail($this->oUserCurrent,getRequest('mail'))) {
|
||||
$this->Message_AddNotice($this->Lang_Get('settings_profile_mail_change_from_notice'));
|
||||
if (getRequestStr('mail') and getRequestStr('mail')!=$this->oUserCurrent->getMail()) {
|
||||
if ($oChangemail=$this->User_MakeUserChangemail($this->oUserCurrent,getRequestStr('mail'))) {
|
||||
if ($oChangemail->getMailFrom()) {
|
||||
$this->Message_AddNotice($this->Lang_Get('settings_profile_mail_change_from_notice'));
|
||||
} else {
|
||||
$this->Message_AddNotice($this->Lang_Get('settings_profile_mail_change_to_notice'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -552,43 +556,43 @@ class ActionSettings extends Action {
|
|||
* Определяем гео-объект
|
||||
*/
|
||||
if (getRequest('geo_city')) {
|
||||
$oGeoObject=$this->Geo_GetGeoObject('city',getRequest('geo_city'));
|
||||
$oGeoObject=$this->Geo_GetGeoObject('city',getRequestStr('geo_city'));
|
||||
} elseif (getRequest('geo_region')) {
|
||||
$oGeoObject=$this->Geo_GetGeoObject('region',getRequest('geo_region'));
|
||||
$oGeoObject=$this->Geo_GetGeoObject('region',getRequestStr('geo_region'));
|
||||
} elseif (getRequest('geo_country')) {
|
||||
$oGeoObject=$this->Geo_GetGeoObject('country',getRequest('geo_country'));
|
||||
$oGeoObject=$this->Geo_GetGeoObject('country',getRequestStr('geo_country'));
|
||||
} else {
|
||||
$oGeoObject=null;
|
||||
}
|
||||
/**
|
||||
* Проверяем имя
|
||||
*/
|
||||
if (func_check(getRequest('profile_name'),'text',2,Config::Get('module.user.name_max'))) {
|
||||
$this->oUserCurrent->setProfileName(getRequest('profile_name'));
|
||||
if (func_check(getRequestStr('profile_name'),'text',2,Config::Get('module.user.name_max'))) {
|
||||
$this->oUserCurrent->setProfileName(getRequestStr('profile_name'));
|
||||
} else {
|
||||
$this->oUserCurrent->setProfileName(null);
|
||||
}
|
||||
/**
|
||||
* Проверяем пол
|
||||
*/
|
||||
if (in_array(getRequest('profile_sex'),array('man','woman','other'))) {
|
||||
$this->oUserCurrent->setProfileSex(getRequest('profile_sex'));
|
||||
if (in_array(getRequestStr('profile_sex'),array('man','woman','other'))) {
|
||||
$this->oUserCurrent->setProfileSex(getRequestStr('profile_sex'));
|
||||
} else {
|
||||
$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)) {
|
||||
$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'))));
|
||||
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,getRequestStr('profile_birthday_month'),getRequestStr('profile_birthday_day'),getRequestStr('profile_birthday_year'))));
|
||||
} else {
|
||||
$this->oUserCurrent->setProfileBirthday(null);
|
||||
}
|
||||
/**
|
||||
* Проверяем информацию о себе
|
||||
*/
|
||||
if (func_check(getRequest('profile_about'),'text',1,3000)) {
|
||||
$this->oUserCurrent->setProfileAbout($this->Text_Parser(getRequest('profile_about')));
|
||||
if (func_check(getRequestStr('profile_about'),'text',1,3000)) {
|
||||
$this->oUserCurrent->setProfileAbout($this->Text_Parser(getRequestStr('profile_about')));
|
||||
} else {
|
||||
$this->oUserCurrent->setProfileAbout(null);
|
||||
}
|
||||
|
@ -640,7 +644,7 @@ class ActionSettings extends Action {
|
|||
$aData = array();
|
||||
foreach ($aFields as $iId => $aField) {
|
||||
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);
|
||||
|
@ -657,6 +661,7 @@ class ActionSettings extends Action {
|
|||
$aFieldsContactValue=getRequest('profile_user_field_value');
|
||||
if (is_array($aFieldsContactType)) {
|
||||
foreach($aFieldsContactType as $k=>$v) {
|
||||
$v=(string)$v;
|
||||
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'));
|
||||
}
|
||||
|
|
|
@ -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'));
|
||||
}
|
||||
/**
|
||||
|
@ -157,7 +157,7 @@ class ActionStream extends Action {
|
|||
/**
|
||||
* Необходимо передать последний просмотренный ID событий
|
||||
*/
|
||||
$iFromId = getRequest('last_id');
|
||||
$iFromId = getRequestStr('last_id');
|
||||
if (!$iFromId) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
|
@ -169,7 +169,7 @@ class ActionStream extends Action {
|
|||
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||
$oViewer->Assign('sDateLast', getRequest('date_last'));
|
||||
$oViewer->Assign('sDateLast', getRequestStr('date_last'));
|
||||
if (count($aEvents)) {
|
||||
$oEvenLast=end($aEvents);
|
||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||
|
@ -198,7 +198,7 @@ class ActionStream extends Action {
|
|||
/**
|
||||
* Необходимо передать последний просмотренный ID событий
|
||||
*/
|
||||
$iFromId = getRequest('last_id');
|
||||
$iFromId = getRequestStr('last_id');
|
||||
if (!$iFromId) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
|
@ -210,7 +210,7 @@ class ActionStream extends Action {
|
|||
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||
$oViewer->Assign('sDateLast', getRequest('date_last'));
|
||||
$oViewer->Assign('sDateLast', getRequestStr('date_last'));
|
||||
if (count($aEvents)) {
|
||||
$oEvenLast=end($aEvents);
|
||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||
|
@ -239,12 +239,12 @@ class ActionStream extends Action {
|
|||
/**
|
||||
* Необходимо передать последний просмотренный ID событий
|
||||
*/
|
||||
$iFromId = getRequest('last_id');
|
||||
$iFromId = getRequestStr('last_id');
|
||||
if (!$iFromId) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
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'));
|
||||
return;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ class ActionStream extends Action {
|
|||
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||
$oViewer->Assign('sDateLast', getRequest('date_last'));
|
||||
$oViewer->Assign('sDateLast', getRequestStr('date_last'));
|
||||
if (count($aEvents)) {
|
||||
$oEvenLast=end($aEvents);
|
||||
$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'));
|
||||
}
|
||||
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'));
|
||||
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'));
|
||||
}
|
||||
/**
|
||||
|
@ -319,9 +319,9 @@ class ActionStream extends Action {
|
|||
/**
|
||||
* Проверяем существование пользователя
|
||||
*/
|
||||
$oUser = $this->User_getUserByLogin(getRequest('login'));
|
||||
$oUser = $this->User_getUserByLogin(getRequestStr('login'));
|
||||
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;
|
||||
}
|
||||
if ($this->oUserCurrent->getId() == $oUser->getId()) {
|
||||
|
@ -356,13 +356,13 @@ class ActionStream extends Action {
|
|||
/**
|
||||
* Пользователь с таким 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->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'));
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -88,7 +88,7 @@ class ActionSubscribe extends Action {
|
|||
/**
|
||||
* Получаем емайл подписки и проверяем его на валидность
|
||||
*/
|
||||
$sMail=getRequest('mail');
|
||||
$sMail=getRequestStr('mail');
|
||||
if ($this->oUserCurrent) {
|
||||
$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)) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return ;
|
||||
}
|
||||
$sTargetId=getRequest('target_id') ? getRequest('target_id') : null;
|
||||
$sTargetId=getRequestStr('target_id') ? getRequestStr('target_id') : null;
|
||||
$iValue=getRequest('value') ? 1 : 0;
|
||||
|
||||
$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) {
|
||||
list($d,$m,$y)=explode('.',$start);
|
||||
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) {
|
||||
list($d,$m,$y)=explode('.',$end);
|
||||
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().'/');
|
||||
} else {
|
||||
$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'));
|
||||
$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'));
|
||||
$bOk=false;
|
||||
}
|
||||
|
@ -537,7 +537,7 @@ class ActionTalk extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$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'));
|
||||
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'));
|
||||
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)) {
|
||||
$this->Message_AddErrorSingle($this->Lang_Get('talk_comment_add_text_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
|
@ -724,7 +724,7 @@ class ActionTalk extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$sUsers=(string)getRequest('users',null,'post');
|
||||
$sUsers=getRequestStr('users',null,'post');
|
||||
/**
|
||||
* Если пользователь не авторизирован, возвращаем ошибку
|
||||
*/
|
||||
|
@ -817,7 +817,7 @@ class ActionTalk extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$idTarget=(string)getRequest('idTarget',null,'post');
|
||||
$idTarget=getRequestStr('idTarget',null,'post');
|
||||
/**
|
||||
* Если пользователь не авторизирован, возвращаем ошибку
|
||||
*/
|
||||
|
@ -882,8 +882,8 @@ class ActionTalk extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$idTarget=(string)getRequest('idTarget',null,'post');
|
||||
$idTalk=(string)getRequest('idTalk',null,'post');
|
||||
$idTarget=getRequestStr('idTarget',null,'post');
|
||||
$idTalk=getRequestStr('idTalk',null,'post');
|
||||
/**
|
||||
* Если пользователь не авторизирован, возвращаем ошибку
|
||||
*/
|
||||
|
@ -960,8 +960,8 @@ class ActionTalk extends Action {
|
|||
* Устанавливаем формат Ajax ответа
|
||||
*/
|
||||
$this->Viewer_SetResponseAjax('json');
|
||||
$sUsers=(string)getRequest('users',null,'post');
|
||||
$idTalk=(string)getRequest('idTalk',null,'post');
|
||||
$sUsers=getRequestStr('users',null,'post');
|
||||
$idTalk=getRequestStr('idTalk',null,'post');
|
||||
/**
|
||||
* Если пользователь не авторизирован, возвращаем ошибку
|
||||
*/
|
||||
|
|
|
@ -239,10 +239,10 @@ class ActionTopic extends Action {
|
|||
/**
|
||||
* Заполняем поля для валидации
|
||||
*/
|
||||
$oTopic->setBlogId(getRequest('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
||||
$oTopic->setTextSource(getRequest('topic_text'));
|
||||
$oTopic->setTags(getRequest('topic_tags'));
|
||||
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||
$oTopic->setUserId($this->oUserCurrent->getId());
|
||||
$oTopic->setType('topic');
|
||||
$oTopic->setDateAdd(date("Y-m-d H:i:s"));
|
||||
|
@ -373,10 +373,10 @@ class ActionTopic extends Action {
|
|||
/**
|
||||
* Заполняем поля для валидации
|
||||
*/
|
||||
$oTopic->setBlogId(getRequest('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequest('topic_title')));
|
||||
$oTopic->setTextSource(getRequest('topic_text'));
|
||||
$oTopic->setTags(getRequest('topic_tags'));
|
||||
$oTopic->setBlogId(getRequestStr('blog_id'));
|
||||
$oTopic->setTitle(strip_tags(getRequestStr('topic_title')));
|
||||
$oTopic->setTextSource(getRequestStr('topic_text'));
|
||||
$oTopic->setTags(getRequestStr('topic_tags'));
|
||||
$oTopic->setUserIp(func_getIp());
|
||||
/**
|
||||
* Проверка корректности полей формы
|
||||
|
|
|
@ -92,7 +92,7 @@ class ActionUserfeed extends Action {
|
|||
/**
|
||||
* Проверяем последний просмотренный ID топика
|
||||
*/
|
||||
$iFromId = getRequest('last_id');
|
||||
$iFromId = getRequestStr('last_id');
|
||||
if (!$iFromId) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
|
@ -132,7 +132,7 @@ class ActionUserfeed extends Action {
|
|||
if (!getRequest('id')) {
|
||||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
}
|
||||
$sType = (string)getRequest('type');
|
||||
$sType = getRequestStr('type');
|
||||
$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'));
|
||||
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'));
|
||||
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'));
|
||||
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'));
|
||||
}
|
||||
/**
|
||||
|
@ -191,9 +191,9 @@ class ActionUserfeed extends Action {
|
|||
/**
|
||||
* Проверяем существование прользователя
|
||||
*/
|
||||
$oUser = $this->User_getUserByLogin(getRequest('login'));
|
||||
$oUser = $this->User_getUserByLogin(getRequestStr('login'));
|
||||
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;
|
||||
}
|
||||
/**
|
||||
|
@ -231,7 +231,7 @@ class ActionUserfeed extends Action {
|
|||
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
|
||||
return;
|
||||
}
|
||||
$sType = (string)getRequest('type');
|
||||
$sType = getRequestStr('type');
|
||||
$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'));
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,7 @@ class BlockUserfeedBlogs extends Block {
|
|||
/**
|
||||
* Получаем список ID блогов, в которых состоит пользователь
|
||||
*/
|
||||
$aBlogsId = $this->Blog_getBlogUsersByUserId($oUserCurrent->getId(), array(ModuleBlog::BLOG_USER_ROLE_USER,ModuleBlog::BLOG_USER_ROLE_MODERATOR,ModuleBlog::BLOG_USER_ROLE_ADMINISTRATOR),true);
|
||||
$aBlogsId = $this->Blog_GetBlogUsersByUserId($oUserCurrent->getId(), array(ModuleBlog::BLOG_USER_ROLE_USER,ModuleBlog::BLOG_USER_ROLE_MODERATOR,ModuleBlog::BLOG_USER_ROLE_ADMINISTRATOR),true);
|
||||
/**
|
||||
* Получаем список ID блогов, которые создал пользователь
|
||||
*/
|
||||
|
|
|
@ -311,10 +311,20 @@ class ModuleACL extends Module {
|
|||
/**
|
||||
* Если модер или админ блога
|
||||
*/
|
||||
$oBlogUser=$this->Blog_GetBlogUserByBlogIdAndUserId($oTopic->getBlogId(),$oUser->getId());
|
||||
if ($oBlogUser and ($oBlogUser->getIsModerator() or $oBlogUser->getIsAdministrator())) {
|
||||
return true;
|
||||
if ($this->User_GetUserCurrent() and $this->User_GetUserCurrent()->getId()==$oUser->getId()) {
|
||||
/**
|
||||
* Для авторизованного пользователя данный код будет работать быстрее
|
||||
*/
|
||||
if ($oTopic->getBlog()->getUserIsAdministrator() or $oTopic->getBlog()->getUserIsModerator()) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
$oBlogUser=$this->Blog_GetBlogUserByBlogIdAndUserId($oTopic->getBlogId(),$oUser->getId());
|
||||
if ($oBlogUser and ($oBlogUser->getIsModerator() or $oBlogUser->getIsAdministrator())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
|
@ -340,9 +350,18 @@ class ModuleACL extends Module {
|
|||
/**
|
||||
* Если модер или админ блога
|
||||
*/
|
||||
$oBlogUser=$this->Blog_GetBlogUserByBlogIdAndUserId($oTopic->getBlogId(),$oUser->getId());
|
||||
if ($oBlogUser and ($oBlogUser->getIsModerator() or $oBlogUser->getIsAdministrator())) {
|
||||
return true;
|
||||
if ($this->User_GetUserCurrent() and $this->User_GetUserCurrent()->getId()==$oUser->getId()) {
|
||||
/**
|
||||
* Для авторизованного пользователя данный код будет работать быстрее
|
||||
*/
|
||||
if ($oTopic->getBlog()->getUserIsAdministrator() or $oTopic->getBlog()->getUserIsModerator()) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
$oBlogUser=$this->Blog_GetBlogUserByBlogIdAndUserId($oTopic->getBlogId(),$oUser->getId());
|
||||
if ($oBlogUser and ($oBlogUser->getIsModerator() or $oBlogUser->getIsAdministrator())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -674,6 +674,7 @@ class ModuleComment_MapperComment extends Mapper {
|
|||
target_id IN (?a)
|
||||
AND
|
||||
target_type = ?
|
||||
ORDER BY comment_id DESC
|
||||
";
|
||||
if ($this->oDb->query($sql,$aTargetId,$sTargetType)) {
|
||||
return true;
|
||||
|
|
|
@ -254,11 +254,11 @@ class ModuleSubscribe extends Module {
|
|||
public function CheckTargetTopicNewComment($iTargetId,$iStatus) {
|
||||
if ($oTopic=$this->Topic_GetTopicById($iTargetId)) {
|
||||
/**
|
||||
* Топик может быть в закрытом блоге, поэтому необходимо разрешить подписку только если пользователь в нем состоит
|
||||
* Топик может быть в закрытом блоге, поэтому необходимо разрешить подписку только если пользователь в нем состоит, или является автором блога
|
||||
* Отписываться разрешаем с любого топика
|
||||
*/
|
||||
if ($iStatus==1 and $oTopic->getBlog()->getType()=='close') {
|
||||
if (!$this->oUserCurrent or !$this->Blog_GetBlogUserByBlogIdAndUserId($oTopic->getBlogId(),$this->oUserCurrent->getId())) {
|
||||
if (!$this->oUserCurrent or !($oTopic->getBlog()->getOwnerId()==$this->oUserCurrent->getId() or $this->Blog_GetBlogUserByBlogIdAndUserId($oTopic->getBlogId(),$this->oUserCurrent->getId()))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -418,7 +418,7 @@ class ModuleTalk extends Module {
|
|||
$aTalkId=array($aTalkId);
|
||||
}
|
||||
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)) {
|
||||
$oTalkUser->setDateLast(date("Y-m-d H:i:s"));
|
||||
if ($oTalk->getCommentIdLast()) {
|
||||
|
@ -447,7 +447,7 @@ class ModuleTalk extends Module {
|
|||
$this->DeleteFavouriteTalk(
|
||||
Engine::GetEntity('Favourite',
|
||||
array(
|
||||
'target_id' => $sTalkId,
|
||||
'target_id' => (string)$sTalkId,
|
||||
'target_type' => 'talk',
|
||||
'user_id' => $sUserId
|
||||
)
|
||||
|
@ -456,6 +456,7 @@ class ModuleTalk extends Module {
|
|||
}
|
||||
// Нужно почистить зависимые кеши
|
||||
foreach ($aTalkId as $sTalkId) {
|
||||
$sTalkId=(string)$sTalkId;
|
||||
$this->Cache_Clean(
|
||||
Zend_Cache::CLEANING_MODE_MATCHING_TAG,
|
||||
array("update_talk_user_{$sTalkId}")
|
||||
|
@ -466,6 +467,7 @@ class ModuleTalk extends Module {
|
|||
|
||||
// Удаляем пустые беседы, если в них нет пользователей
|
||||
foreach ($aTalkId as $sTalkId) {
|
||||
$sTalkId=(string)$sTalkId;
|
||||
if (!count($this->GetUsersTalk($sTalkId, array(self::TALK_USER_ACTIVE)))) {
|
||||
$this->DeleteTalk($sTalkId);
|
||||
}
|
||||
|
@ -585,7 +587,10 @@ class ModuleTalk extends Module {
|
|||
* @param int $sTalkId ID разговора
|
||||
* @return array
|
||||
*/
|
||||
public function GetTalkUsersByTalkId($sTalkId) {
|
||||
public function GetTalkUsersByTalkId($sTalkId,$aAllowData=null) {
|
||||
if (is_null($aAllowData)) {
|
||||
$aAllowData=array('user'=>array());
|
||||
}
|
||||
if (false === ($aTalkUsers = $this->Cache_Get("talk_relation_user_by_talk_id_{$sTalkId}"))) {
|
||||
$aTalkUsers = $this->oMapper->GetTalkUsers($sTalkId);
|
||||
$this->Cache_Set($aTalkUsers, "talk_relation_user_by_talk_id_{$sTalkId}", array("update_talk_user_{$sTalkId}"), 60*60*24*1);
|
||||
|
@ -596,7 +601,7 @@ class ModuleTalk extends Module {
|
|||
foreach ($aTalkUsers as $oTalkUser) {
|
||||
$aUserId[]=$oTalkUser->getUserId();
|
||||
}
|
||||
$aUsers = $this->User_GetUsersAdditionalData($aUserId);
|
||||
$aUsers = $this->User_GetUsersAdditionalData($aUserId,isset($aAllowData['user']) && is_array($aAllowData['user']) ? $aAllowData['user'] : null);
|
||||
|
||||
foreach ($aTalkUsers as $oTalkUser){
|
||||
if(isset($aUsers[$oTalkUser->getUserId()])) {
|
||||
|
|
|
@ -66,5 +66,18 @@ class ModuleTools extends Module {
|
|||
}
|
||||
return $aCollection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Преобразует спец символы в html последовательнось, поведение аналогично htmlspecialchars, кроме преобразования амперсанта "&"
|
||||
*
|
||||
* @param string $sText
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function Urlspecialchars($sText) {
|
||||
$aTable=get_html_translation_table();
|
||||
unset($aTable['&']);
|
||||
return strtr($sText,$aTable);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -248,11 +248,15 @@ class ModuleTopic extends Module {
|
|||
*/
|
||||
$this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array('topic_update'));
|
||||
$this->Cache_Delete("topic_{$sTopicId}");
|
||||
/**
|
||||
* Список изображений
|
||||
*/
|
||||
$aPhotos=$this->getPhotosByTopicId($sTopicId);
|
||||
/**
|
||||
* Если топик успешно удален, удаляем связанные данные
|
||||
*/
|
||||
if($bResult=$this->oMapperTopic->DeleteTopic($sTopicId)){
|
||||
return $this->DeleteTopicAdditionalData($sTopicId);
|
||||
return $this->DeleteTopicAdditionalData($sTopicId,$aPhotos);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -263,7 +267,7 @@ class ModuleTopic extends Module {
|
|||
* @param int $iTopicId ID топика
|
||||
* @return bool
|
||||
*/
|
||||
public function DeleteTopicAdditionalData($iTopicId) {
|
||||
public function DeleteTopicAdditionalData($iTopicId,$aPhotos=array()) {
|
||||
/**
|
||||
* Чистим зависимые кеши
|
||||
*/
|
||||
|
@ -297,7 +301,7 @@ class ModuleTopic extends Module {
|
|||
/**
|
||||
* Удаляем фото у топика фотосета
|
||||
*/
|
||||
if ($aPhotos=$this->getPhotosByTopicId($iTopicId)) {
|
||||
if (count($aPhotos)) {
|
||||
foreach ($aPhotos as $oPhoto) {
|
||||
$this->deleteTopicPhoto($oPhoto);
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ class ModuleTopic_EntityTopic extends Entity {
|
|||
$this->aValidateRules[]=array('topic_title','string','max'=>200,'min'=>2,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_create_title'),'on'=>array('topic','link','photoset'));
|
||||
$this->aValidateRules[]=array('topic_title','string','max'=>200,'min'=>2,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_question_create_title'),'on'=>array('question'));
|
||||
$this->aValidateRules[]=array('topic_text_source','string','max'=>Config::Get('module.topic.max_length'),'min'=>2,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('topic','photoset'));
|
||||
$this->aValidateRules[]=array('topic_text_source','string','max'=>500,'min'=>10,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('link'));
|
||||
$this->aValidateRules[]=array('topic_text_source','string','max'=>500,'allowEmpty'=>true,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('question'));
|
||||
$this->aValidateRules[]=array('topic_text_source','string','max'=>Config::Get('module.topic.link_max_length'),'min'=>10,'allowEmpty'=>false,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('link'));
|
||||
$this->aValidateRules[]=array('topic_text_source','string','max'=>Config::Get('module.topic.question_max_length'),'allowEmpty'=>true,'label'=>$this->Lang_Get('topic_create_text'),'on'=>array('question'));
|
||||
$this->aValidateRules[]=array('topic_tags','tags','count'=>15,'label'=>$this->Lang_Get('topic_create_tags'),'allowEmpty'=>Config::Get('module.topic.allow_empty_tags'),'on'=>array('topic','link','question','photoset'));
|
||||
$this->aValidateRules[]=array('blog_id','blog_id','on'=>array('topic','link','question','photoset'));
|
||||
$this->aValidateRules[]=array('topic_text_source','topic_unique','on'=>array('topic','link','question','photoset'));
|
||||
|
@ -359,6 +359,14 @@ class ModuleTopic_EntityTopic extends Entity {
|
|||
return Router::GetPath('blog').$this->getBlog()->getUrl().'/'.$this->getId().'.html';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Возвращает полный URL до страницы редактировани топика
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUrlEdit() {
|
||||
return Router::GetPath($this->getType()).'edit/'.$this->getId().'/';
|
||||
}
|
||||
/**
|
||||
* Возвращает объект голосования за топик текущим пользователем
|
||||
*
|
||||
|
@ -386,6 +394,39 @@ class ModuleTopic_EntityTopic extends Entity {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Проверяет разрешение на удаление топика у текущего пользователя
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getIsAllowDelete() {
|
||||
if ($oUser=$this->User_GetUserCurrent()) {
|
||||
return $this->ACL_IsAllowDeleteTopic($this,$oUser);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Проверяет разрешение на редактирование топика у текущего пользователя
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getIsAllowEdit() {
|
||||
if ($oUser=$this->User_GetUserCurrent()) {
|
||||
return $this->ACL_IsAllowEditTopic($this,$oUser);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Проверяет разрешение на какое-либо действие для топика у текущего пользователя
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getIsAllowAction() {
|
||||
if ($this->User_GetUserCurrent()) {
|
||||
return $this->getIsAllowEdit() || $this->getIsAllowDelete();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Возвращает количество добавивших топик в избранное
|
||||
*
|
||||
|
|
|
@ -522,7 +522,7 @@ class ModuleUser extends Module {
|
|||
* Ставим куку
|
||||
*/
|
||||
if ($bRemember) {
|
||||
setcookie('key',$sKey,time()+Config::Get('sys.cookie.time'),Config::Get('sys.cookie.path'),Config::Get('sys.cookie.host'));
|
||||
setcookie('key',$sKey,time()+Config::Get('sys.cookie.time'),Config::Get('sys.cookie.path'),Config::Get('sys.cookie.host'),false,true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1245,7 +1245,10 @@ class ModuleUser extends Module {
|
|||
* @return bool
|
||||
*/
|
||||
public function CheckLogin($sLogin) {
|
||||
if (preg_match("/^[\da-z\_\-]{".Config::Get('module.user.login.min_size').','.Config::Get('module.user.login.max_size')."}$/i",$sLogin)){
|
||||
$charset = Config::Get('module.user.login.charset');
|
||||
$min = Config::Get('module.user.login.min_size');
|
||||
$max = Config::Get('module.user.login.max_size');
|
||||
if (preg_match('/^[' . $charset . ']{' . $min . ',' . $max . '}$/i',$sLogin)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1520,6 +1523,8 @@ class ModuleUser extends Module {
|
|||
return $this->oMapper->GetUserChangemailByCodeTo($sCode);
|
||||
}
|
||||
/**
|
||||
* Формирование процесса смены емайла в профиле пользователя
|
||||
*
|
||||
* @param ModuleUser_EntityUser $oUser Объект пользователя
|
||||
* @param string $sMailNew Новый емайл
|
||||
* @return bool|ModuleUser_EntityChangemail
|
||||
|
@ -1529,21 +1534,40 @@ class ModuleUser extends Module {
|
|||
$oChangemail->setUserId($oUser->getId());
|
||||
$oChangemail->setDateAdd(date("Y-m-d H:i:s"));
|
||||
$oChangemail->setDateExpired(date("Y-m-d H:i:s",time()+3*24*60*60)); // 3 дня для смены емайла
|
||||
$oChangemail->setMailFrom($oUser->getMail());
|
||||
$oChangemail->setMailFrom($oUser->getMail() ? $oUser->getMail() : '');
|
||||
$oChangemail->setMailTo($sMailNew);
|
||||
$oChangemail->setCodeFrom(func_generator(32));
|
||||
$oChangemail->setCodeTo(func_generator(32));
|
||||
if ($this->AddUserChangemail($oChangemail)) {
|
||||
/**
|
||||
* Отправляем уведомление
|
||||
* Если у пользователя раньше не было емайла, то сразу шлем подтверждение на новый емайл
|
||||
*/
|
||||
$this->Notify_Send($oUser,
|
||||
'notify.user_changemail_from.tpl',
|
||||
$this->Lang_Get('notify_subject_user_changemail'),
|
||||
array(
|
||||
'oUser' => $oUser,
|
||||
'oChangemail' => $oChangemail,
|
||||
));
|
||||
if (!$oChangemail->getMailFrom()) {
|
||||
$oChangemail->setConfirmFrom(1);
|
||||
$this->User_UpdateUserChangemail($oChangemail);
|
||||
/**
|
||||
* Отправляем уведомление на новый емайл
|
||||
*/
|
||||
$this->Notify_Send($oChangemail->getMailTo(),
|
||||
'notify.user_changemail_to.tpl',
|
||||
$this->Lang_Get('notify_subject_user_changemail'),
|
||||
array(
|
||||
'oUser' => $oUser,
|
||||
'oChangemail' => $oChangemail,
|
||||
));
|
||||
|
||||
} else {
|
||||
/**
|
||||
* Отправляем уведомление на старый емайл
|
||||
*/
|
||||
$this->Notify_Send($oUser,
|
||||
'notify.user_changemail_from.tpl',
|
||||
$this->Lang_Get('notify_subject_user_changemail'),
|
||||
array(
|
||||
'oUser' => $oUser,
|
||||
'oChangemail' => $oChangemail,
|
||||
));
|
||||
}
|
||||
return $oChangemail;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -22,6 +22,19 @@
|
|||
* @since 1.0
|
||||
*/
|
||||
class ModuleUser_EntityUser extends Entity {
|
||||
/**
|
||||
* Определяем дополнительные правила валидации
|
||||
*
|
||||
* @param array
|
||||
*/
|
||||
public function __construct($aParam = false) {
|
||||
if (Config::Get('module.user.captcha_use_registration')) {
|
||||
$this->aValidateRules[] = array('captcha', 'captcha', 'on' => array('registration'));
|
||||
}
|
||||
|
||||
parent::__construct($aParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* Определяем правила валидации
|
||||
*
|
||||
|
@ -32,7 +45,6 @@ class ModuleUser_EntityUser extends Entity {
|
|||
array('login','login_exists','on'=>array('registration')),
|
||||
array('mail','email','allowEmpty'=>false,'on'=>array('registration','')),
|
||||
array('mail','mail_exists','on'=>array('registration')),
|
||||
array('captcha','captcha','on'=>array('registration')),
|
||||
array('password','string','allowEmpty'=>false,'min'=>5,'on'=>array('registration')),
|
||||
array('password_confirm','compare','compareField'=>'password','on'=>array('registration')),
|
||||
);
|
||||
|
|
|
@ -28,7 +28,6 @@ $config['view']['img_resize_width'] = 570; // до какого размер
|
|||
$config['view']['img_max_width'] = 5000; // максимальная ширина загружаемых изображений в пикселях
|
||||
$config['view']['img_max_height'] = 5000; // максимальная высота загружаемых изображений в пикселях
|
||||
$config['view']['img_max_size_url'] = 500; // максимальный размер картинки в kB для загрузки по URL
|
||||
$config['view']['no_assign'] = array('db'); // список групп конфигурации, которые необходимо исключить из передачи во Viewer. Только для системного пользования.
|
||||
|
||||
/**
|
||||
* Настройки СЕО для вывода топиков
|
||||
|
@ -58,7 +57,12 @@ $config['pagination']['pages']['count'] = 4; // количес
|
|||
* и возможно придёться увеличить значение $config['path']['offset_request_url'] на число вложенных директорий,
|
||||
* например, для директории первой вложенности www.site.ru/livestreet/ поставить значение равное 1
|
||||
*/
|
||||
$config['path']['root']['web'] = 'http://'.$_SERVER['HTTP_HOST']; // полный WEB адрес сайта
|
||||
if (isset($_SERVER['HTTP_HOST'])) {
|
||||
$config['path']['root']['web'] = 'http://'.$_SERVER['HTTP_HOST']; // полный WEB адрес сайта
|
||||
} else {
|
||||
// for CLI scripts. or you can append "HTTP_HOST=http://yoursite.url" before script run command
|
||||
$config['path']['root']['web'] = null;
|
||||
}
|
||||
$config['path']['root']['server'] = dirname(dirname(__FILE__)); // полный путь до сайта в файловой системе
|
||||
/**
|
||||
* Для CLI режима использовать
|
||||
|
@ -78,6 +82,7 @@ $config['path']['smarty']['template'] = '___path.root.server___/templates/skin/_
|
|||
$config['path']['smarty']['compiled'] = '___path.root.server___/templates/compiled';
|
||||
$config['path']['smarty']['cache'] = '___path.root.server___/templates/cache';
|
||||
$config['path']['smarty']['plug'] = '___path.root.engine___/modules/viewer/plugs';
|
||||
$config['smarty']['compile_check'] = true; // Проверять или нет файлы шаблона на изменения перед компиляцией, false может значительно увеличить быстродействие, но потребует ручного удаления кеша при изменения шаблона
|
||||
/**
|
||||
* Настройки плагинов
|
||||
*/
|
||||
|
@ -116,7 +121,7 @@ $config['sys']['mail']['include_talk'] = true; // Вклю
|
|||
*/
|
||||
// Устанавливаем настройки кеширования
|
||||
$config['sys']['cache']['use'] = true; // использовать кеширование или нет
|
||||
$config['sys']['cache']['type'] = 'file'; // тип кеширования: file и memory. memory использует мемкеш
|
||||
$config['sys']['cache']['type'] = 'file'; // тип кеширования: file, xcache и memory. memory использует мемкеш, xcache - использует XCache
|
||||
$config['sys']['cache']['dir'] = '___path.root.server___/tmp/'; // каталог для файлового кеша, также используется для временных картинок. По умолчанию подставляем каталог для хранения сессий
|
||||
$config['sys']['cache']['prefix'] = 'livestreet_cache'; // префикс кеширования, чтоб можно было на одной машине держать несколько сайтов с общим кешевым хранилищем
|
||||
$config['sys']['cache']['directory_level'] = 1; // уровень вложенности директорий файлового кеша
|
||||
|
@ -186,6 +191,8 @@ $config['module']['blog']['avatar_size'] = array(100,64,48,24,0); // Списо
|
|||
$config['module']['topic']['new_time'] = 60*60*24*1; // Время в секундах в течении которого топик считается новым
|
||||
$config['module']['topic']['per_page'] = 10; // Число топиков на одну страницу
|
||||
$config['module']['topic']['max_length'] = 15000; // Максимальное количество символов в одном топике
|
||||
$config['module']['topic']['link_max_length'] = 500; // Максимальное количество символов в одном топике-ссылке
|
||||
$config['module']['topic']['question_max_length'] = 500;// Максимальное количество символов в одном топике-опросе
|
||||
$config['module']['topic']['allow_empty_tags'] = false; // Разрешать или нет не заполнять теги
|
||||
// Модуль User
|
||||
$config['module']['user']['per_page'] = 15; // Число юзеров на страницу на странице статистики и в профиле пользователя
|
||||
|
@ -196,12 +203,15 @@ $config['module']['user']['friend_notice']['reject'] = false; // Отправи
|
|||
$config['module']['user']['avatar_size'] = array(100,64,48,24,0); // Список размеров аватаров у пользователя. 0 - исходный размер
|
||||
$config['module']['user']['login']['min_size'] = 3; // Минимальное количество символов в логине
|
||||
$config['module']['user']['login']['max_size'] = 30; // Максимальное количество символов в логине
|
||||
$config['module']['user']['login']['charset'] = '0-9a-z_\-'; // Допустимые в имени пользователя символы
|
||||
$config['module']['user']['time_active'] = 60*60*24*7; // Число секунд с момента последнего посещения пользователем сайта, в течение которых он считается активным
|
||||
$config['module']['user']['usernote_text_max'] = 250; // Максимальный размер заметки о пользователе
|
||||
$config['module']['user']['usernote_per_page'] = 20; // Число заметок на одну страницу
|
||||
$config['module']['user']['userfield_max_identical'] = 2; // Максимальное число контактов одного типа
|
||||
$config['module']['user']['profile_photo_width'] = 250; // ширина квадрата фотографии в профиле, px
|
||||
$config['module']['user']['name_max'] = 30; // максимальная длинна имени в профиле пользователя
|
||||
$config['module']['user']['captcha_use_registration'] = true; // проверять поле капчи при регистрации пользователя
|
||||
|
||||
// Модуль Comment
|
||||
$config['module']['comment']['per_page'] = 20; // Число комментариев на одну страницу(это касается только полного списка комментариев прямого эфира)
|
||||
$config['module']['comment']['bad'] = -5; // Рейтинг комментария, начиная с которого он будет скрыт
|
||||
|
@ -212,10 +222,6 @@ $config['module']['comment']['nested_page_reverse'] = true; // Определя
|
|||
$config['module']['comment']['favourite_target_allow'] = array('topic'); // Список типов комментов, которые разрешено добавлять в избранное
|
||||
// Модуль Talk
|
||||
$config['module']['talk']['per_page'] = 30; // Число приватных сообщений на одну страницу
|
||||
$config['module']['talk']['reload'] = false;
|
||||
$config['module']['talk']['request'] = 60;
|
||||
$config['module']['talk']['period'] = 20000;
|
||||
$config['module']['talk']['max_errors'] = 4;
|
||||
$config['module']['talk']['encrypt'] = 'livestreet'; // Ключ XXTEA шифрования идентификаторов в ссылках
|
||||
$config['module']['talk']['max_users'] = 15; // Максимальное число адресатов в одном личном сообщении
|
||||
// Модуль Lang
|
||||
|
@ -251,7 +257,6 @@ $config['module']['image']['foto']['round_corner'] = false;
|
|||
$config['module']['image']['topic']['watermark_use'] = false;
|
||||
$config['module']['image']['topic']['round_corner'] = false;
|
||||
// Модуль Security
|
||||
$config['module']['security']['key'] = "livestreet_security_key"; // ключ сессии для хранения security-кода
|
||||
$config['module']['security']['hash'] = "livestreet_security_key"; // "примесь" к строке, хешируемой в качестве security-кода
|
||||
|
||||
$config['module']['userfeed']['count_default'] = 10; // Число топиков в ленте по умолчанию
|
||||
|
@ -521,7 +526,7 @@ $config['head']['default']['js'] = array(
|
|||
$config['head']['default']['css'] = array(
|
||||
"___path.static.skin___/css/reset.css",
|
||||
"___path.root.engine_lib___/external/jquery/markitup/skins/simple/style.css",
|
||||
"___path.root.engine_lib___/external/jquery/markitup/sets/default/style.css",
|
||||
"___path.root.engine_lib___/external/jquery/markitup/sets/default/style.css",
|
||||
"___path.root.engine_lib___/external/jquery/jcrop/jquery.Jcrop.css",
|
||||
"___path.root.engine_lib___/external/prettify/prettify.css",
|
||||
"___path.static.skin___/css/main.css",
|
||||
|
|
|
@ -161,6 +161,12 @@ return array(
|
|||
array('±', '©', '©', '®', '©', '©', '®')
|
||||
)
|
||||
),
|
||||
// Список допустимых протоколов для ссылок
|
||||
'cfgSetLinkProtocolAllow' => array(
|
||||
array(
|
||||
array('http','https','ftp')
|
||||
)
|
||||
),
|
||||
'cfgSetTagNoTypography' => array(
|
||||
array(
|
||||
array('code','video','object')
|
||||
|
@ -169,7 +175,7 @@ return array(
|
|||
// Теги, после которых необходимо пропускать одну пробельную строку
|
||||
'cfgSetTagBlockType' => array(
|
||||
array(
|
||||
array('h4','h5','h6','ol','ul','blockquote','pre')
|
||||
array('h4','h5','h6','ol','ul','blockquote','pre','table','iframe')
|
||||
)
|
||||
),
|
||||
'cfgSetTagCallbackFull' => array(
|
||||
|
|
|
@ -111,7 +111,7 @@ abstract class Action extends LsObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* Добавляет евент в экшен, используя регулярное вырожение для евента и параметров
|
||||
* Добавляет евент в экшен, используя регулярное выражение для евента и параметров
|
||||
*
|
||||
*/
|
||||
protected function AddEventPreg() {
|
||||
|
|
|
@ -363,11 +363,18 @@ class Engine extends LsObject {
|
|||
*
|
||||
* @param string $sModuleClass Класс модуля
|
||||
* @param bool $bInit Инициализировать модуль или нет
|
||||
*
|
||||
* @throws RuntimeException если класс $sModuleClass не существует
|
||||
*
|
||||
* @return Module
|
||||
*/
|
||||
public function LoadModule($sModuleClass,$bInit=false) {
|
||||
$tm1=microtime(true);
|
||||
|
||||
if (!class_exists($sModuleClass))
|
||||
{
|
||||
throw new RuntimeException(sprintf('Class "%s" not found!', $sModuleClass));
|
||||
}
|
||||
/**
|
||||
* Создаем объект модуля
|
||||
*/
|
||||
|
@ -1149,7 +1156,7 @@ class LS extends LsObject {
|
|||
*
|
||||
* @return Engine
|
||||
*/
|
||||
public function E() {
|
||||
static public function E() {
|
||||
return Engine::GetInstance();
|
||||
}
|
||||
/**
|
||||
|
@ -1160,7 +1167,7 @@ class LS extends LsObject {
|
|||
* @param array $aParams Параметры для передачи в конструктор
|
||||
* @return Entity
|
||||
*/
|
||||
public function Ent($sName,$aParams=array()) {
|
||||
static public function Ent($sName,$aParams=array()) {
|
||||
return Engine::GetEntity($sName,$aParams);
|
||||
}
|
||||
/**
|
||||
|
@ -1172,7 +1179,7 @@ class LS extends LsObject {
|
|||
* @param DbSimple_Mysql|null $oConnect Объект коннекта к БД
|
||||
* @return mixed
|
||||
*/
|
||||
public function Mpr($sClassName,$sName=null,$oConnect=null) {
|
||||
static public function Mpr($sClassName,$sName=null,$oConnect=null) {
|
||||
return Engine::GetMapper($sClassName,$sName,$oConnect);
|
||||
}
|
||||
/**
|
||||
|
@ -1181,7 +1188,7 @@ class LS extends LsObject {
|
|||
*
|
||||
* @return ModuleUser_EntityUser
|
||||
*/
|
||||
public function CurUsr() {
|
||||
static public function CurUsr() {
|
||||
return self::E()->User_GetUserCurrent();
|
||||
}
|
||||
/**
|
||||
|
@ -1191,7 +1198,7 @@ class LS extends LsObject {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function Adm() {
|
||||
static public function Adm() {
|
||||
return self::CurUsr() && self::CurUsr()->isAdministrator();
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -530,8 +530,13 @@ abstract class EntityORM extends Entity {
|
|||
$mCmdArgs=$iPrimaryKeyValue;
|
||||
break;
|
||||
case self::RELATION_TYPE_HAS_MANY :
|
||||
if (isset($this->aRelations[$sKey][3])) {
|
||||
$aFilterAdd=$this->aRelations[$sKey][3];
|
||||
} else {
|
||||
$aFilterAdd=array();
|
||||
}
|
||||
$sCmd="{$sRelPluginPrefix}{$sRelModuleName}_get{$sRelEntityName}ItemsByFilter";
|
||||
$mCmdArgs=array($sRelationKey => $iPrimaryKeyValue);
|
||||
$mCmdArgs=array_merge(array($sRelationKey => $iPrimaryKeyValue),$aFilterAdd);
|
||||
break;
|
||||
case self::RELATION_TYPE_MANY_TO_MANY :
|
||||
$sCmd="{$sRelPluginPrefix}Module{$sRelModuleName}_get{$sRelEntityName}ItemsByJoinTable";
|
||||
|
|
|
@ -77,6 +77,13 @@ class LS_ManyToManyRelation extends LsObject {
|
|||
unset($this->_aCollection[$iId]);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Удаляет все объекты
|
||||
*/
|
||||
public function clear() {
|
||||
$this->bUpdated = true;
|
||||
$this->_aCollection=array();
|
||||
}
|
||||
/**
|
||||
* Возвращает список объектов связи
|
||||
*
|
||||
|
|
|
@ -129,9 +129,9 @@ class MapperORM extends Mapper {
|
|||
$sTableName = self::GetTableName($sEntityFull);
|
||||
|
||||
list($aFilterFields,$sFilterFields)=$this->BuildFilter($aFilter,$oEntitySample);
|
||||
list($sOrder,$sLimit)=$this->BuildFilterMore($aFilter,$oEntitySample);
|
||||
list($sOrder,$sLimit,$sGroup)=$this->BuildFilterMore($aFilter,$oEntitySample);
|
||||
|
||||
$sql = "SELECT * FROM ".$sTableName." WHERE 1=1 {$sFilterFields} {$sOrder} {$sLimit} ";
|
||||
$sql = "SELECT * FROM ".$sTableName." WHERE 1=1 {$sFilterFields} {$sGroup} {$sOrder} {$sLimit} ";
|
||||
$aQueryParams=array_merge(array($sql),array_values($aFilterFields));
|
||||
$aItems=array();
|
||||
if($aRows=call_user_func_array(array($this->oDb,'select'),$aQueryParams)) {
|
||||
|
@ -231,7 +231,7 @@ class MapperORM extends Mapper {
|
|||
$sFilterFields='';
|
||||
foreach ($aFilterFields as $k => $v) {
|
||||
$aK=explode(' ',trim($k));
|
||||
$sFieldCurrent=$aK[0];
|
||||
$sFieldCurrent=$this->oDb->escape($aK[0],true);
|
||||
$sConditionCurrent=' = ';
|
||||
if (count($aK)>1) {
|
||||
$sConditionCurrent=strtolower($aK[1]);
|
||||
|
@ -273,7 +273,7 @@ class MapperORM extends Mapper {
|
|||
} elseif (!in_array($value,array('asc','desc'))) {
|
||||
$value='asc';
|
||||
}
|
||||
$key = $oEntitySample->_getField($key);
|
||||
$key = $this->oDb->escape($oEntitySample->_getField($key),true);
|
||||
$sOrder.=" {$key} {$value},";
|
||||
}
|
||||
$sOrder=trim($sOrder,',');
|
||||
|
@ -305,7 +305,23 @@ class MapperORM extends Mapper {
|
|||
}
|
||||
$sLimit="LIMIT {$iBegin}, {$iEnd}";
|
||||
}
|
||||
return array($sOrder,$sLimit);
|
||||
|
||||
// Группировка
|
||||
$sGroup='';
|
||||
if (isset($aFilter['#group'])) {
|
||||
if(!is_array($aFilter['#group'])) {
|
||||
$aFilter['#group'] = array($aFilter['#group']);
|
||||
}
|
||||
foreach ($aFilter['#group'] as $sField) {
|
||||
$sField = $this->oDb->escape($oEntitySample->_getField($sField),true);
|
||||
$sGroup.=" {$sField},";
|
||||
}
|
||||
$sGroup=trim($sGroup,',');
|
||||
if ($sGroup!='') {
|
||||
$sGroup="GROUP BY {$sGroup}";
|
||||
}
|
||||
}
|
||||
return array($sOrder,$sLimit,$sGroup);
|
||||
}
|
||||
/**
|
||||
* Список колонок/полей сущности
|
||||
|
@ -381,8 +397,12 @@ class MapperORM extends Mapper {
|
|||
* Варианты таблиц:
|
||||
* prefix_user -> если модуль совпадает с сущностью
|
||||
* prefix_user_invite -> если модуль не сопадает с сущностью
|
||||
* Если сущность плагина:
|
||||
* prefix_pluginname_user
|
||||
* prefix_pluginname_user_invite
|
||||
*/
|
||||
$sClass = Engine::getInstance()->Plugin_GetDelegater('entity', is_object($oEntity)?get_class($oEntity):$oEntity);
|
||||
$sPluginName = func_underscore(Engine::GetPluginName($sClass));
|
||||
$sModuleName = func_underscore(Engine::GetModuleName($sClass));
|
||||
$sEntityName = func_underscore(Engine::GetEntityName($sClass));
|
||||
if (strpos($sEntityName,$sModuleName)===0) {
|
||||
|
@ -390,6 +410,16 @@ class MapperORM extends Mapper {
|
|||
} else {
|
||||
$sTable=func_underscore($sModuleName).'_'.func_underscore($sEntityName);
|
||||
}
|
||||
if ($sPluginName) {
|
||||
$sTablePlugin=$sPluginName.'_'.$sTable;
|
||||
/**
|
||||
* Для обратной совместимости с 1.0.1
|
||||
* Если такая таблица определена в конфиге, то ок, если нет, то используем старый вариант без имени плагина
|
||||
*/
|
||||
if (Config::Get('db.table.'.$sTablePlugin)) {
|
||||
$sTable=$sTablePlugin;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Если название таблиц переопределено в конфиге, то возвращаем его
|
||||
*/
|
||||
|
|
|
@ -611,51 +611,51 @@ abstract class ModuleORM extends Module {
|
|||
* @return mixed
|
||||
*/
|
||||
public function __call($sName,$aArgs) {
|
||||
if (preg_match("@^add([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^add([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_AddEntity($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^update([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^update([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_UpdateEntity($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^save([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^save([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_SaveEntity($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^delete([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^delete([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_DeleteEntity($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^reload([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^reload([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_ReloadEntity($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^showcolumnsfrom([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^showcolumnsfrom([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_ShowColumnsFrom($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^showprimaryindexfrom([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^showprimaryindexfrom([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_ShowPrimaryIndexFrom($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^getchildrenof([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^getchildrenof([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_GetChildrenOfEntity($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^getparentof([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^getparentof([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_GetParentOfEntity($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^getdescendantsof([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^getdescendantsof([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_GetDescendantsOfEntity($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^getancestorsof([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^getancestorsof([a-z]+)$@i",$sName,$aMatch)) {
|
||||
return $this->_GetAncestorsOfEntity($aArgs[0]);
|
||||
}
|
||||
|
||||
if (preg_match("@^loadtreeof([\w]+)$@i",$sName,$aMatch)) {
|
||||
if (preg_match("@^loadtreeof([a-z]+)$@i",$sName,$aMatch)) {
|
||||
$sEntityFull = array_key_exists(1,$aMatch) ? $aMatch[1] : null;
|
||||
return $this->LoadTree($aArgs[0], $sEntityFull);
|
||||
}
|
||||
|
|
2
engine/console/.htaccess
Normal file
2
engine/console/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
|||
Order Deny,Allow
|
||||
Deny from all
|
|
@ -68,15 +68,16 @@ class PluginExample extends Plugin {
|
|||
/*
|
||||
$this->ExportSQL(dirname(__FILE__).'/deinstall.sql'); // Выполнить деактивационный sql, если надо.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Инициализация плагина
|
||||
public function Init() {
|
||||
$this->Viewer_AppendStyle(Plugin::GetTemplatePath(__CLASS__)."/css/style.css"); // Добавление своего CSS
|
||||
$this->Viewer_AppendScript(Plugin::GetTemplatePath(__CLASS__)."/js/script.js"); // Добавление своего JS
|
||||
$this->Viewer_AppendStyle(Plugin::GetTemplatePath(__CLASS__)."css/style.css"); // Добавление своего CSS
|
||||
$this->Viewer_AppendScript(Plugin::GetTemplatePath(__CLASS__)."js/script.js"); // Добавление своего JS
|
||||
|
||||
//$this->Viewer_AddMenu('blog',Plugin::GetTemplatePath(__CLASS__).'/menu.blog.tpl'); // например, задаем свой вид меню
|
||||
//$this->Viewer_AddMenu('blog',Plugin::GetTemplatePath(__CLASS__).'menu.blog.tpl'); // например, задаем свой вид меню
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* функция доступа к 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
|
||||
*
|
||||
|
@ -206,7 +219,8 @@ function func_encrypt($sData) {
|
|||
* @return unknown
|
||||
*/
|
||||
function func_getIp() {
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
// Если запускаем через консоль, то REMOTE_ADDR не определен
|
||||
return isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
|
||||
}
|
||||
|
||||
|
||||
|
|
24
engine/lib/external/Jevix/jevix.class.php
vendored
24
engine/lib/external/Jevix/jevix.class.php
vendored
|
@ -123,6 +123,8 @@ class Jevix{
|
|||
protected $tagsStack;
|
||||
protected $openedTag;
|
||||
protected $autoReplace; // Автозамена
|
||||
protected $linkProtocolAllow=array();
|
||||
protected $linkProtocolAllowDefault=array('http','https','ftp');
|
||||
protected $isXHTMLMode = true; // <br/>, <img/>
|
||||
protected $isAutoBrMode = true; // \n = <br/>
|
||||
protected $isAutoLinkMode = true;
|
||||
|
@ -371,6 +373,23 @@ class Jevix{
|
|||
$this->autoReplace = array('from' => $from, 'to' => $to);
|
||||
}
|
||||
|
||||
/**
|
||||
* Устанавливает список разрешенных протоколов для ссылок (http, ftp и т.п.)
|
||||
*
|
||||
* @param array $aProtocol Список протоколов
|
||||
* @param bool $bClearDefault Удалить дефолтные протоколы?
|
||||
*/
|
||||
function cfgSetLinkProtocolAllow($aProtocol, $bClearDefault=false){
|
||||
if (!is_array($aProtocol)) {
|
||||
$aProtocol=array($aProtocol);
|
||||
}
|
||||
if ($bClearDefault) {
|
||||
$this->linkProtocolAllow=$aProtocol;
|
||||
} else {
|
||||
$this->linkProtocolAllow=array_merge($this->linkProtocolAllowDefault,$aProtocol);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Включение или выключение режима XTML
|
||||
*
|
||||
|
@ -984,7 +1003,8 @@ class Jevix{
|
|||
continue(2);
|
||||
}
|
||||
// HTTP в начале если нет
|
||||
if(!preg_match('/^(http|https|ftp):\/\//ui', $value) && !preg_match('/^(\/|\#)/ui', $value) && !preg_match('/^(mailto):/ui', $value) ) $value = 'http://'.$value;
|
||||
$sProtocols=join('|',$this->linkProtocolAllow ? $this->linkProtocolAllow : $this->linkProtocolAllowDefault);
|
||||
if(!preg_match('/^('.$sProtocols.'):\/\//ui', $value) && !preg_match('/^(\/|\#)/ui', $value) && !preg_match('/^(mailto):/ui', $value) ) $value = 'http://'.$value;
|
||||
break;
|
||||
|
||||
case '#image':
|
||||
|
@ -1033,7 +1053,7 @@ class Jevix{
|
|||
|
||||
// Если тег обрабатывает "полным" колбеком
|
||||
if (isset($tagRules[self::TR_TAG_CALLBACK_FULL])) {
|
||||
$text = call_user_func($tagRules[self::TR_TAG_CALLBACK_FULL], $tag, $resParams);
|
||||
$text = call_user_func($tagRules[self::TR_TAG_CALLBACK_FULL], $tag, $resParams, $content);
|
||||
} else {
|
||||
// Собираем тег
|
||||
$text='<'.$tag;
|
||||
|
|
2
engine/lib/external/jquery/jquery.file.js
vendored
2
engine/lib/external/jquery/jquery.file.js
vendored
|
@ -29,7 +29,7 @@ jQuery.fn.file = function(options) {
|
|||
'display': 'none'
|
||||
}).appendTo('body');
|
||||
|
||||
var file = $('<div><form></form></div>').appendTo('body').css({
|
||||
var file = $('<div id="area-form-file-'+config.name+'"><form></form></div>').appendTo('body').css({
|
||||
'position': 'absolute',
|
||||
'overflow': 'hidden',
|
||||
'-moz-opacity': '0',
|
||||
|
|
4
engine/lib/external/kcaptcha/index.php
vendored
4
engine/lib/external/kcaptcha/index.php
vendored
|
@ -33,8 +33,8 @@ if(isset($_REQUEST[session_name()])){
|
|||
}
|
||||
|
||||
foreach ($_REQUEST as $key => $value) {
|
||||
if (preg_match("/^[\w\d]{5,40}$/",(string)$value)) {
|
||||
session_name($key);
|
||||
if (preg_match("/^.{5,100}$/",(string)$value)) {
|
||||
@session_name($key);
|
||||
session_start();
|
||||
break;
|
||||
}
|
||||
|
|
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
|
|
@ -191,12 +191,11 @@ class Config {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if(preg_match('~___([\S|\.|]+)___~Ui',$cfg))
|
||||
$cfg = preg_replace_callback(
|
||||
'~___([\S|\.]+)___~Ui',
|
||||
create_function('$value','return Config::Get($value[1],"'.$sInstance.'");'),
|
||||
$cfg
|
||||
);
|
||||
if(preg_match_all('~___([\S|\.]+)___~Ui',$cfg,$aMatch,PREG_SET_ORDER)) {
|
||||
foreach($aMatch as $aItem) {
|
||||
$cfg=str_replace('___'.$aItem[1].'___',Config::Get($aItem[1],$sInstance),$cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $cfg;
|
||||
}
|
||||
|
|
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
|
|
@ -74,7 +74,7 @@ class ModuleMessage extends Module {
|
|||
*/
|
||||
public function Shutdown() {
|
||||
/**
|
||||
* Добавляем в сессию те соощения, которые были отмечены для сессионого использования
|
||||
* Добавляем в сессию те сообщения, которые были отмечены для сессионного использования
|
||||
*/
|
||||
$this->Session_Set('message_notice_session', $this->GetNoticeSession());
|
||||
$this->Session_Set('message_error_session', $this->GetErrorSession());
|
||||
|
@ -87,7 +87,7 @@ class ModuleMessage extends Module {
|
|||
*
|
||||
* @param string $sMsg Сообщение
|
||||
* @param string $sTitle Заголовок
|
||||
* @param bool $bUseSession Показать сообщение при следующем обращии пользователя к сайту
|
||||
* @param bool $bUseSession Показать сообщение при следующем обращении пользователя к сайту
|
||||
*/
|
||||
public function AddError($sMsg,$sTitle=null,$bUseSession=false) {
|
||||
if(!$bUseSession) {
|
||||
|
@ -97,11 +97,11 @@ class ModuleMessage extends Module {
|
|||
}
|
||||
}
|
||||
/**
|
||||
* Создаёт идинственное сообщение об ошибке(т.е. очищает все предыдущие)
|
||||
* Создаёт единственное сообщение об ошибке(т.е. очищает все предыдущие)
|
||||
*
|
||||
* @param string $sMsg Сообщение
|
||||
* @param string $sTitle Заголовок
|
||||
* @param bool $bUseSession Показать сообщение при следующем обращии пользователя к сайту
|
||||
* @param bool $bUseSession Показать сообщение при следующем обращении пользователя к сайту
|
||||
*/
|
||||
public function AddErrorSingle($sMsg,$sTitle=null,$bUseSession=false) {
|
||||
$this->ClearError();
|
||||
|
@ -112,7 +112,7 @@ class ModuleMessage extends Module {
|
|||
*
|
||||
* @param string $sMsg Сообщение
|
||||
* @param string $sTitle Заголовок
|
||||
* @param bool $bUseSession Показать сообщение при следующем обращии пользователя к сайту
|
||||
* @param bool $bUseSession Показать сообщение при следующем обращении пользователя к сайту
|
||||
*/
|
||||
public function AddNotice($sMsg,$sTitle=null,$bUseSession=false) {
|
||||
if(!$bUseSession) {
|
||||
|
@ -122,11 +122,11 @@ class ModuleMessage extends Module {
|
|||
}
|
||||
}
|
||||
/**
|
||||
* Создаёт идинственное сообщение, удаляя предыдущие
|
||||
* Создаёт единственное сообщение, удаляя предыдущие
|
||||
*
|
||||
* @param string $sMsg Сообщение
|
||||
* @param string $sTitle Заголовок
|
||||
* @param bool $bUseSession Показать сообщение при следующем обращии пользователя к сайту
|
||||
* @param bool $bUseSession Показать сообщение при следующем обращении пользователя к сайту
|
||||
*/
|
||||
public function AddNoticeSingle($sMsg,$sTitle=null,$bUseSession=false) {
|
||||
$this->ClearNotice();
|
||||
|
|
|
@ -96,7 +96,7 @@ class ModulePlugin extends Module {
|
|||
$this->Xlang($oXml,'name',$sLang);
|
||||
$this->Xlang($oXml,'author',$sLang);
|
||||
$this->Xlang($oXml,'description',$sLang);
|
||||
$oXml->homepage=$this->Text_Parser($oXml->homepage);
|
||||
$oXml->homepage=$this->Text_Parser((string)$oXml->homepage);
|
||||
$oXml->settings=preg_replace('/{([^}]+)}/',Router::GetPath('$1'),$oXml->settings);
|
||||
|
||||
$this->aPluginsList[$sPlugin]['property']=$oXml;
|
||||
|
@ -354,6 +354,7 @@ class ModulePlugin extends Module {
|
|||
|
||||
$aActivePlugins=$this->GetActivePlugins();
|
||||
foreach ($aPlugins as $sPluginCode) {
|
||||
if (!is_string($sPluginCode)) continue;
|
||||
/**
|
||||
* Если плагин активен, деактивируем его
|
||||
*/
|
||||
|
|
|
@ -31,14 +31,14 @@
|
|||
*/
|
||||
class ModuleValidate_EntityValidatorEmail extends ModuleValidate_EntityValidator {
|
||||
/**
|
||||
* Регулярное вырожение для проверки емайла
|
||||
* Регулярное выражение для проверки емайла
|
||||
*
|
||||
* @var string
|
||||
* @see http://www.regular-expressions.info/email.html
|
||||
*/
|
||||
public $pattern='/^[a-zA-Z0-9!#$%&\'*+\\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&\'*+\\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/';
|
||||
/**
|
||||
* Регулярное вырожение для проверки емайла с именем отправителя.
|
||||
* Регулярное выражение для проверки емайла с именем отправителя.
|
||||
* Используется только при allowName = true
|
||||
*
|
||||
* @var string
|
||||
|
|
|
@ -67,13 +67,13 @@ class ModuleValidate_EntityValidatorNumber extends ModuleValidate_EntityValidato
|
|||
*/
|
||||
public $msgTooSmall;
|
||||
/**
|
||||
* Регулярное вырожение для целого числа
|
||||
* Регулярное выражение для целого числа
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $integerPattern='/^\s*[+-]?\d+\s*$/';
|
||||
/**
|
||||
* Регулярное вырожение для числа, допускается дробное
|
||||
* Регулярное выражение для числа, допускается дробное
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
|
|
@ -202,11 +202,12 @@ class ModuleViewer extends Module {
|
|||
$this->sHtmlDescription=Config::Get('view.description');
|
||||
|
||||
/**
|
||||
* Создаём объект Smarty и устанавливаем необходиму параметры
|
||||
* Создаём объект Smarty и устанавливаем необходимые параметры
|
||||
*/
|
||||
$this->oSmarty = $this->CreateSmartyObject();
|
||||
$this->oSmarty->error_reporting=error_reporting()^E_NOTICE; // подавляем NOTICE ошибки - в этом вся прелесть смарти )
|
||||
$this->oSmarty->error_reporting=error_reporting() & ~E_NOTICE; // подавляем NOTICE ошибки - в этом вся прелесть смарти )
|
||||
$this->oSmarty->setTemplateDir(array_merge((array)Config::Get('path.smarty.template'),array(Config::Get('path.root.server').'/plugins/')));
|
||||
$this->oSmarty->compile_check=Config::Get('smarty.compile_check');
|
||||
/**
|
||||
* Для каждого скина устанавливаем свою директорию компиляции шаблонов
|
||||
*/
|
||||
|
@ -214,7 +215,8 @@ class ModuleViewer extends Module {
|
|||
if(!is_dir($sCompilePath)) @mkdir($sCompilePath);
|
||||
$this->oSmarty->setCompileDir($sCompilePath);
|
||||
$this->oSmarty->setCacheDir(Config::Get('path.smarty.cache'));
|
||||
$this->oSmarty->setPluginsDir(array_merge(array(Config::Get('path.smarty.plug'),'plugins'),$this->oSmarty->getPluginsDir()));
|
||||
$this->oSmarty->addPluginsDir(array(Config::Get('path.smarty.plug'),'plugins'));
|
||||
$this->oSmarty->default_template_handler_func=array($this,'SmartyDefaultTemplateHandler');
|
||||
/**
|
||||
* Получаем настройки JS, CSS файлов
|
||||
*/
|
||||
|
@ -282,7 +284,7 @@ class ModuleViewer extends Module {
|
|||
$this->Assign("sHtmlDescription",htmlspecialchars($this->sHtmlDescription));
|
||||
$this->Assign("aHtmlHeadFiles",$this->aHtmlHeadFiles);
|
||||
$this->Assign("aHtmlRssAlternate",$this->aHtmlRssAlternate);
|
||||
$this->Assign("sHtmlCanonical",$this->sHtmlCanonical);
|
||||
$this->Assign("sHtmlCanonical",$this->Tools_Urlspecialchars($this->sHtmlCanonical));
|
||||
/**
|
||||
* Загружаем список активных плагинов
|
||||
*/
|
||||
|
@ -1029,13 +1031,12 @@ class ModuleViewer extends Module {
|
|||
* использует файловое кеширование
|
||||
*
|
||||
* @param array $aFiles Список файлов
|
||||
* @param string $sType Тип файло - js, css
|
||||
* @param string $sType Тип файла - js, css
|
||||
* @return array
|
||||
*/
|
||||
protected function Compress($aFiles,$sType) {
|
||||
$sCacheDir = $this->sCacheDir."/".Config::Get('view.skin');
|
||||
$sCacheName = $sCacheDir."/".md5(serialize($aFiles).'_head').".{$sType}";
|
||||
$sPathServer = Config::Get('path.root.server');
|
||||
$sPathWeb = Config::Get('path.root.web');
|
||||
/**
|
||||
* Если кеш существует, то берем из кеша
|
||||
|
@ -1054,7 +1055,7 @@ class ModuleViewer extends Module {
|
|||
ob_start();
|
||||
foreach ($aFiles as $sFile) {
|
||||
// если файл локальный
|
||||
if (strpos($sFile,Config::Get('path.root.web'))!==false) {
|
||||
if (strpos($sFile, $sPathWeb)!==false) {
|
||||
$sFile=$this->GetServerPath($sFile);
|
||||
}
|
||||
list($sFile,)=explode('?',$sFile,2);
|
||||
|
@ -1364,7 +1365,7 @@ class ModuleViewer extends Module {
|
|||
'iCurrentPage' => $iCurrentPage,
|
||||
'iNextPage' => $iNextPage,
|
||||
'iPrevPage' => $iPrevPage,
|
||||
'sBaseUrl' => rtrim($sBaseUrl,'/'),
|
||||
'sBaseUrl' => rtrim($this->Tools_Urlspecialchars($sBaseUrl),'/'),
|
||||
'sGetParams' => $sGetParams,
|
||||
);
|
||||
/**
|
||||
|
@ -1393,6 +1394,42 @@ class ModuleViewer extends Module {
|
|||
$this->aMenuFetch[$sContainer]=$this->Fetch($sTemplate);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Обработка поиска файла шаблона, если его не смог найти шаблонизатор Smarty
|
||||
*
|
||||
* @param string $sType Тип шаблона/ресурса
|
||||
* @param string $sName Имя шаблона - имя файла
|
||||
* @param string $sContent Возврат содержания шаблона при return true;
|
||||
* @param int $iTimestamp Возврат даты модификации шаблона при return true;
|
||||
* @param Smarty $oSmarty Объект Smarty
|
||||
* @return string|bool
|
||||
*/
|
||||
public function SmartyDefaultTemplateHandler($sType,$sName,&$sContent,&$iTimestamp,$oSmarty) {
|
||||
/**
|
||||
* Название шаблона может содержать, как полный путь до файла шаблона, так и относительный любого из каталога в $oSmarty->getTemplateDir()
|
||||
* По дефолту каталоги такие: /templates/skin/[name]/ и /plugins/
|
||||
*/
|
||||
/**
|
||||
* Задача: если это файл плагина для текущего шаблона, то смотрим этот же файл шаблона плагина в /default/
|
||||
*/
|
||||
if (Config::Get('view.skin')!='default') {
|
||||
// /root/plugins/[plugin name]/templates/skin/[skin name]/dir/test.tpl
|
||||
if (preg_match('@^'.preg_quote(Config::Get('path.root.server')).'/plugins/([\w\-_]+)/templates/skin/'.preg_quote(Config::Get('view.skin')).'/@i',$sName,$aMatch)) {
|
||||
$sFile=str_replace($aMatch[0],Config::Get('path.root.server').'/plugins/'.$aMatch[1].'/templates/skin/default/',$sName);
|
||||
if ($this->TemplateExists($sFile)) {
|
||||
return $sFile;
|
||||
}
|
||||
}
|
||||
// [plugin name]/templates/skin/[skin name]/dir/test.tpl
|
||||
if (preg_match('@^([\w\-_]+)/templates/skin/'.preg_quote(Config::Get('view.skin')).'/@i',$sName,$aMatch)) {
|
||||
$sFile=Config::Get('path.root.server').'/plugins/'.str_replace($aMatch[0],$aMatch[1].'/templates/skin/default/',$sName);
|
||||
if ($this->TemplateExists($sFile)) {
|
||||
return $sFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Загружаем переменные в шаблон при завершении модуля
|
||||
*
|
||||
|
|
|
@ -28,7 +28,7 @@ return array(
|
|||
'error_db_saved'=>'Unable to save data into the DB.',
|
||||
'error_db_no_data'=>"Unable to get data from the DB.",
|
||||
|
||||
'error_local_config_invalid'=>"Can't find local configuration file - config.local.php.",
|
||||
'error_local_config_invalid'=>"Can't find local configuration file - /config/config.local.php.",
|
||||
|
||||
'site_name_invalid'=>'Chosen site name is not allowed.',
|
||||
'site_description_invalid'=>'Chosen site description is not allowed.',
|
||||
|
@ -55,7 +55,7 @@ return array(
|
|||
'install_title'=>'LiveStreet Installation',
|
||||
'step'=>'Step',
|
||||
|
||||
'start_paragraph'=>'<p>Welcome to LiveStreet © 1.0.1 installation. </p><p><b>Notice:</b> You have to rename file - /config/config.local.php.dist to config.local.php and apply read-write (rw) permision to it.</p><p><b>Notice:</b> Make sure that the following directories have rw permissions: /tmp, /logs, /uploads, /templates/compiled, /templates/cache</p>',
|
||||
'start_paragraph'=>'<p>Welcome to LiveStreet © 1.0.1 installation. </p><p><b>Notice:</b> You have to rename file - /config/config.local.php.dist to /config/config.local.php and apply read-write (rw) permision to it.</p><p><b>Notice:</b> Make sure that the following directories have rw permissions: /tmp, /logs, /uploads, /templates/compiled, /templates/cache</p>',
|
||||
|
||||
'php_params'=>'General PHP Configuration',
|
||||
'php_params_version'=>'PHP ver. 5.2.0 or higher',
|
||||
|
@ -65,7 +65,7 @@ return array(
|
|||
'php_params_simplexml'=>'SimpleXML support',
|
||||
|
||||
'local_config'=>'Local Configuration',
|
||||
'local_config_file'=>'File config.local.php exists and writable',
|
||||
'local_config_file'=>'File /config/config.local.php exists and writable',
|
||||
'local_temp_dir'=>'Directory /tmp exists and writable',
|
||||
'local_logs_dir'=>'Directory /logs exists and writable',
|
||||
'local_uploads_dir'=>'Directory /uploads exists and writable',
|
||||
|
|
|
@ -28,7 +28,7 @@ return array(
|
|||
'error_db_saved'=>'Не удалось сохранить данные в базе.',
|
||||
'error_db_no_data'=>"Не удалось получить данные из базы.",
|
||||
|
||||
'error_local_config_invalid'=>'Файл локальной конфигурации config.local.php не найден.',
|
||||
'error_local_config_invalid'=>'Файл локальной конфигурации /config/config.local.php не найден.',
|
||||
|
||||
'site_name_invalid'=>'Указано недопустимое название сайта.',
|
||||
'site_description_invalid'=>'Указано недопустимое описание сайта.',
|
||||
|
@ -55,7 +55,7 @@ return array(
|
|||
'install_title'=>'Установка LiveStreet',
|
||||
'step'=>'Шаг',
|
||||
|
||||
'start_paragraph'=>'<p>Добро пожаловать в инсталлятор LiveStreet © 1.0.1. Ознакомьтесь с результатами и следуйте подсказкам.</p><p><b>Внимание.</b> Для успешной иснталяции вы должны переименовать файл /config/config.local.php.dist на config.local.php и дать этому файлу права на запись.</p><p><b>Внимание.</b> Директории /tmp, /logs, /uploads, /templates/compiled, /templates/cache должны иметь права на запись.</p>',
|
||||
'start_paragraph'=>'<p>Добро пожаловать в инсталлятор LiveStreet © 1.0.1. Ознакомьтесь с результатами и следуйте подсказкам.</p><p><b>Внимание.</b> Для успешной иснталяции вы должны переименовать файл /config/config.local.php.dist на /config/config.local.php и дать этому файлу права на запись.</p><p><b>Внимание.</b> Директории /tmp, /logs, /uploads, /templates/compiled, /templates/cache должны иметь права на запись.</p>',
|
||||
|
||||
'php_params'=>'Основные настройки PHP',
|
||||
'php_params_version'=>'PHP версии не ниже 5.2.0',
|
||||
|
@ -65,7 +65,7 @@ return array(
|
|||
'php_params_simplexml'=>'Поддержка SimpleXML',
|
||||
|
||||
'local_config'=>'Локальная конфигурация',
|
||||
'local_config_file'=>'Файл config.local.php существует и доступен для записи',
|
||||
'local_config_file'=>'Файл /config/config.local.php существует и доступен для записи',
|
||||
'local_temp_dir'=>'Директория /tmp существует и доступна для записи',
|
||||
'local_logs_dir'=>'Директория /logs существует и доступна для записи',
|
||||
'local_uploads_dir'=>'Директория /uploads существует и доступна для записи',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Options -Indexes
|
||||
<Files ~ "\.tpl$">
|
||||
<Files ~ "(\.tpl)|(\.php)$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
|
@ -1184,27 +1184,27 @@ return array(
|
|||
'0' => '[UTC] Western European Time, Greenwich Mean Time',
|
||||
'1' => '[UTC + 1] Central European Time, West African Time',
|
||||
'2' => '[UTC + 2] Eastern European Time, Central African Time',
|
||||
'3' => '[UTC + 3] Moscow Standard Time, Eastern African Time',
|
||||
'3' => '[UTC + 3] Eastern African Time',
|
||||
'3.5' => '[UTC + 3:30] Iran Standard Time',
|
||||
'4' => '[UTC + 4] Gulf Standard Time, Samara Standard Time',
|
||||
'4' => '[UTC + 4] Moscow Time, Gulf Standard Time',
|
||||
'4.5' => '[UTC + 4:30] Afghanistan Time',
|
||||
'5' => '[UTC + 5] Pakistan Standard Time, Yekaterinburg Standard Time',
|
||||
'5' => '[UTC + 5] Pakistan Standard Time, Samara Standard Time',
|
||||
'5.5' => '[UTC + 5:30] Indian Standard Time, Sri Lanka Time',
|
||||
'5.75' => '[UTC + 5:45] Nepal Time',
|
||||
'6' => '[UTC + 6] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time',
|
||||
'6' => '[UTC + 6] Bangladesh Time, Bhutan Time, Yekaterinburg Standard Time',
|
||||
'6.5' => '[UTC + 6:30] Cocos Islands Time, Myanmar Time',
|
||||
'7' => '[UTC + 7] Indochina Time, Krasnoyarsk Standard Time',
|
||||
'8' => '[UTC + 8] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time',
|
||||
'7' => '[UTC + 7] Indochina Time, Novosibirsk Time',
|
||||
'8' => '[UTC + 8] Chinese Standard Time, Australian Western Standard Time, Krasnoyarsk Time',
|
||||
'8.75' => '[UTC + 8:45] Southeastern Western Australia Standard Time',
|
||||
'9' => '[UTC + 9] Japan Standard Time, Korea Standard Time, Chita Standard Time',
|
||||
'9' => '[UTC + 9] Japan Standard Time, Korea Standard Time, Irkutsk Time',
|
||||
'9.5' => '[UTC + 9:30] Australian Central Standard Time',
|
||||
'10' => '[UTC + 10] Australian Eastern Standard Time, Vladivostok Standard Time',
|
||||
'10' => '[UTC + 10] Australian Eastern Standard Time, Chita Time',
|
||||
'10.5' => '[UTC + 10:30] Lord Howe Standard Time',
|
||||
'11' => '[UTC + 11] Solomon Island Time, Magadan Standard Time',
|
||||
'11' => '[UTC + 11] Solomon Island Time, Vladivostok Time',
|
||||
'11.5' => '[UTC + 11:30] Norfolk Island Time',
|
||||
'12' => '[UTC + 12] New Zealand Time, Fiji Time, Kamchatka Standard Time',
|
||||
'12' => '[UTC + 12] New Zealand Time, Fiji Time, Magadan Time',
|
||||
'12.75' => '[UTC + 12:45] Chatham Islands Time',
|
||||
'13' => '[UTC + 13] Tonga Time, Phoenix Islands Time',
|
||||
'13' => '[UTC + 13] Tonga Time, Phoenix Islands Time, Kamchatka Time',
|
||||
'14' => '[UTC + 14] Line Island Time'
|
||||
)
|
||||
);
|
||||
|
|
|
@ -628,7 +628,7 @@ return array(
|
|||
'settings_profile_mail_error_used' => 'Этот емайл уже занят',
|
||||
'settings_profile_mail_notice' => 'Ваш реальный почтовый адрес, на него будут приходить уведомления',
|
||||
'settings_profile_mail_change_from_notice' => 'На вашу старую почту отправлено подтверждение для смены емайла',
|
||||
'settings_profile_mail_change_to_notice' => 'Спасибо! <br/> На ваш новый емайл адрес отправлено еще одно подтверждение.',
|
||||
'settings_profile_mail_change_to_notice' => 'Спасибо! <br/> На ваш новый емайл адрес отправлено подтверждение для смены старого емайла.',
|
||||
'settings_profile_mail_change_ok' => 'Ваш емайл изменен на <b>%%mail%%</b>',
|
||||
'settings_profile_sex' => 'Пол',
|
||||
'settings_profile_sex_man' => 'мужской',
|
||||
|
@ -1185,26 +1185,26 @@ return array(
|
|||
'-1' => '[UTC − 1] Азорские острова, острова Зелёного мыса',
|
||||
'0' => '[UTC] Время по Гринвичу: Дублин, Лондон, Лиссабон, Эдинбург',
|
||||
'1' => '[UTC + 1] Берлин, Мадрид, Париж, Рим, Западная Центральная Африка',
|
||||
'2' => '[UTC + 2] Афины, Вильнюс, Киев, Минск, Рига, Таллин, Центральная Африка',
|
||||
'3' => '[UTC + 3] Волгоград, Москва, Самара, Санкт-Петербург',
|
||||
'2' => '[UTC + 2] Афины, Вильнюс, Киев, Рига, Таллин, Центральная Африка',
|
||||
'3' => '[UTC + 3] Калининград, Минск',
|
||||
'3.5' => '[UTC + 3:30] Тегеран',
|
||||
'4' => '[UTC + 4] Баку, Ереван, Тбилиси',
|
||||
'4' => '[UTC + 4] Волгоград, Москва, Самара, Санкт-Петербург, Баку, Ереван, Тбилиси',
|
||||
'4.5' => '[UTC + 4:30] Кабул',
|
||||
'5' => '[UTC + 5] Екатеринбург, Исламабад, Карачи, Оренбург, Ташкент',
|
||||
'5' => '[UTC + 5] Исламабад, Карачи, Оренбург, Ташкент',
|
||||
'5.5' => '[UTC + 5:30] Бомбей, Калькутта, Мадрас, Нью-Дели',
|
||||
'5.75' => '[UTC + 5:45] Катманду',
|
||||
'6' => '[UTC + 6] Алматы, Астана, Новосибирск, Омск',
|
||||
'6' => '[UTC + 6] Екатеринбург, Алматы, Астана',
|
||||
'6.5' => '[UTC + 6:30] Рангун',
|
||||
'7' => '[UTC + 7] Бангкок, Красноярск',
|
||||
'8' => '[UTC + 8] Гонконг, Иркутск, Пекин, Сингапур',
|
||||
'7' => '[UTC + 7] Бангкок, Новосибирск, Омск',
|
||||
'8' => '[UTC + 8] Гонконг, Красноярск, Пекин, Сингапур',
|
||||
'8.75' => '[UTC + 8:45] Юго-восточная Западная Австралия',
|
||||
'9' => '[UTC + 9] Токио, Сеул, Чита, Якутск',
|
||||
'9' => '[UTC + 9] Токио, Сеул, Иркутск',
|
||||
'9.5' => '[UTC + 9:30] Дарвин',
|
||||
'10' => '[UTC + 10] Владивосток, Канберра, Мельбурн, Сидней',
|
||||
'10' => '[UTC + 10] Чита, Якутск, Канберра, Мельбурн, Сидней',
|
||||
'10.5' => '[UTC + 10:30] Лорд-Хау',
|
||||
'11' => '[UTC + 11] Камчатка, Магадан, Сахалин, Соломоновы о-ва',
|
||||
'11' => '[UTC + 11] Владивосток, Соломоновы о-ва',
|
||||
'11.5' => '[UTC + 11:30] Остров Норфолк',
|
||||
'12' => '[UTC + 12] Новая Зеландия, Фиджи',
|
||||
'12' => '[UTC + 12] Камчатка, Магадан, Сахалин, Новая Зеландия, Фиджи',
|
||||
'12.75' => '[UTC + 12:45] Острова Чатем',
|
||||
'13' => '[UTC + 13] Острова Феникс, Тонга',
|
||||
'14' => '[UTC + 14] Остров Лайн'
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Русский языковой файл.
|
||||
* Содержит текстовки шаблона.
|
||||
*/
|
||||
* English language file.
|
||||
*/
|
||||
return array(
|
||||
'footer_menu_user_profile' => 'My profile',
|
||||
'footer_menu_user_quest_title' => 'You do',
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* English language file.
|
||||
*/
|
||||
* Русский языковой файл.
|
||||
* Содержит текстовки шаблона.
|
||||
*/
|
||||
return array(
|
||||
'footer_menu_user_profile' => 'Мой профиль',
|
||||
'footer_menu_user_quest_title' => 'Вы можете',
|
||||
|
|
Loading…
Reference in a new issue