Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
pushsmartfilter.php
1<?php
2namespace Bitrix\Pull;
3
5{
6 public static function getStatus($userId = null)
7 {
8 if (!\CPullOptions::GetPushStatus())
9 {
10 return null;
11 }
12
13 if (is_null($userId) && is_object($GLOBALS['USER']))
14 {
15 $userId = $GLOBALS['USER']->getId();
16 }
17 $userId = intval($userId);
18 if (!$userId)
19 {
20 return false;
21 }
22
23 return (bool)\CUserOptions::GetOption('pull', 'push_smartfilter_status', true, $userId);
24 }
25
26 public static function setStatus($status, $userId = null)
27 {
28 if (!\CPullOptions::GetPushStatus())
29 {
30 return null;
31 }
32
33 if (is_null($userId) && is_object($GLOBALS['USER']))
34 {
35 $userId = $GLOBALS['USER']->getId();
36 }
37 $userId = intval($userId);
38 if (!$userId)
39 {
40 return false;
41 }
42
43 $status = $status === false? false: true;
44
45 return (bool)\CUserOptions::SetOption('pull', 'push_smartfilter_status', $status, false, $userId);
46 }
47}
static getStatus($userId=null)
static setStatus($status, $userId=null)
$GLOBALS['____1444769544']
Definition license.php:1