1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-29 04:55:02 +03:00

fix declension modifier

This commit is contained in:
Mzhelskiy Maxim 2011-07-31 05:39:37 +00:00
parent fa9f6acc7d
commit eca10c0186

View file

@ -63,22 +63,12 @@ function smarty_modifier_declension_russian($forms, $count)
* @return string
*/
function smarty_modifier_declension($count, $forms, $language='')
{
global $currentLanguage, $Language;
{
if (!$language)
$language = $currentLanguage;
$language = Engine::getInstance()->Lang_GetLang();
$count = abs($count);
// Пытаемся выщемить термин из словаря
if (preg_match('/^(.*)\/(.*)$/', $forms, $termine))
{
if ($termine[1] && $termine[2])
{
$forms = $Language[$termine[1]][$termine[2]];
}
}
// Выделяем отдельные словоформы
$forms = explode(';', $forms);