1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
processor.php
См. документацию.
1<?php
2
3namespace Bitrix\Socialnetwork\Component\LogList;
4
5use Bitrix\Crm\Activity\Provider\Tasks\Task;
6use Bitrix\Main\Config\Option;
7use Bitrix\Main\Loader;
8use Bitrix\Main\ModuleManager;
9use Bitrix\Main\UserTable;
10use Bitrix\Socialnetwork\Item\LogIndex;
11use Bitrix\Socialnetwork\Livefeed;
12use Bitrix\Socialnetwork\LogViewTable;
13use Bitrix\Socialnetwork\Space;
14
16{
18
19 protected $select = [];
20 protected $filterData = false;
21 protected $filterContent = false;
22 protected $eventsList = [];
23 protected $tasksCount = 0;
24 protected $showPinnedPanel = true;
25
26 protected function getLogPageProcessorInstance()
27 {
28 if (
29 ($this->logPageProcessorInstance === null)
30 && $this->getComponent()
31 )
32 {
33 $this->logPageProcessorInstance = $this->getComponent()->getLogPageProcessorInstance();
34 }
36 }
37
38 public function setFilterData(array $value = []): void
39 {
40 $this->filterData = $value;
41 }
42
43 public function getFilterData()
44 {
45 return $this->filterData;
46 }
47
48 public function getFilterDataKey($key = '')
49 {
50 if ($key == '')
51 {
52 return false;
53 }
54 return ($this->filterData[$key] ?? false);
55 }
56
57 public function setFilterContent($value = false): void
58 {
59 $this->filterContent = $value;
60 }
61
62 public function getFilterContent()
63 {
65 }
66
67 public function setSelect($value = []): void
68 {
69 $this->select = $value;
70 }
71
72 public function getSelect(): array
73 {
74 return $this->select;
75 }
76
77 public function setEventsList(array $value = [], $type = 'main'): void
78 {
79 $this->eventsList[$type] = $value;
80 }
81
82 public function setEventsListKey($key = '', array $value = [], $type = 'main'): void
83 {
84 if ($key == '')
85 {
86 return;
87 }
88
89 if (!isset($this->eventsList[$type]))
90 {
91 $this->eventsList[$type] = [];
92 }
93
94 $this->eventsList[$type][$key] = $value;
95 }
96
97 public function appendEventsList(array $value = [], $type = 'main'): void
98 {
99 if (!isset($this->eventsList[$type]))
100 {
101 $this->eventsList[$type] = [];
102 }
103
104 $this->eventsList[$type][] = $value;
105 }
106
107 public function unsetEventsListKey($key = '', $type = 'main'): void
108 {
109 if ($key === '')
110 {
111 return;
112 }
113
114 if (!isset($this->eventsList[$type]))
115 {
116 return;
117 }
118
119 unset($this->eventsList[$type][$key]);
120 }
121
122 public function getEventsList($type = 'main')
123 {
124 return $this->eventsList[$type] ?? [];
125 }
126
127 public function incrementTasksCount(): void
128 {
129 $this->tasksCount++;
130 }
131
132 public function getTasksCount(): int
133 {
134 return $this->tasksCount;
135 }
136
137 public function makeTimeStampFromDateTime($value, $type = 'FULL')
138 {
139 static $siteDateFormatShort = null;
140 static $siteDateFormatFull = null;
141
142 if ($siteDateFormatShort === null)
143 {
144 $siteDateFormatShort = \CSite::getDateFormat('SHORT');
145 }
146 if ($siteDateFormatFull === null)
147 {
148 $siteDateFormatFull = \CSite::getDateFormat();
149 }
150
151 return makeTimeStamp($value, ($type === 'SHORT' ? $siteDateFormatShort : $siteDateFormatFull));
152 }
153
154 public function prepareContextData(&$result): void
155 {
156 $params = $this->getComponent()->arParams;
157
158 if (
159 $params['SET_TITLE'] === 'Y'
160 || $params['SET_NAV_CHAIN'] !== 'N'
161 || $params['GROUP_ID'] > 0
162 )
163 {
164 if ($params['ENTITY_TYPE'] === SONET_ENTITY_USER)
165 {
166 $res = \CUser::getById($params['USER_ID']);
167 $result['User'] = $res->fetch();
168 }
169 elseif ($params['ENTITY_TYPE'] === SONET_ENTITY_GROUP)
170 {
171 $result['Group'] = \CSocNetGroup::getById($params['GROUP_ID']);
172
173 if (
174 $result['Group']['OPENED'] === 'Y'
176 && !$this->getComponent()->getCurrentUserAdmin()
177 && !in_array(
178 \CSocNetUserToGroup::getUserRole($result['currentUserId'], $result['Group']['ID']),
180 true
181 )
182 )
183 {
184 $result['Group']['READ_ONLY'] = 'Y';
185 }
186 }
187 }
188 }
189
190 public function processFilterData(&$result): void
191 {
192 global $USER;
193
194 $params = $this->getComponent()->arParams;
195
196 if ($params['LOG_ID'] > 0)
197 {
198 $this->setFilterKey('ID', $params['LOG_ID']);
199 $this->showPinnedPanel = false;
200 }
201
202 $turnFollowModeOff = false;
203
204 if (isset($params['DISPLAY']))
205 {
206 $result['SHOW_UNREAD'] = 'N';
207
208 if (in_array($params['DISPLAY'], [ 'forme', 'my']))
209 {
210 $accessCodesList = $USER->getAccessCodes();
211 foreach ($accessCodesList as $i => $code)
212 {
213 if (!preg_match('/^(U|D|DR)/', $code)) //Users and Departments
214 {
215 unset($accessCodesList[$i]);
216 }
217 }
218 $this->setFilterKey('LOG_RIGHTS', $accessCodesList);
219 }
220 elseif ($params['DISPLAY'] === 'commonSpace')
221 {
222 $this->addFilter('!ENTITY_TYPE', [SONET_ENTITY_GROUP]);
223
224 $accessCodesList = $USER->getAccessCodes();
225 foreach ($accessCodesList as $i => $code)
226 {
227 if (!preg_match('/^(U|AU|D|DR|G2)/', $code))
228 {
229 unset($accessCodesList[$i]);
230 }
231 }
232
233 $this->setFilterKey('LOG_RIGHTS', $accessCodesList);
234 }
235
236 if ($params['DISPLAY'] === 'forme')
237 {
238 $this->setFilterKey('!USER_ID', $result['currentUserId']);
239 }
240 elseif ($params['DISPLAY'] === 'mine')
241 {
242 $this->setFilterKey('USER_ID', $result['currentUserId']);
243 }
244 elseif (is_numeric($params['DISPLAY']))
245 {
246 $this->setFilterKey('USER_ID', (int)$params['DISPLAY']);
247 }
248
249 if (
250 is_numeric($params['DISPLAY'])
251 || in_array($params['DISPLAY'], [ 'forme', 'mine'])
252 )
253 {
254 $result['IS_FILTERED'] = true;
255 }
256 $this->showPinnedPanel = false;
257 }
258
259 if (
260 !empty($params['DESTINATION'])
261 && is_array($params['DESTINATION'])
262 )
263 {
264 $this->setFilterKey('LOG_RIGHTS', $params['DESTINATION']);
265 if (count($params['DESTINATION']) == 1)
266 {
267 $code = array_shift($params['DESTINATION']);
268 if (preg_match('/^U(\d+)$/', $code, $matches))
269 {
270 $this->setFilterKey('!USER_ID', $matches[1]);
271 }
272 }
273
274 if (
275 $params['MODE'] === 'LANDING'
276 && !empty($params['DESTINATION_AUTHOR_ID'])
277 && (int)$params['DESTINATION_AUTHOR_ID'] > 0
278 ) // landing author filter
279 {
280 $this->setFilterKey('USER_ID', (int)$params['DESTINATION_AUTHOR_ID']);
281 }
282 }
283 elseif ($params['GROUP_ID'] > 0)
284 {
285 $this->setFilterKey('LOG_RIGHTS', 'SG'.$params['GROUP_ID']);
286
287 if (
288 isset($result['Group'])
289 && $result['Group']['OPENED'] === 'Y'
290 )
291 {
292 $this->setFilterKey('LOG_RIGHTS_SG', 'OSG' . $params['GROUP_ID'].'_' . (Util::checkUserAuthorized() ? SONET_ROLES_AUTHORIZED : SONET_ROLES_ALL));
293 }
294
295 $result['SHOW_FOLLOW_CONTROL'] = 'N';
296 $this->showPinnedPanel = false;
297 }
298 elseif ($params['TO_USER_ID'] > 0)
299 {
300 $this->setFilterKey('LOG_RIGHTS', 'U'.$params['TO_USER_ID']);
301 $this->setFilterKey('!USER_ID', $params['TO_USER_ID']);
302
303 $result['SHOW_FOLLOW_CONTROL'] = 'N';
304
305 $res = UserTable::getList([
306 'filter' => [
307 '=ID' => $params['TO_USER_ID']
308 ],
309 'select' => [ 'ID', 'NAME', 'LAST_NAME', 'SECOND_NAME', 'LOGIN' ]
310 ]);
311 if ($userFields = $res->fetch())
312 {
313 $result['ToUser'] = [
314 'ID' => $userFields['ID'],
315 'NAME' => \CUser::formatName($params['NAME_TEMPLATE'], $userFields, $this->getComponent()->useLogin)
316 ];
317 }
318 }
319 elseif ($params['USER_ID'] > 0)
320 {
321 $this->setFilterKey('ENTITY_TYPE', SONET_ENTITY_USER);
322 $this->setFilterKey('ENTITY_ID', $params['USER_ID']);
323 }
324 elseif ($params['ENTITY_TYPE'] <> '')
325 {
326 $this->setFilterKey('ENTITY_TYPE', $params['ENTITY_TYPE']);
327 }
328
329 if ($params['~TAG'] <> '')
330 {
331 $this->setFilterKey('=TAG', $params['~TAG']);
332 $turnFollowModeOff = true;
333 }
334 elseif ($params['FIND'] <> '')
335 {
336 $this->setFilterKey('*CONTENT', LogIndex::prepareToken($params['FIND']));
337 $this->showPinnedPanel = false;
338 }
339
340 if (
341 isset($params['!EXACT_EVENT_ID'])
342 && $params['!EXACT_EVENT_ID'] <> ''
343 )
344 {
345 $this->setFilterKey('!EVENT_ID', $params['!EXACT_EVENT_ID']);
346 $turnFollowModeOff = true;
347 }
348
349 if (
350 isset($params['EXACT_EVENT_ID'])
351 && $params['EXACT_EVENT_ID'] <> ''
352 )
353 {
354 $this->setFilterKey('EVENT_ID', [ $params['EXACT_EVENT_ID'] ]);
355 $turnFollowModeOff = true;
356 }
357 elseif (
358 isset($params['EVENT_ID'])
359 && is_array($params['EVENT_ID'])
360 )
361 {
362 if (!in_array('all', $params['EVENT_ID'], true))
363 {
364 $eventIdList = [];
365 foreach ($params['EVENT_ID'] as $eventId)
366 {
367 $eventIdList = array_merge($eventIdList, \CSocNetLogTools::findFullSetByEventID($eventId));
368 }
369
370 if (!empty($eventIdList))
371 {
372 $this->setFilterKey('EVENT_ID', array_unique($eventIdList));
373 }
374 $turnFollowModeOff = true;
375 }
376 }
377 elseif (
378 isset($params['EVENT_ID'])
379 && $params['EVENT_ID'] <> ''
380 )
381 {
382 $this->setFilterKey('EVENT_ID', \CSocNetLogTools::findFullSetByEventID($params['EVENT_ID']));
383 $turnFollowModeOff = true;
384 }
385 elseif ($this->getComponent()->getPresetFilterIdValue() === 'extranet')
386 {
387 $turnFollowModeOff = true;
388 }
389
390 if ($params['CREATED_BY_ID'] > 0)
391 {
392 if ($this->getComponent()->getCommentsNeededValue())
393 {
394 $this->setFilterKey('USER_ID|COMMENT_USER_ID', $params['CREATED_BY_ID']);
395 }
396 else
397 {
398 $this->setFilterKey('USER_ID', $params['CREATED_BY_ID']);
399 }
400 $this->unsetFilterKey('!USER_ID');
401 $turnFollowModeOff = true;
402 }
403
404 if ($params['GROUP_ID'] > 0)
405 {
406 $result['IS_FILTERED'] = true;
407 }
408
409 if (
410 isset($params['FLT_ALL'])
411 && $params['FLT_ALL'] === 'Y'
412 )
413 {
414 $this->setFilterKey('ALL', 'Y');
415 }
416
417 if (isset($params['FILTER_SITE_ID']))
418 {
419 $this->setFilterKey('SITE_ID', $params['FILTER_SITE_ID']);
420 }
421 elseif ($params['MODE'] !== 'LANDING')
422 {
423 $this->setFilterKey('SITE_ID', (
424 $result['isExtranetSite']
425 ? SITE_ID
426 : [ SITE_ID, false ]
427 ));
428 }
429
430 if (
431 isset($params['LOG_DATE_FROM'])
432 && $params['LOG_DATE_FROM'] <> ''
433 && $this->makeTimeStampFromDateTime($params['LOG_DATE_FROM'], 'SHORT') < time() + $result['TZ_OFFSET']
434 )
435 {
436 $this->setFilterKey('>=LOG_DATE', $params['LOG_DATE_FROM']);
437 $turnFollowModeOff = true;
438 }
439 else
440 {
441 unset($_REQUEST['flt_date_from']);
442 }
443
444 if (
445 isset($params['LOG_DATE_TO'])
446 && $params['LOG_DATE_TO'] <> ''
447 && $this->makeTimeStampFromDateTime($params['LOG_DATE_TO'], 'SHORT') < time() + $result['TZ_OFFSET']
448 )
449 {
450 $this->setFilterKey('<=LOG_DATE', convertTimeStamp($this->makeTimeStampFromDateTime($params['LOG_DATE_TO'], 'SHORT')+86399, 'FULL'));
451 $turnFollowModeOff = true;
452 }
453 else
454 {
455 $this->setFilterKey('<=LOG_DATE', 'NOW');
456 unset($_REQUEST['flt_date_to']);
457 }
458
460
461 if ($params['IS_CRM'] === 'Y')
462 {
463 if (Loader::includeModule('crm'))
464 {
465 $result['CRM_ENTITY_TYPE_NAME'] = \CCrmOwnerType::resolveName(\CCrmLiveFeedEntity::resolveEntityTypeID($params['CRM_ENTITY_TYPE']));
466 $result['CRM_ENTITY_ID'] = $params['CRM_ENTITY_ID'];
467 }
468
469 if (
470 $params['CRM_ENTITY_TYPE'] <> ''
471 || $this->getComponent()->getPresetFilterTopIdValue()
472 )
473 {
474 $result['SHOW_UNREAD'] = 'N';
475 }
476 $this->showPinnedPanel = false;
477 }
478
479 $result['presetFilterTopIdValue'] = $this->getComponent()->getPresetFilterTopIdValue();
480 $result['presetFilterIdValue'] = $this->getComponent()->getPresetFilterIdValue();
481
482 if (
483 (
484 !isset($params['USE_FAVORITES'])
485 || $params['USE_FAVORITES'] !== 'N'
486 )
487 && isset($params['FAVORITES'])
488 && $params['FAVORITES'] === 'Y'
489 )
490 {
491 $this->setFilterKey('>FAVORITES_USER_ID', 0);
492 $result['SHOW_UNREAD'] = 'N';
493 }
494
495 if ($turnFollowModeOff)
496 {
497 $result['SHOW_UNREAD'] = 'N';
498 $result['SHOW_FOLLOW_CONTROL'] = 'N';
499 $result['IS_FILTERED'] = true;
500 }
501
502 if (
503 $params["IS_CRM"] !== "Y"
505 )
506 {
507 $eventIdFilter = $this->getFilterKey('EVENT_ID');
508 $notEventIdFilter = $this->getFilterKey('!EVENT_ID');
509
510 if (empty($notEventIdFilter))
511 {
512 $notEventIdFilter = [];
513 }
514 elseif (!is_array($notEventIdFilter))
515 {
516 $notEventIdFilter = [ $notEventIdFilter ];
517 }
518
519 if (empty($eventIdFilter))
520 {
521 $eventIdFilter = [];
522 }
523 elseif (!is_array($eventIdFilter))
524 {
525 $eventIdFilter = [ $eventIdFilter ];
526 }
527
528 if (ModuleManager::isModuleInstalled('tasks'))
529 {
530 $notEventIdFilter = array_merge($notEventIdFilter, [ 'tasks' ]);
531 $eventIdFilter = array_filter($eventIdFilter, static function($eventId) { return ($eventId !== 'tasks'); });
532 }
533 if (
534 ModuleManager::isModuleInstalled('crm')
535 && Option::get('crm', 'enable_livefeed_merge', 'N') === 'Y'
536 )
537 {
538 $notEventIdFilter = array_merge($notEventIdFilter, [ 'crm_activity_add' ]);
539 $eventIdFilter = array_filter($eventIdFilter, static function($eventId) { return ($eventId !== 'crm_activity_add'); });
540 }
541
542 if (!empty($notEventIdFilter))
543 {
544 $this->setFilterKey('!EVENT_ID', $notEventIdFilter);
545 }
546 $this->setFilterKey('EVENT_ID', $eventIdFilter);
547 }
548
549 $result['USE_PINNED'] = 'N';
550 $result['SHOW_PINNED_PANEL'] = 'N';
551
552 if (
553 $result['currentUserId'] > 0
554 && $params['MODE'] !== 'LANDING'
555 && $params['IS_CRM'] !== 'Y'
556 )
557 {
558 $result['USE_PINNED'] = 'Y';
559
560 if ($this->showPinnedPanel)
561 {
562 $this->setFilterKey('PINNED_USER_ID', 0);
563 $result['SHOW_PINNED_PANEL'] = 'Y';
564 }
565 }
566 }
567
568 protected function processMainUIFilterData(&$result): void
569 {
570 $request = $this->getRequest();
571 $params = $this->getComponent()->arParams;
572
573 if (
574 (
575 (
576 defined('SITE_TEMPLATE_ID')
577 && (SITE_TEMPLATE_ID === 'bitrix24' || SITE_TEMPLATE_ID === 'air')
578 )
579 || (
580 isset($params['siteTemplateId'])
581 && in_array($params['siteTemplateId'], [ 'bitrix24', 'landing24', 'air' ])
582 )
583 )
584 && (int)$params['LOG_ID'] <= 0
585 && (
586 $request->get('useBXMainFilter') === 'Y'
587 || (($params['useBXMainFilter'] ?? '') === 'Y')
588 )
589 )
590 {
591 $filtered = false;
592 $filterOption = new \Bitrix\Main\UI\Filter\Options($result['FILTER_ID']);
593 $filterData = $filterOption->getFilter();
594
595 $result['FILTER_USED'] = (!empty($filterData) ? 'Y' : 'N');
596
598
599 if (
600 !empty($filterData['GROUP_ID'])
601 && preg_match('/^SG(\d+)$/', $filterData['GROUP_ID'], $matches)
602 )
603 {
604 $this->setFilterKey('LOG_RIGHTS', 'SG' . (int)$matches[1]);
605 }
606
607 if (
608 !empty($filterData['AUTHOR_ID'])
609 && preg_match('/^U(\d+)$/', $filterData['AUTHOR_ID'], $matches)
610 )
611 {
612 $this->setFilterKey('USER_ID', (int)$matches[1]);
613 }
614
615 if (
616 !empty($filterData['CREATED_BY_ID'])
617 && preg_match('/^U(\d+)$/', $filterData['CREATED_BY_ID'], $matches)
618 )
619 {
620 $filtered = true;
621 $this->setFilterKey('USER_ID', (int)$matches[1]);
622 }
623
624 if (!empty($filterData['TO']))
625 {
626 if (preg_match('/^U(\d+)$/', $filterData['TO'], $matches))
627 {
628 $this->setFilterKey('LOG_RIGHTS', 'U' . (int)$matches[1]);
629 if (empty($this->getFilterKey('USER_ID')))
630 {
631 $this->setFilterKey('!USER_ID', (int)$matches[1]);
632 }
633 }
634 elseif (preg_match('/^SG(\d+)$/', $filterData['TO'], $matches))
635 {
636 $this->setFilterKey('LOG_RIGHTS', 'SG' . (int)$matches[1]);
637 }
638 elseif (preg_match('/^DR(\d+)$/', $filterData['TO'], $matches))
639 {
640 $this->setFilterKey('LOG_RIGHTS', 'DR' . (int)$matches[1]);
641 }
642 elseif ($filterData['TO'] === 'UA')
643 {
644 $this->setFilterKey('LOG_RIGHTS', 'G2');
645 }
646
647 $filtered = !empty($this->getFilterKey('LOG_RIGHTS'));
648 }
649
650 if (
651 !empty($filterData['EXACT_EVENT_ID'])
652 && !is_array($filterData['EXACT_EVENT_ID'])
653 )
654 {
655 $filtered = true;
656 $this->setFilterKey('EVENT_ID', [ $filterData['EXACT_EVENT_ID'] ]);
657 }
658
659 if (
660 !empty($filterData['EVENT_ID'])
661 && is_array($filterData['EVENT_ID'])
662 )
663 {
664 $filtered = true;
665 $this->setFilterKey('EVENT_ID', []);
666
667 $eventIdFilterValue = $this->getFilterKey('EVENT_ID');
668 foreach ($filterData['EVENT_ID'] as $filterEventId)
669 {
670 // if specific blog_post event (important, vote, grat)
671 if (in_array($filterEventId, [ 'blog_post_important', 'blog_post_grat', 'blog_post_vote' ]))
672 {
673 $eventIdFilterValue[] = $filterEventId;
674 }
675 else
676 {
677 $eventIdFilterValue = array_merge($eventIdFilterValue, \CSocNetLogTools::findFullSetByEventID($filterEventId));
678 }
679 }
680 $this->setFilterKey('EVENT_ID', array_unique($eventIdFilterValue));
681 }
682
683 if (
684 !empty($filterData['FAVORITES_USER_ID'])
685 && $filterData['FAVORITES_USER_ID'] === 'Y'
686 )
687 {
688 $filtered = true;
689 $this->setFilterKey('>FAVORITES_USER_ID', 0);
690 }
691
692 if (
693 is_numeric($filterData['TAG'] ?? null)
694 || !empty(trim($filterData['TAG'] ?? ''))
695 )
696 {
697 $filtered = true;
698 $this->setFilterKey('=TAG', trim($filterData['TAG']));
699 }
700
701 $this->setFilterContent(trim($filterData['FIND'] ?? ''));
702 $findValue = (string)$this->getFilterContent();
703 if ($findValue !== '')
704 {
705 $filtered = true;
706 $this->setFilterKey('*CONTENT', LogIndex::prepareToken($findValue));
707 }
708
709 if (
710 !empty($filterData['EXTRANET'])
711 && $filterData['EXTRANET'] === 'Y'
712 && Loader::includeModule('extranet')
713 )
714 {
715 $filtered = true;
716 $this->setFilterKey('SITE_ID', \CExtranet::getExtranetSiteID());
717 $this->setFilterKey('!EVENT_ID', [ 'lists_new_element', 'tasks', 'timeman_entry', 'report', 'crm_activity_add' ]);
718 }
719
720 if (!empty($filterData['DATE_CREATE_from']))
721 {
722 $filtered = true;
723 if (!empty($this->getFilterContent()))
724 {
725 $this->setFilterKey('>=CONTENT_DATE_CREATE', $filterData['DATE_CREATE_from']);
726 }
727 else
728 {
729 $this->setFilterKey('>=LOG_DATE', $filterData['DATE_CREATE_from']);
730 }
731 }
732
733 if (!empty($filterData['DATE_CREATE_to']))
734 {
735 $filtered = true;
736 $dateCreateToValue = convertTimeStamp($this->makeTimeStampFromDateTime($filterData['DATE_CREATE_to'], 'SHORT') + 86399, 'FULL');
737
738 if (!empty($this->getFilterContent()))
739 {
740 $this->setFilterKey('<=CONTENT_DATE_CREATE', $dateCreateToValue);
741 }
742 else
743 {
744 $this->setFilterKey('<=LOG_DATE', $dateCreateToValue);
745 }
746 }
747
748 if ($filtered)
749 {
750 // extraordinal case, we cannot set arParams earlier
751 $params['SET_LOG_COUNTER'] = 'N';
752 $params['SET_LOG_PAGE_CACHE'] = 'N';
753 $params['USE_FOLLOW'] = 'N';
754 $params['SHOW_UNREAD'] = 'N';
755
756 $this->getComponent()->arParams = $params;
757
758 $result['SHOW_UNREAD'] = 'N';
759 $result['IS_FILTERED'] = true;
760 $this->showPinnedPanel = false;
761 }
762 }
763 elseif (
764 (
765 defined('SITE_TEMPLATE_ID')
766 && (SITE_TEMPLATE_ID === 'bitrix24' || SITE_TEMPLATE_ID === 'air')
767 )
768 || $params['MODE'] === 'LANDING'
769 )
770 {
771 $filterOption = new \Bitrix\Main\UI\Filter\Options($result['FILTER_ID']);
772 $filterOption->reset();
773 }
774
775 $this->setComposition();
776
777 if (
778 (
779 $params['TAG'] !== ''
780 || $params['FIND'] !== ''
781 )
782 && $this->getRequest()->get('apply_filter') === 'Y'
783 )
784 {
785 $this->getComponent()->arParams['useBXMainFilter'] = 'Y';
786 }
787 }
788
789 public function processNavData(&$result): void
790 {
791 global $NavNum;
792
793 $request = $this->getRequest();
794 $params = $this->getComponent()->arParams;
795
796 $this->setNavParams([
797 'nPageSize' => $params['PAGE_SIZE'],
798 'bShowAll' => false,
799 'iNavAddRecords' => 1,
800 'bSkipPageReset' => true,
801 'nRecordCount' => 1000000
802 ]);
803 if ($params['LOG_CNT'] > 0)
804 {
805 $this->setNavParams([
806 'nTopCount' => $params['LOG_CNT']
807 ]);
808 $result['PAGE_NUMBER'] = 1;
809 $this->setFirstPage(true);
810 }
811 elseif (
812 !$result['AJAX_CALL']
813 || $result['bReload']
814 )
815 {
816 $this->setNavParams([
817 'nTopCount' => $params['PAGE_SIZE']
818 ]);
819 $result['PAGE_NUMBER'] = 1;
820 $this->setFirstPage(true);
821 }
822 elseif ((int)$request->get('PAGEN_' . ($NavNum + 1)) > 0)
823 {
824 $result['PAGE_NUMBER'] = (int)$request->get('PAGEN_' . ($NavNum + 1));
825 }
826 elseif ((int)$params['PAGE_NUMBER'] > 0)
827 {
828 $result['PAGE_NUMBER'] = (int)$params['PAGE_NUMBER'];
829 $navParams = $this->getNavParams();
830 $navParams['iNumPage'] = $result['PAGE_NUMBER'];
831 $this->setNavParams($navParams);
832 }
833 }
834
835 public function processOrderData(): void
836 {
837 $params = $this->getComponent()->arParams;
838
839 if (
840 !empty($params['ORDER'])
841 && is_array($params['ORDER'])
842 )
843 {
844 $this->setOrder($params['ORDER']);
845 }
846 elseif ($this->getComponent()->getCommentsNeededValue())
847 {
848 $this->setOrder(
849 !empty($this->getFilterContent())
850 ? []
851 : [ 'LOG_UPDATE' => 'DESC' ]
852 );
853 }
854 elseif ($params['USE_FOLLOW'] === 'Y')
855 {
856 $this->setOrder([ 'DATE_FOLLOW' => 'DESC' ]);
857 }
858 elseif ($params['USE_COMMENTS'] === 'Y')
859 {
860 $this->setOrder(
861 !empty($this->getFilterContent())
862 ? [ 'CONTENT_LOG_UPDATE' => 'DESC' ]
863 : [ 'LOG_UPDATE' => 'DESC' ]
864 );
865// $this->setOrder(!empty($this->->getProcessorInstance()->getFilterContent()) ? [] : [ 'LOG_UPDATE' => 'DESC' ]);
866 }
867
868 $this->setOrderKey('ID', 'DESC');
869 $order = $this->getOrder();
870 $res = getModuleEvents('socialnetwork', 'OnBuildSocNetLogOrder');
871 while ($eventFields = $res->fetch())
872 {
873 executeModuleEventEx($eventFields, [ &$order, $params ]);
874 }
875 $this->setOrder($order);
876 }
877
878 public function processLastTimestamp(&$result): void
879 {
880 $request = $this->getRequest();
881 $params = $this->getComponent()->arParams;
882
883 $result['LAST_LOG_TS'] = (isset($params['LAST_LOG_TIMESTAMP']) ? (int)$params['LAST_LOG_TIMESTAMP'] : (int)$request->get('ts'));
884
885 if (
886 $params['LOG_ID'] <= 0
887 && (
888 !$result['AJAX_CALL']
889 || $result['bReload']
890 )
891 )
892 {
893 $result['LAST_LOG_TS'] = \CUserCounter::getLastDate($result['currentUserId'], $result['COUNTER_TYPE']);
894
895 if ($result['LAST_LOG_TS'] == 0)
896 {
897 $result['LAST_LOG_TS'] = 1;
898 }
899 else
900 {
901 //We substruct TimeZone offset in order to get server time
902 //because of template compatibility
903 $result['LAST_LOG_TS'] -= $result['TZ_OFFSET'];
904 }
905 }
906 }
907
908 public function processListParams(&$result): void
909 {
910 $params = $this->getComponent()->arParams;
911
912 if ($params['IS_CRM'] === 'Y')
913 {
914 $this->setListParams([
915 'IS_CRM' => 'Y',
916 'CHECK_CRM_RIGHTS' => 'Y'
917 ]);
918
919 $filterParams = [
920 'ENTITY_TYPE' => $params['CRM_ENTITY_TYPE'],
921 'ENTITY_ID' => $params['CRM_ENTITY_ID'],
922 'AFFECTED_TYPES' => [],
923 'OPTIONS' => [
924 'CUSTOM_DATA' => (
925 isset($params['CUSTOM_DATA'])
926 && is_array($params['CUSTOM_DATA'])
927 ? $params['CUSTOM_DATA']
928 : []
929 )
930 ]
931 ];
932
933 $res = getModuleEvents('socialnetwork', 'OnBuildSocNetLogFilter'); // crm handler used
934 while ($eventFields = $res->fetch())
935 {
936 $filter = $this->getFilter();
937 executeModuleEventEx($eventFields, [ &$filter, &$filterParams, &$params ]);
938 $this->setFilter($filter);
939 $this->getComponent()->arParams = $params;
940 }
941
942 $this->setListParamsKey('CUSTOM_FILTER_PARAMS' , $filterParams);
943 }
944 else
945 {
946 if (
947 $params['PUBLIC_MODE'] !== 'Y'
948 && ModuleManager::isModuleInstalled('crm')
949 )
950 {
951 $this->addFilter('!MODULE_ID', ( // can't use !@MODULE_ID because of null
952 Option::get('crm', 'enable_livefeed_merge', 'N') === 'Y'
953 || (
954 !empty($this->getFilterKey('LOG_RIGHTS'))
955 && !is_array($this->getFilterKey('LOG_RIGHTS'))
956 && preg_match('/^SG(\d+)$/', $this->getFilterKey('LOG_RIGHTS'), $matches)
957 )
958 ? [ 'crm']
959 : [ 'crm', 'crm_shared' ]
960 ));
961 }
962
963 $this->setListParamsKey('CHECK_RIGHTS', ($params['MODE'] !== 'LANDING' ? 'Y' : 'N'));
964
965 if (
966 $params['MODE'] !== 'LANDING'
967 && $params['LOG_ID'] <= 0
968 && empty($this->getFilterDataKey('EVENT_ID'))
969 )
970 {
971 $this->setListParamsKey('CHECK_VIEW', 'Y');
972 }
973 }
974
975 if (
976 $params['USE_FOLLOW'] !== 'N'
977 && !ModuleManager::isModuleInstalled('intranet')
979 ) // BSM
980 {
981 $result['USE_SMART_FILTER'] = 'Y';
982 $this->setListParamsKey('MY_GROUPS_ONLY', (
983 \CSocNetLogSmartFilter::getDefaultValue($result['currentUserId']) === 'Y'
984 ? 'Y'
985 : 'N'
986 ));
987 }
988
989 if (
990 $result['isExtranetSite']
991 || $this->getFilterDataKey('EXTRANET') === 'Y'
992 || $this->getComponent()->getPresetFilterIdValue() === 'extranet'
993 )
994 {
995 $this->setListParamsKey('MY_GROUPS_ONLY', 'Y');
996 }
997
998 $result['MY_GROUPS_ONLY'] = $this->getListParamsKey('MY_GROUPS_ONLY');
999
1000 if ($this->getComponent()->getCurrentUserAdmin())
1001 {
1002 $this->setListParamsKey('USER_ID', 'A');
1003 }
1004
1005 if ($params['USE_FOLLOW'] === 'Y')
1006 {
1007 $this->setListParamsKey('USE_FOLLOW', 'Y');
1008 }
1009 else
1010 {
1011 $this->setListParamsKey('USE_FOLLOW', 'N');
1012 $this->setListParamsKey('USE_SUBSCRIBE', 'N');
1013 }
1014
1015 if (
1016 isset($params['USE_FAVORITES'])
1017 && $params['USE_FAVORITES'] === 'N'
1018 )
1019 {
1020 $this->setListParamsKey('USE_FAVORITES', 'N');
1021 }
1022
1023 if (
1024 empty($result['RETURN_EMPTY_LIST'])
1025 && !empty($params['EMPTY_EXPLICIT'])
1026 && $params['EMPTY_EXPLICIT'] === 'Y'
1027 )
1028 {
1029 $this->setListParamsKey('EMPTY_LIST', 'Y');
1030 }
1031
1032 if ($result['USE_PINNED'] === 'Y')
1033 {
1034 $this->setListParamsKey('USE_PINNED', 'Y');
1035 }
1036 }
1037
1038 public function setListFilter(array $componentResult = []): void
1039 {
1040 if (!empty($componentResult['GRAT_POST_FILTER']))
1041 {
1042 $this->setFilterKey('EVENT_ID', 'blog_post_grat');
1043 $this->setFilterKey('SOURCE_ID', $componentResult['GRAT_POST_FILTER']);
1044 }
1045 }
1046
1047 public function processSelectData(&$result): void
1048 {
1049 $params = $this->getComponent()->arParams;
1050
1051 $select = [
1052 'ID', 'TMP_ID', 'MODULE_ID',
1053 'LOG_DATE', 'LOG_UPDATE', 'DATE_FOLLOW',
1054 'ENTITY_TYPE', 'ENTITY_ID', 'EVENT_ID', 'SOURCE_ID', 'USER_ID', 'FOLLOW',
1055 'RATING_TYPE_ID', 'RATING_ENTITY_ID',
1056 'LOG_DATE_TS',
1057 ];
1058
1059 if (
1060 !isset($params['USE_FAVORITES'])
1061 || $params['USE_FAVORITES'] !== 'N'
1062 )
1063 {
1064 $select[] = 'FAVORITES_USER_ID';
1065 }
1066
1067 if ($result['currentUserId'] > 0)
1068 {
1069 $select[] = 'PINNED_USER_ID';
1070 }
1071
1072 $this->setSelect($select);
1073 }
1074
1075 public function processDiskUFEntities(): void
1076 {
1077 $diskUFEntityList = $this->getComponent()->getDiskUFEntityListValue();
1078 if (
1079 !empty($diskUFEntityList['SONET_LOG'])
1080 || !empty($diskUFEntityList['BLOG_POST'])
1081 )
1082 {
1083 $res = getModuleEvents('socialnetwork', 'OnAfterFetchDiskUfEntity');
1084 while ($eventFields = $res->fetch())
1085 {
1086 executeModuleEventEx($eventFields, [ $diskUFEntityList ]);
1087 }
1088 }
1089 }
1090
1091 public function processCrmActivities($result): void
1092 {
1093 $activity2LogList = $this->getComponent()->getActivity2LogListValue();
1094
1095 if (
1096 !empty($activity2LogList)
1097 && Loader::includeModule('crm')
1098 && Loader::includeModule('tasks')
1099 )
1100 {
1101 $res = \CCrmActivity::getList(
1102 [],
1103 [
1104 '@ID' => array_keys($activity2LogList),
1105 'CHECK_PERMISSIONS' => 'N'
1106 ],
1107 false,
1108 false,
1109 ['ID', 'ASSOCIATED_ENTITY_ID', 'TYPE_ID', 'PROVIDER_ID']
1110 );
1111 while (
1112 ($activityFields = $res->fetch())
1113 && ((int)$activityFields['ASSOCIATED_ENTITY_ID'] > 0)
1114 )
1115 {
1116 if (
1117 (int)$activityFields['TYPE_ID'] === \CCrmActivityType::Task
1118 || (
1119 (int)$activityFields['TYPE_ID'] === \CCrmActivityType::Provider
1120 && $activityFields['PROVIDER_ID'] === Task::getId()
1121 )
1122 )
1123 {
1124 try
1125 {
1126 $taskItem = new \CTaskItem((int)$activityFields['ASSOCIATED_ENTITY_ID'], $result['currentUserId']);
1127 if (!$taskItem->checkCanRead())
1128 {
1129 $activity2LogList = $this->getComponent()->getActivity2LogListValue();
1130 unset($activity2LogList[$activityFields['ID']]);
1131 $this->getComponent()->setActivity2LogListValue($activity2LogList);
1132 unset($activity2LogList);
1133 }
1134 else
1135 {
1136 $task2LogList = $this->getComponent()->getTask2LogListValue();
1137 $task2LogList[(int)$activityFields['ASSOCIATED_ENTITY_ID']] = (int)$activity2LogList[$activityFields['ID']];
1138 $this->getComponent()->setTask2LogListValue($task2LogList);
1139 unset($task2LogList);
1140 }
1141 }
1142 catch (\CTaskAssertException $e)
1143 {
1144 }
1145 }
1146 }
1147 }
1148 }
1149
1150 public function processNextPageSize(&$result): void
1151 {
1152 $request = $this->getRequest();
1153 $params = $this->getComponent()->arParams;
1154 $filter = $this->getFilter();
1155
1156 $result['NEXT_PAGE_SIZE'] = 0;
1157
1158 if (
1159 isset($filter['>=LOG_UPDATE'])
1160 && count($result['arLogTmpID']) < $params['PAGE_SIZE']
1161 )
1162 {
1163 $result['NEXT_PAGE_SIZE'] = count($result['arLogTmpID']);
1164 }
1165 elseif ((int)$request->get('pagesize') > 0)
1166 {
1167 $result['NEXT_PAGE_SIZE'] = (int)$request->get('pagesize');
1168 }
1169 }
1170
1171 public function processContentList(&$result): void
1172 {
1173 $contentIdList = [];
1174 if (is_array($result['Events']))
1175 {
1176 foreach ($result['Events'] as $key => $eventFields)
1177 {
1178 if ($contentId = Livefeed\Provider::getContentId($eventFields))
1179 {
1180 $contentIdList[] = $result['Events'][$key]['CONTENT_ID'] = $contentId['ENTITY_TYPE'].'-'.$contentId['ENTITY_ID'];
1181 }
1182 }
1183 }
1184
1185 $result['ContentViewData'] = (
1186 !empty($contentIdList)
1188 'contentId' => $contentIdList
1189 ])
1190 : []
1191 );
1192 }
1193
1194 public function processEventsList(&$result, $type = 'main'): void
1195 {
1196 $params = $this->getComponent()->arParams;
1197 $activity2LogList = $this->getComponent()->getActivity2LogListValue();
1198
1200
1201 $prevPageLogIdList = [];
1202 if ($type === 'main')
1203 {
1206 {
1207 return;
1208 }
1209
1210 $prevPageLogIdList = $logPageProcessorInstance->getPrevPageLogIdList();
1211 }
1212
1213 foreach ($eventsList as $key => $eventFields)
1214 {
1215 if (
1216 $eventFields['EVENT_ID'] === 'crm_activity_add'
1217 && !empty($activity2LogList)
1218 && !in_array($eventFields['ID'], $activity2LogList)
1219 )
1220 {
1221 $this->unsetEventsListKey($key);
1222 }
1223 elseif (
1224 empty($prevPageLogIdList)
1225 || !in_array((int)$eventFields['ID'], $prevPageLogIdList, true)
1226 )
1227 {
1228 $eventFields['EVENT_ID_FULLSET'] = \CSocNetLogTools::findFullSetEventIDByEventID($eventFields['EVENT_ID']);
1229 $this->setEventsListKey($key, $eventFields, $type);
1230
1231 if (
1232 $type === 'main'
1233 && $eventFields['EVENT_ID'] === 'tasks'
1234 )
1235 {
1236 $this->incrementTasksCount();
1237 }
1238
1239 if (
1240 $type === 'main'
1241 && $key == 0
1242 )
1243 {
1244 if (isset($eventFields['DATE_FOLLOW']))
1245 {
1246 $logPageProcessorInstance->setDateFirstPageTimestamp($this->makeTimeStampFromDateTime($eventFields['DATE_FOLLOW']));
1247 }
1248 elseif (
1249 $params['USE_FOLLOW'] === 'N'
1250 && $eventFields['LOG_UPDATE']
1251 )
1252 {
1253 $logPageProcessorInstance->setDateFirstPageTimestamp($this->makeTimeStampFromDateTime($eventFields['LOG_UPDATE']));
1254 }
1255 }
1256 }
1257 else
1258 {
1259 $this->unsetEventsListKey($key, $type);
1260 }
1261 }
1262
1263 if ($type === 'main')
1264 {
1265 $result['Events'] = $this->getEventsList($type);
1266 }
1267 elseif ($type === 'pinned')
1268 {
1269 $result['pinnedEvents'] = $this->getEventsList($type);
1270 }
1271 }
1272
1273 public function processFavoritesData($result): void
1274 {
1275 $params = $this->getComponent()->arParams;
1276
1277 $idList = array_merge($result['arLogTmpID'], $result['pinnedIdList']);
1278
1279 if (
1280 !empty($idList)
1281 && $result['currentUserId'] > 0
1282 && (
1283 !isset($params['USE_FAVORITES'])
1284 || $params['USE_FAVORITES'] !== 'N'
1285 )
1286 )
1287 {
1288 $favLogIdList = [];
1289 $res = \Bitrix\Socialnetwork\LogFavoritesTable::getList([
1290 'filter' => [
1291 '@LOG_ID' => $idList,
1292 'USER_ID' => $result['currentUserId']
1293 ],
1294 'select' => [ 'LOG_ID' ]
1295 ]);
1296 while ($favEntry = $res->fetch())
1297 {
1298 $favLogIdList[] = (int)$favEntry['LOG_ID'];
1299 }
1300
1301 $eventsList = $this->getEventsList();
1302 foreach ($eventsList as $key => $entry)
1303 {
1304 $entry['FAVORITES_USER_ID'] = $entry['!FAVORITES_USER_ID'] = (
1305 in_array((int)$entry['ID'], $favLogIdList, true)
1306 ? $result['currentUserId']
1307 : 0
1308 );
1309 $this->setEventsListKey($key, $entry);
1310 }
1311 }
1312 }
1313
1314 public function getSmiles(&$result): void
1315 {
1316 global $CACHE_MANAGER;
1317
1318 if (!empty($this->getComponent()->getErrors()))
1319 {
1320 return;
1321 }
1322
1323 if (Loader::includeModule('forum'))
1324 {
1325 $result['Smiles'] = Option::get('forum', 'smile_gallery_id', 0);
1326 }
1327 else
1328 {
1329 $cacheId = 'b_sonet_smile_'.LANGUAGE_ID;
1330
1331 if ($CACHE_MANAGER->read(604800, $cacheId))
1332 {
1333 $result['Smiles'] = $CACHE_MANAGER->get($cacheId);
1334 }
1335 else
1336 {
1337 $result['Smiles'] = [];
1338
1339 $res = \CSocNetSmile::getList(
1340 [ 'SORT' => 'ASC' ],
1341 [
1342 'SMILE_TYPE' => 'S',
1343 'LANG_LID' => LANGUAGE_ID
1344 ],
1345 false,
1346 false,
1347 [ 'ID', 'IMAGE', 'DESCRIPTION', 'TYPING', 'SMILE_TYPE', 'SORT', 'LANG_NAME' ]
1348 );
1349 while ($smileFields = $res->fetch())
1350 {
1351 [$type] = explode(' ', $smileFields['TYPING']);
1352 $smileFields['TYPE'] = str_replace("'", "\'", $type);
1353 $smileFields['TYPE'] = str_replace("\\", "\\\\", $smileFields['TYPE']);
1354 $smileFields['NAME'] = $smileFields['LANG_NAME'];
1355 $smileFields['IMAGE'] = '/bitrix/images/socialnetwork/smile/'.$smileFields['IMAGE'];
1356
1357 $result['Smiles'][] = $smileFields;
1358 }
1359
1360 $CACHE_MANAGER->set($cacheId, $result['Smiles']);
1361 }
1362 }
1363 }
1364
1365 public function getExpertModeValue(&$result): void
1366 {
1367 $params = $this->getComponent()->arParams;
1368
1369 if (
1370 $params['USE_TASKS'] === 'Y'
1372 )
1373 {
1374 $result['EXPERT_MODE'] = 'N';
1375
1376 $res = LogViewTable::getList([
1377 'order' => [],
1378 'filter' => [
1379 'USER_ID' => $result['currentUserId'],
1380 '=EVENT_ID' => 'tasks'
1381 ],
1382 'select' => [ 'TYPE' ]
1383 ]);
1384 if ($logViewFields = $res->fetch())
1385 {
1386 $result['EXPERT_MODE'] = ($logViewFields['TYPE'] === 'N' ? 'Y' : 'N');
1387 }
1388 }
1389 }
1390
1391 public function warmUpStaticCache($result): void
1392 {
1393 $logEventsData = [];
1394
1395 if (is_array($result['Events']))
1396 {
1397 foreach ($result['Events'] as $eventFields)
1398 {
1399 $logEventsData[(int)$eventFields['ID']] = $eventFields['EVENT_ID'];
1400 }
1401 }
1402 if (is_array($result['pinnedEvents']))
1403 {
1404 foreach ($result['pinnedEvents'] as $eventFields)
1405 {
1406 $logEventsData[(int)$eventFields['ID']] = $eventFields['EVENT_ID'];
1407 }
1408 }
1409
1410 $forumPostLivefeedProvider = new \Bitrix\Socialnetwork\Livefeed\ForumPost();
1411 $forumPostLivefeedProvider->warmUpAuxCommentsStaticCache([
1412 'logEventsData' => $logEventsData,
1413 ]);
1414 }
1415
1416 private function setComposition(): void
1417 {
1418 if (!$this->isSpace())
1419 {
1420 return;
1421 }
1422 $composition = new Space\Toolbar\Composition($this->userId, $this->groupId);
1423 $deselectedItems = $composition->getDeselectedSettings();
1424 $this->addFilter('!' . Space\Toolbar\Composition::FILTER, $deselectedItems);
1425 }
1426}
return select
Определения access_edit.php:440
$type
Определения options.php:106
unsetEventsListKey($key='', $type='main')
Определения processor.php:107
processEventsList(&$result, $type='main')
Определения processor.php:1194
setFilterData(array $value=[])
Определения processor.php:38
setEventsList(array $value=[], $type='main')
Определения processor.php:77
appendEventsList(array $value=[], $type='main')
Определения processor.php:97
setEventsListKey($key='', array $value=[], $type='main')
Определения processor.php:82
setListFilter(array $componentResult=[])
Определения processor.php:1038
makeTimeStampFromDateTime($value, $type='FULL')
Определения processor.php:137
static checkUserAuthorized()
Определения util.php:20
setOrderKey($key='', $value=false)
Определения processor.php:111
addFilter($key='', $value=false)
Определения processor.php:75
setListParamsKey($key='', $value=false)
Определения processor.php:139
setFilterKey($key='', $value=false)
Определения processor.php:66
static prepareToken($str)
Определения logindex.php:402
static getViewData($params=[])
Определения usercontentview.php:53
global $CACHE_MANAGER
Определения clear_component_cache.php:7
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$_REQUEST["admin_mnu_menu_id"]
Определения get_menu.php:8
$result
Определения get_property_values.php:14
global $USER
Определения csv_new_run.php:40
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
getErrors()
Определения errorableimplementation.php:34
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
if(empty($signedUserToken)) $key
Определения quickway.php:257
$i
Определения factura.php:643
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$matches
Определения index.php:22
const SONET_ENTITY_GROUP
Определения include.php:117
const SONET_ROLES_AUTHORIZED
Определения include.php:36
const SONET_ENTITY_USER
Определения include.php:118
const SONET_ROLES_ALL
Определения include.php:35
$contentId
Определения sonet_set_content_view.php:27
const SITE_ID
Определения sonet_set_content_view.php:12