Merge remote-tracking branch 'upstream/develop' into user-contact

This commit is contained in:
Michael 2021-10-02 11:57:43 +00:00
commit 865006682a
54 changed files with 4237 additions and 4188 deletions

View file

@ -25,7 +25,6 @@ use Friendica\DI;
use Friendica\Core\Renderer;
use Friendica\Core\Theme;
use Friendica\Module\BaseAdmin;
use Friendica\Model\Log\ParsedLogIterator;
use Psr\Log\LogLevel;
class View extends BaseAdmin
@ -68,7 +67,7 @@ class View extends BaseAdmin
}
if (!file_exists($f)) {
$error = DI::l10n()->t('Error trying to open <strong>%1$s</strong> log file.\r\n<br/>Check to see if file %1$s exist and is readable.', $f);
$error = DI::l10n()->t('Error trying to open <strong>%1$s</strong> log file.<br/>Check to see if file %1$s exist and is readable.', $f);
} else {
try {
$data = DI::parsedLogIterator()
@ -77,12 +76,33 @@ class View extends BaseAdmin
->withFilters($filters)
->withSearch($search);
} catch (Exception $e) {
$error = DI::l10n()->t('Couldn\'t open <strong>%1$s</strong> log file.\r\n<br/>Check to see if file %1$s is readable.', $f);
$error = DI::l10n()->t('Couldn\'t open <strong>%1$s</strong> log file.<br/>Check to see if file %1$s is readable.', $f);
}
}
return Renderer::replaceMacros($t, [
'$title' => DI::l10n()->t('Administration'),
'$page' => DI::l10n()->t('View Logs'),
'$title' => DI::l10n()->t('Administration'),
'$page' => DI::l10n()->t('View Logs'),
'$l10n' => [
'Search' => DI::l10n()->t('Search'),
'Search_in_logs' => DI::l10n()->t('Search in logs'),
'Show_all' => DI::l10n()->t('Show all'),
'Date' => DI::l10n()->t('Date'),
'Level' => DI::l10n()->t('Level'),
'Context' => DI::l10n()->t('Context'),
'Message' => DI::l10n()->t('Message'),
'ALL' => DI::l10n()->t('ALL'),
'View_details' => DI::l10n()->t('View details'),
'Click_to_view_details' => DI::l10n()->t('Click to view details'),
'Event_details' => DI::l10n()->t('Event details'),
'Data' => DI::l10n()->t('Data'),
'Source' => DI::l10n()->t('Source'),
'File' => DI::l10n()->t('File'),
'Line' => DI::l10n()->t('Line'),
'Function' => DI::l10n()->t('Function'),
'UID' => DI::l10n()->t('UID'),
'Process_ID' => DI::l10n()->t('Process ID'),
'Close' => DI::l10n()->t('Close'),
],
'$data' => $data,
'$q' => $search,
'$filters' => $filters,

View file

@ -38,7 +38,6 @@ class Bookmarklet extends BaseModule
{
$_GET['mode'] = 'minimal';
$app = DI::app();
$config = DI::config();
if (!local_user()) {
@ -61,7 +60,7 @@ class Bookmarklet extends BaseModule
'title' => trim($_REQUEST['title'] ?? '', '*'),
'content' => $content
];
$output = status_editor($app, $x, 0, false);
$output = DI::conversation()->statusEditor($x, 0, false);
$output .= "<script>window.resizeTo(800,550);</script>";
} else {
$output = '<h2>' . DI::l10n()->t('The post was created') . '</h2>';

View file

@ -951,7 +951,7 @@ class Contact extends BaseModule
if (!$update) {
// We need the editor here to be able to reshare an item.
if (local_user()) {
$o = status_editor($a, [], 0, true);
$o = DI::conversation()->statusEditor([], 0, true);
}
}

View file

@ -127,7 +127,7 @@ class Community extends BaseModule
// We need the editor here to be able to reshare an item.
if (Session::isAuthenticated()) {
$o .= status_editor(DI::app(), [], 0, true);
$o .= DI::conversation()->statusEditor([], 0, true);
}
}
@ -138,7 +138,7 @@ class Community extends BaseModule
return $o;
}
$o .= conversation(DI::app(), $items, 'community', false, false, 'commented', local_user());
$o .= DI::conversation()->create($items, 'community', false, false, 'commented', local_user());
$pager = new BoundariesPager(
DI::l10n(),

View file

@ -145,7 +145,7 @@ class Network extends BaseModule
'content' => $content,
];
$o .= status_editor($a, $x);
$o .= DI::conversation()->statusEditor($x);
}
if (self::$groupId) {
@ -178,7 +178,7 @@ class Network extends BaseModule
$ordering = '`commented`';
}
$o .= conversation(DI::app(), $items, 'network', false, false, $ordering, local_user());
$o .= DI::conversation()->create($items, 'network', false, false, $ordering, local_user());
if (DI::pConfig()->get(local_user(), 'system', 'infinite_scroll')) {
$o .= HTML::scrollLoader();

View file

@ -132,7 +132,7 @@ class Status extends BaseProfile
'profile_uid' => $profile['uid'],
];
$o .= status_editor($a, $x);
$o .= DI::conversation()->statusEditor($x);
}
// Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched his/her groups
@ -224,7 +224,7 @@ class Status extends BaseProfile
$items = array_merge($items, $pinned);
}
$o .= conversation($a, $items, 'profile', false, false, 'pinned_received', $profile['uid']);
$o .= DI::conversation()->create($items, 'profile', false, false, 'pinned_received', $profile['uid']);
$o .= $pager->renderMinimal(count($items));

View file

@ -79,7 +79,7 @@ class Filed extends BaseSearch
$items = Post::toArray(Post::selectForUser(local_user(), Item::DISPLAY_FIELDLIST, $item_condition, $item_params));
$o .= conversation(DI::app(), $items, 'filed', false, false, '', local_user());
$o .= DI::conversation()->create($items, 'filed', false, false, '', local_user());
if (DI::pConfig()->get(local_user(), 'system', 'infinite_scroll')) {
$o .= HTML::scrollLoader();

View file

@ -200,7 +200,7 @@ class Index extends BaseSearch
Logger::info('Start Conversation.', ['q' => $search]);
$o .= conversation(DI::app(), $items, 'search', false, false, 'commented', local_user());
$o .= DI::conversation()->create($items, 'search', false, false, 'commented', local_user());
if (DI::pConfig()->get(local_user(), 'system', 'infinite_scroll')) {
$o .= HTML::scrollLoader();

View file

@ -39,7 +39,7 @@ class Community extends CommunityModule
$o = '';
if (!empty($_GET['force']) || !DI::pConfig()->get(local_user(), 'system', 'no_auto_update')) {
$o = conversation(DI::app(), self::getItems(), 'community', true, false, 'commented', local_user());
$o = DI::conversation()->create(self::getItems(), 'community', true, false, 'commented', local_user());
}
System::htmlUpdateExit($o);

View file

@ -53,7 +53,7 @@ class Network extends NetworkModule
$ordering = '`commented`';
}
$o = conversation(DI::app(), $items, 'network', $profile_uid, false, $ordering, local_user());
$o = DI::conversation()->create($items, 'network', $profile_uid, false, $ordering, local_user());
}
System::htmlUpdateExit($o);

View file

@ -115,7 +115,7 @@ class Profile extends BaseModule
$items = DBA::toArray($items_stmt);
$o .= conversation($a, $items, 'profile', $a->getProfileOwner(), false, 'received', $a->getProfileOwner());
$o .= DI::conversation()->create($items, 'profile', $a->getProfileOwner(), false, 'received', $a->getProfileOwner());
System::htmlUpdateExit($o);
}