mirror of
https://github.com/friendica/friendica
synced 2024-12-22 07:20:16 +00:00
Fix errors in all modules
This commit is contained in:
parent
6cb9676250
commit
f254283dc6
9 changed files with 15 additions and 14 deletions
|
@ -49,7 +49,7 @@ class Embed extends BaseAdmin
|
|||
require_once "view/theme/$theme/config.php";
|
||||
if (function_exists('theme_admin_post')) {
|
||||
self::checkFormSecurityTokenRedirectOnError('/admin/themes/' . $theme . '/embed?mode=minimal', 'admin_theme_settings');
|
||||
theme_admin_post($this->appHelper);
|
||||
theme_admin_post();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class Markers extends BaseApi
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($timeline) || empty($last_read_id) || empty($application['id'])) {
|
||||
if ($timeline === '' || $last_read_id === '' || empty($application['id'])) {
|
||||
$this->logAndJsonError(422, $this->errorFactory->UnprocessableEntity());
|
||||
}
|
||||
|
||||
|
|
|
@ -28,12 +28,12 @@ class Show extends ContactEndpoint
|
|||
$target_cid = BaseApi::getContactIDForSearchterm($this->getRequestValue($request, 'target_screen_name', ''), '', $this->getRequestValue($request, 'target_id', 0), $uid);
|
||||
|
||||
$source = Contact::getById($source_cid);
|
||||
if (empty($source)) {
|
||||
if ($source === false) {
|
||||
throw new NotFoundException('Source not found');
|
||||
}
|
||||
|
||||
$target = Contact::getById($target_cid);
|
||||
if (empty($source)) {
|
||||
if ($target === false) {
|
||||
throw new NotFoundException('Target not found');
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ abstract class BaseNotifications extends BaseModule
|
|||
|
||||
$notif_tpl = Renderer::getMarkupTemplate('notifications/notifications.tpl');
|
||||
return Renderer::replaceMacros($notif_tpl, [
|
||||
'$header' => $header ?? $this->t('Notifications'),
|
||||
'$header' => $header ?: $this->t('Notifications'),
|
||||
'$tabs' => $tabs,
|
||||
'$notifications' => $notifications,
|
||||
'$noContent' => $noContent,
|
||||
|
|
|
@ -140,9 +140,9 @@ class API extends BaseModule
|
|||
$share = intval($request['share'] ?? 0);
|
||||
$isPreview = intval($request['preview'] ?? 0);
|
||||
|
||||
$start = DateTimeFormat::convert($strStartDateTime ?? DBA::NULL_DATETIME, 'UTC', $this->timezone);
|
||||
$start = DateTimeFormat::convert($strStartDateTime, 'UTC', $this->timezone);
|
||||
if (!$noFinish) {
|
||||
$finish = DateTimeFormat::convert($strFinishDateTime ?? DBA::NULL_DATETIME, 'UTC', $this->timezone);
|
||||
$finish = DateTimeFormat::convert($strFinishDateTime, 'UTC', $this->timezone);
|
||||
} else {
|
||||
$finish = DBA::NULL_DATETIME;
|
||||
}
|
||||
|
|
|
@ -70,6 +70,8 @@ class Circle extends BaseModule
|
|||
throw new \Exception(DI::l10n()->t('Permission denied.'), 403);
|
||||
}
|
||||
|
||||
$message = '';
|
||||
|
||||
if (isset($this->parameters['command'])) {
|
||||
$circle_id = $this->parameters['circle'];
|
||||
$contact_id = $this->parameters['contact'];
|
||||
|
@ -169,7 +171,9 @@ class Circle extends BaseModule
|
|||
]);
|
||||
}
|
||||
|
||||
$nocircle = false;
|
||||
$nocircle = false;
|
||||
$members = [];
|
||||
$preselected = [];
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
if ((DI::args()->getArgc() == 2) && (DI::args()->getArgv()[1] === 'none') ||
|
||||
|
@ -181,9 +185,6 @@ class Circle extends BaseModule
|
|||
'name' => DI::l10n()->t('Contacts not in any circle'),
|
||||
];
|
||||
|
||||
$members = [];
|
||||
$preselected = [];
|
||||
|
||||
$context = $context + [
|
||||
'$title' => $circle['name'],
|
||||
'$gname' => ['circle_name', DI::l10n()->t('Circle Name: '), $circle['name'], ''],
|
||||
|
|
|
@ -42,7 +42,7 @@ function theme_admin(AppHelper $appHelper)
|
|||
return clean_form($appHelper, $colorset, $user);
|
||||
}
|
||||
|
||||
function theme_admin_post(AppHelper $appHelper)
|
||||
function theme_admin_post()
|
||||
{
|
||||
if (isset($_POST['duepuntozero-settings-submit'])) {
|
||||
DI::config()->set('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
|
||||
|
|
|
@ -46,7 +46,7 @@ function theme_admin(AppHelper $appHelper) {
|
|||
return quattro_form($appHelper,$align, $color, $tfs, $pfs);
|
||||
}
|
||||
|
||||
function theme_admin_post(AppHelper $appHelper) {
|
||||
function theme_admin_post() {
|
||||
if (isset($_POST['quattro-settings-submit'])){
|
||||
DI::config()->set('quattro', 'align', $_POST['quattro_align']);
|
||||
DI::config()->set('quattro', 'color', $_POST['quattro_color']);
|
||||
|
|
|
@ -91,7 +91,7 @@ function theme_admin(AppHelper $appHelper) {
|
|||
return $o;
|
||||
}
|
||||
|
||||
function theme_admin_post(AppHelper $appHelper) {
|
||||
function theme_admin_post() {
|
||||
if (isset($_POST['vier-settings-submit'])){
|
||||
DI::config()->set('vier', 'style', $_POST['vier_style']);
|
||||
DI::config()->set('vier', 'show_pages', $_POST['vier_show_pages']);
|
||||
|
|
Loading…
Reference in a new issue