make PHP CS happy?
This commit is contained in:
parent
78a8ed6fe7
commit
2da2ac6826
|
@ -212,15 +212,15 @@ class API extends BaseModule
|
||||||
}
|
}
|
||||||
|
|
||||||
$strAclContactAllow = isset($request['contact_allow']) ? $aclFormatter->toString($request['contact_allow']) : $user['allow_cid'] ?? '';
|
$strAclContactAllow = isset($request['contact_allow']) ? $aclFormatter->toString($request['contact_allow']) : $user['allow_cid'] ?? '';
|
||||||
$strAclGroupAllow = isset($request['group_allow']) ? $aclFormatter->toString($request['group_allow']) : $user['allow_gid'] ?? '';
|
$strAclGroupAllow = isset($request['group_allow']) ? $aclFormatter->toString($request['group_allow']) : $user['allow_gid'] ?? '';
|
||||||
$strContactDeny = isset($request['contact_deny']) ? $aclFormatter->toString($request['contact_deny']) : $user['deny_cid'] ?? '';
|
$strContactDeny = isset($request['contact_deny']) ? $aclFormatter->toString($request['contact_deny']) : $user['deny_cid'] ?? '';
|
||||||
$strGroupDeny = isset($request['group_deny']) ? $aclFormatter->toString($request['group_deny']) : $user['deny_gid'] ?? '';
|
$strGroupDeny = isset($request['group_deny']) ? $aclFormatter->toString($request['group_deny']) : $user['deny_gid'] ?? '';
|
||||||
|
|
||||||
$visibility = $request['visibility'] ?? '';
|
$visibility = $request['visibility'] ?? '';
|
||||||
if ($visibility === 'public') {
|
if ($visibility === 'public') {
|
||||||
// The ACL selector introduced in version 2019.12 sends ACL input data even when the Public visibility is selected
|
// The ACL selector introduced in version 2019.12 sends ACL input data even when the Public visibility is selected
|
||||||
$strAclContactAllow = $strAclGroupAllow = $strContactDeny = $strGroupDeny = '';
|
$strAclContactAllow = $strAclGroupAllow = $strContactDeny = $strGroupDeny = '';
|
||||||
} else if ($visibility === 'custom') {
|
} elseif ($visibility === 'custom') {
|
||||||
// Since we know from the visibility parameter the item should be private, we have to prevent the empty ACL
|
// Since we know from the visibility parameter the item should be private, we have to prevent the empty ACL
|
||||||
// case that would make it public. So we always append the author's contact id to the allowed contacts.
|
// case that would make it public. So we always append the author's contact id to the allowed contacts.
|
||||||
// See https://github.com/friendica/friendica/issues/9672
|
// See https://github.com/friendica/friendica/issues/9672
|
||||||
|
@ -228,7 +228,9 @@ class API extends BaseModule
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$strAclContactAllow = $aclFormatter->toString($self);
|
$strAclContactAllow = $aclFormatter->toString($self);
|
||||||
$strAclGroupAllow = $strContactDeny = $strGroupDeny = '';
|
$strAclGroupAllow = '';
|
||||||
|
$strContactDeny = '';
|
||||||
|
$strGroupDeny = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$datarray = [
|
$datarray = [
|
||||||
|
|
|
@ -123,7 +123,7 @@ class Form extends BaseModule
|
||||||
if (empty($orig_event)) {
|
if (empty($orig_event)) {
|
||||||
$orig_event = User::getById($this->session->getLocalUserId(), ['allow_cid', 'allow_gid', 'deny_cid',
|
$orig_event = User::getById($this->session->getLocalUserId(), ['allow_cid', 'allow_gid', 'deny_cid',
|
||||||
'deny_gid']);;
|
'deny_gid']);;
|
||||||
} else if ($orig_event['allow_cid'] !== '<' . $this->session->getLocalUserId() . '>'
|
} elseif ($orig_event['allow_cid'] !== '<' . $this->session->getLocalUserId() . '>'
|
||||||
|| $orig_event['allow_gid']
|
|| $orig_event['allow_gid']
|
||||||
|| $orig_event['deny_cid']
|
|| $orig_event['deny_cid']
|
||||||
|| $orig_event['deny_gid']) {
|
|| $orig_event['deny_gid']) {
|
||||||
|
@ -203,10 +203,10 @@ class Form extends BaseModule
|
||||||
'$cid' => $cid,
|
'$cid' => $cid,
|
||||||
'$uri' => $uri,
|
'$uri' => $uri,
|
||||||
|
|
||||||
'$title' => $this->t('Event details'),
|
'$title' => $this->t('Event details'),
|
||||||
'$desc' => $this->t('Starting date and Title are required.'),
|
'$desc' => $this->t('Starting date and Title are required.'),
|
||||||
'$s_text' => $this->t('Event Starts:') . ' <span class="required" title="' . $this->t('Required') . '">*</span>',
|
'$s_text' => $this->t('Event Starts:') . ' <span class="required" title="' . $this->t('Required') . '">*</span>',
|
||||||
'$s_dsel' => Temporal::getDateTimeField(
|
'$s_dsel' => Temporal::getDateTimeField(
|
||||||
new \DateTime(),
|
new \DateTime(),
|
||||||
\DateTime::createFromFormat('Y', intval($syear) + 5),
|
\DateTime::createFromFormat('Y', intval($syear) + 5),
|
||||||
\DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"),
|
\DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"),
|
||||||
|
@ -218,6 +218,7 @@ class Form extends BaseModule
|
||||||
'',
|
'',
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
|
|
||||||
'$n_text' => $this->t('Finish date/time is not known or not relevant'),
|
'$n_text' => $this->t('Finish date/time is not known or not relevant'),
|
||||||
'$n_checked' => $n_checked,
|
'$n_checked' => $n_checked,
|
||||||
'$f_text' => $this->t('Event Finishes:'),
|
'$f_text' => $this->t('Event Finishes:'),
|
||||||
|
@ -252,4 +253,3 @@ class Form extends BaseModule
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,10 +52,10 @@ class Show extends BaseModule
|
||||||
{
|
{
|
||||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||||
|
|
||||||
$this->session = $session;
|
$this->session = $session;
|
||||||
$this->sysMessages = $sysMessages;
|
$this->sysMessages = $sysMessages;
|
||||||
$this->page = $page;
|
$this->page = $page;
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function content(array $request = []): string
|
protected function content(array $request = []): string
|
||||||
|
@ -73,7 +73,7 @@ class Show extends BaseModule
|
||||||
$this->page->registerFooterScript('view/asset/moment/min/moment-with-locales.min.js');
|
$this->page->registerFooterScript('view/asset/moment/min/moment-with-locales.min.js');
|
||||||
$this->page->registerFooterScript('view/asset/fullcalendar/dist/fullcalendar.min.js');
|
$this->page->registerFooterScript('view/asset/fullcalendar/dist/fullcalendar.min.js');
|
||||||
|
|
||||||
$htpl = Renderer::getMarkupTemplate('calendar/calendar_head.tpl');
|
$htpl = Renderer::getMarkupTemplate('calendar/calendar_head.tpl');
|
||||||
$this->page['htmlhead'] .= Renderer::replaceMacros($htpl, [
|
$this->page['htmlhead'] .= Renderer::replaceMacros($htpl, [
|
||||||
'$calendar_api' => 'calendar/api/get' . (!empty($this->parameters['nickname']) ? '/' . $this->parameters['nickname'] : ''),
|
'$calendar_api' => 'calendar/api/get' . (!empty($this->parameters['nickname']) ? '/' . $this->parameters['nickname'] : ''),
|
||||||
'$event_api' => 'calendar/event/show' . (!empty($this->parameters['nickname']) ? '/' . $this->parameters['nickname'] : ''),
|
'$event_api' => 'calendar/event/show' . (!empty($this->parameters['nickname']) ? '/' . $this->parameters['nickname'] : ''),
|
||||||
|
@ -115,7 +115,7 @@ class Show extends BaseModule
|
||||||
$this->page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput-typeahead.css'));
|
$this->page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput-typeahead.css'));
|
||||||
|
|
||||||
$tpl = Renderer::getMarkupTemplate("calendar/calendar.tpl");
|
$tpl = Renderer::getMarkupTemplate("calendar/calendar.tpl");
|
||||||
$o = Renderer::replaceMacros($tpl, [
|
$o = Renderer::replaceMacros($tpl, [
|
||||||
'$tabs' => $tabs,
|
'$tabs' => $tabs,
|
||||||
'$title' => $this->t('Events'),
|
'$title' => $this->t('Events'),
|
||||||
'$view' => $this->t('View'),
|
'$view' => $this->t('View'),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user