Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
dbresult.php
1
<?php
8
namespace
Bitrix\Vote
;
9
10
use \Bitrix\Main\Localization\Loc;
11
Loc::loadMessages
(__FILE__);
12
13
class
DBResult
extends
\CDBResult
14
{
18
function
fetch
()
19
{
20
if
($res = parent::fetch())
21
{
22
$prefix =
null
;
23
foreach
($res as $k => $v)
24
{
25
if
(mb_strpos($k,
"LAMP"
) !==
false
)
26
{
27
$prefix = mb_substr($k, 0, mb_strpos($k,
"LAMP"
));
28
break
;
29
}
30
}
31
if
($prefix !==
null
&& $res[$prefix.
"LAMP"
] ==
"yellow"
&& !empty($res[$prefix.
"CHANNEL_ID"
]))
32
{
33
$res[$prefix.
"LAMP"
] = ($res[$prefix.
"ID"
] == \CVote::getActiveVoteId($res[$prefix.
"CHANNEL_ID"
]) ?
"green"
:
"red"
);
34
}
35
}
36
return
$res;
37
}
38
}
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Vote\DBResult
Definition
dbresult.php:14
Bitrix\Vote\DBResult\fetch
fetch()
Definition
dbresult.php:18
Bitrix\Vote
Definition
answer.php:8
modules
vote
lib
dbresult.php
Создано системой
1.10.0