149 if (!isset($params[
'TITLE']))
154 if (isset($params[
'OWNER_ID']))
156 $params[
'OWNER_ID'] = (int)$params[
'OWNER_ID'];
159 if (!isset($params[
'VIDEOCONF'][
'PASSWORD']) && isset($params[
'CONFERENCE_PASSWORD']))
161 $params[
'PASSWORD'] = $params[
'CONFERENCE_PASSWORD'];
164 $params[
'SEARCHABLE'] =
'N';
166 $params[
'MANAGE_UI'] = $params[
'MANAGE_UI'] ?? $this->getDefaultManageUI();
167 $params[
'MANAGE_SETTINGS'] = $params[
'MANAGE_SETTINGS'] ?? $this->getDefaultManageSettings();
168 $params[
'MANAGE_USERS_ADD'] = $params[
'MANAGE_USERS_ADD'] ?? $this->getDefaultManageUsersAdd();
169 $params[
'MANAGE_USERS_DELETE'] = $params[
'MANAGE_USERS_DELETE'] ?? $this->getDefaultManageUsersDelete();
170 $params[
'CAN_POST'] = $params[
'CAN_POST'] ?? $this->getDefaultCanPost();
172 $params = parent::prepareParams($params);
173 if (!$params->isSuccess())
178 $paramData = $params->getResult();
181 $confParams = Conference::prepareParamsForAdd($paramData);
182 if (!$confParams->isSuccess())
186 $confParams = $confParams->getData()[
'FIELDS'];
188 return $params->setResult(array_merge($paramData, $confParams));
193 CGlobalCounter::Increment(
'im_videoconf_count', CGlobalCounter::ALL_SITES,
false);
194 $videoconfCount = CGlobalCounter::GetValue(
'im_videoconf_count', CGlobalCounter::ALL_SITES);
196 if ($videoconfCount === self::MAX_CONF_NUMBER)
198 CGlobalCounter::Set(
'im_videoconf_count', 1, CGlobalCounter::ALL_SITES,
'',
false);
201 return Loc::GetMessage(
'IM_VIDEOCONF_NAME_FORMAT_NEW', [
202 '#NUMBER#' => $videoconfCount