kopia lustrzana https://github.com/friendica/friendica
commit
809035b872
|
@ -33,7 +33,7 @@ class Source extends BaseAdmin
|
||||||
{
|
{
|
||||||
parent::content($parameters);
|
parent::content($parameters);
|
||||||
|
|
||||||
$guid = basename($_REQUEST['guid'] ?? '') ?: $parameters['guid'];
|
$guid = basename($_REQUEST['guid'] ?? $parameters['guid'] ?? '');
|
||||||
|
|
||||||
$source = '';
|
$source = '';
|
||||||
$item_uri = '';
|
$item_uri = '';
|
||||||
|
|
|
@ -103,6 +103,10 @@ class Objects extends BaseModule
|
||||||
|
|
||||||
if (empty($parameters['activity']) && ($item['gravity'] != GRAVITY_ACTIVITY)) {
|
if (empty($parameters['activity']) && ($item['gravity'] != GRAVITY_ACTIVITY)) {
|
||||||
$activity = ActivityPub\Transmitter::createActivityFromItem($item['id'], true);
|
$activity = ActivityPub\Transmitter::createActivityFromItem($item['id'], true);
|
||||||
|
if (empty($activity['type'])) {
|
||||||
|
throw new HTTPException\NotFoundException();
|
||||||
|
}
|
||||||
|
|
||||||
$activity['type'] = $activity['type'] == 'Update' ? 'Create' : $activity['type'];
|
$activity['type'] = $activity['type'] == 'Update' ? 'Create' : $activity['type'];
|
||||||
|
|
||||||
// Only display "Create" activity objects here, no reshares or anything else
|
// Only display "Create" activity objects here, no reshares or anything else
|
||||||
|
|
|
@ -1003,10 +1003,10 @@ class Transmitter
|
||||||
* @param integer $item_id
|
* @param integer $item_id
|
||||||
* @param boolean $object_mode Is the activity item is used inside another object?
|
* @param boolean $object_mode Is the activity item is used inside another object?
|
||||||
*
|
*
|
||||||
* @return array of activity
|
* @return false|array
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function createActivityFromItem($item_id, $object_mode = false)
|
public static function createActivityFromItem(int $item_id, bool $object_mode = false)
|
||||||
{
|
{
|
||||||
Logger::info('Fetching activity', ['item' => $item_id]);
|
Logger::info('Fetching activity', ['item' => $item_id]);
|
||||||
$item = Item::selectFirst([], ['id' => $item_id, 'parent-network' => Protocol::NATIVE_SUPPORT]);
|
$item = Item::selectFirst([], ['id' => $item_id, 'parent-network' => Protocol::NATIVE_SUPPORT]);
|
||||||
|
|
|
@ -25,7 +25,10 @@ function vier_init(App $a)
|
||||||
|
|
||||||
Renderer::setActiveTemplateEngine('smarty3');
|
Renderer::setActiveTemplateEngine('smarty3');
|
||||||
|
|
||||||
if (!empty($a->argv[0]) && ($a->argv[0] . ($a->argv[1] ?? '')) === ('profile' . ($a->user['nickname'] ?? '')) || $a->argv[0] === 'network' && local_user()) {
|
$args = DI::args();
|
||||||
|
|
||||||
|
if ($args->get(0) === 'profile' && $args->get(1) === ($a->user['nickname'] ?? '') || $args->get(0) === 'network' && local_user()
|
||||||
|
) {
|
||||||
vier_community_info();
|
vier_community_info();
|
||||||
|
|
||||||
DI::page()['htmlhead'] .= "<link rel='stylesheet' type='text/css' href='view/theme/vier/wide.css' media='screen and (min-width: 1300px)'/>\n";
|
DI::page()['htmlhead'] .= "<link rel='stylesheet' type='text/css' href='view/theme/vier/wide.css' media='screen and (min-width: 1300px)'/>\n";
|
||||||
|
@ -77,7 +80,7 @@ EOT;
|
||||||
|
|
||||||
// Hide the left menu bar
|
// Hide the left menu bar
|
||||||
/// @TODO maybe move this static array out where it should belong?
|
/// @TODO maybe move this static array out where it should belong?
|
||||||
if (empty(DI::page()['aside']) && in_array($a->argv[0], ["community", "events", "help", "delegation", "notifications",
|
if (empty(DI::page()['aside']) && in_array($args->get(0), ["community", "events", "help", "delegation", "notifications",
|
||||||
"probe", "webfinger", "login", "invite", "credits"])) {
|
"probe", "webfinger", "login", "invite", "credits"])) {
|
||||||
DI::page()['htmlhead'] .= "<link rel='stylesheet' href='view/theme/vier/hide.css' />";
|
DI::page()['htmlhead'] .= "<link rel='stylesheet' href='view/theme/vier/hide.css' />";
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue