mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-01 05:55:02 +03:00
небольшие фиксы избранного
This commit is contained in:
parent
d68e3d12f2
commit
7c3fa8986e
|
@ -88,7 +88,7 @@ class LsFavourite extends Module {
|
|||
}
|
||||
}
|
||||
/**
|
||||
* Смотрим каких топиков не было в кеше и делаем запрос в БД
|
||||
* Смотрим чего не было в кеше и делаем запрос в БД
|
||||
*/
|
||||
$aIdNeedQuery=array_diff($aTargetId,array_keys($aFavourite));
|
||||
$aIdNeedQuery=array_diff($aIdNeedQuery,$aIdNotNeedQuery);
|
||||
|
@ -99,7 +99,7 @@ class LsFavourite extends Module {
|
|||
* Добавляем к результату и сохраняем в кеш
|
||||
*/
|
||||
$aFavourite[$oFavourite->getTargetId()]=$oFavourite;
|
||||
$this->Cache_Set($oFavourite, "favourite_{$oFavourite->getTargetType()}_{$oFavourite->getTargetId()}_{$oFavourite->getFavouriterId()}", array(), 60*60*24*7);
|
||||
$this->Cache_Set($oFavourite, "favourite_{$oFavourite->getTargetType()}_{$oFavourite->getTargetId()}_{$sUserId}", array(), 60*60*24*7);
|
||||
$aIdNeedStore=array_diff($aIdNeedStore,array($oFavourite->getTargetId()));
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ class LsFavourite extends Module {
|
|||
return $aFavourite;
|
||||
}
|
||||
/**
|
||||
* Получить список голосований по списку айдишников, но используя единый кеш
|
||||
* Получить список избранного по списку айдишников, но используя единый кеш
|
||||
*
|
||||
* @param array $aTargetId
|
||||
* @param string $sTargetType
|
||||
|
@ -135,7 +135,7 @@ class LsFavourite extends Module {
|
|||
foreach ($data as $oFavourite) {
|
||||
$aFavourites[$oFavourite->getTargetId()]=$oFavourite;
|
||||
}
|
||||
$this->Cache_Set($aFavourites, "favourite_{$sTargetType}_{$sUserId}_id_{$s}", array("favourite_update_{$sTargetType}_{$sUserId}"), 60*60*24*1);
|
||||
$this->Cache_Set($aFavourites, "favourite_{$sTargetType}_{$sUserId}_id_{$s}", array("favourite_{$sTargetType}_change_user_{$sUserId}"), 60*60*24*1);
|
||||
return $aFavourites;
|
||||
}
|
||||
return $data;
|
||||
|
@ -167,7 +167,6 @@ class LsFavourite extends Module {
|
|||
60*60*24*1
|
||||
);
|
||||
}
|
||||
/// $data['collection']=$this->GetTopicsAdditionalData($data['collection']);
|
||||
return $data;
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -232,7 +232,7 @@ $config['sys']['mail']['include_talk'] = true; // Вклю
|
|||
$aTmpDir=explode(';',session_save_path());
|
||||
$sTmpDir = count($aTmpDir)>1 ? $aTmpDir[1] : $aTmpDir[0];
|
||||
// Устанавливаем настройки кеширования
|
||||
$config['sys']['cache']['use'] = false; // использовать кеширование или нет
|
||||
$config['sys']['cache']['use'] = true; // использовать кеширование или нет
|
||||
$config['sys']['cache']['type'] = 'file'; // тип кеширования: file и memory. memory использует мемкеш
|
||||
$config['sys']['cache']['dir'] = $sTmpDir.'/'; // каталог для файлового кеша, также используется для временных картинок. По умолчанию подставляем каталог для хранения сессий
|
||||
$config['sys']['cache']['prefix'] = 'livestreet_cache'; // префикс кеширования, чтоб можно было на одной машине держать несколько сайтов с общим кешевым хранилищем
|
||||
|
|
|
@ -477,7 +477,7 @@ select { width: 99%; }
|
|||
.comment .info a.link { background: url(../images/icons.gif) no-repeat scroll -10px -230px; }
|
||||
.comment .info a.link:hover { background: url(../images/icons.gif) no-repeat scroll 0px -230px; }
|
||||
|
||||
.comment .info li.favorite a{ background: url(../images/icons.gif) no-repeat scroll -40px -40px; width: 10px; height:8px;margin-top:4px; display: block;}
|
||||
.comment .info li.favorite a{ background: url(../images/icons.gif) no-repeat scroll -40px -40px; width: 10px; height:8px;margin-top:4px; display: block; outline-style:none;}
|
||||
.comment .info li.favorite a:hover { background: url(../images/icons.gif) no-repeat scroll -50px -40px; }
|
||||
.comment .info li.favorite.active a{ background: url(../images/icons.gif) no-repeat scroll -50px -40px; }
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
{if $sAction=='profile'}
|
||||
<ul class="sub-menu" >
|
||||
<li {if $aParams[0]=='whois' or $aParams[0]==''}class="active"{/if}><div><a href="{router page='profile'}{$oUserProfile->getLogin()}/">{$aLang.user_menu_profile_whois}</a></div></li>
|
||||
<li {if $aParams[0]=='favourites'and$aParams[1]!='comments'}class="active"{/if}><div><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite}({$iCountTopicFavourite}){/if}</div></li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><div><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite}({$iCountCommentFavourite}){/if}</div></li>
|
||||
<li {if $aParams[0]=='favourites'and$aParams[1]!='comments'}class="active"{/if}><div><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/">{$aLang.user_menu_profile_favourites}</a>{if $iCountTopicFavourite} ({$iCountTopicFavourite}){/if}</div></li>
|
||||
<li {if $aParams[1]=='comments'}class="active"{/if}><div><a href="{router page='profile'}{$oUserProfile->getLogin()}/favourites/comments/">{$aLang.user_menu_profile_favourites_comments}</a>{if $iCountCommentFavourite} ({$iCountCommentFavourite}){/if}</div></li>
|
||||
</ul>
|
||||
{/if}
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue