Merge pull request #10823 from annando/photo-guid
Access contact avatars by guid
This commit is contained in:
commit
ac9e5df614
|
@ -1,6 +1,6 @@
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
-- Friendica 2021.12-dev (Siberian Iris)
|
-- Friendica 2021.12-dev (Siberian Iris)
|
||||||
-- DB_UPDATE_VERSION 1436
|
-- DB_UPDATE_VERSION 1437
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@ -2355,6 +2355,7 @@ CREATE VIEW `account-view` AS SELECT
|
||||||
`contact`.`url` AS `url`,
|
`contact`.`url` AS `url`,
|
||||||
`contact`.`nurl` AS `nurl`,
|
`contact`.`nurl` AS `nurl`,
|
||||||
`contact`.`uri-id` AS `uri-id`,
|
`contact`.`uri-id` AS `uri-id`,
|
||||||
|
`item-uri`.`guid` AS `guid`,
|
||||||
`contact`.`addr` AS `addr`,
|
`contact`.`addr` AS `addr`,
|
||||||
`contact`.`alias` AS `alias`,
|
`contact`.`alias` AS `alias`,
|
||||||
`contact`.`name` AS `name`,
|
`contact`.`name` AS `name`,
|
||||||
|
@ -2424,6 +2425,7 @@ CREATE VIEW `account-view` AS SELECT
|
||||||
`apcontact`.`followers_count` AS `ap-followers_count`,
|
`apcontact`.`followers_count` AS `ap-followers_count`,
|
||||||
`apcontact`.`statuses_count` AS `ap-statuses_count`
|
`apcontact`.`statuses_count` AS `ap-statuses_count`
|
||||||
FROM `contact`
|
FROM `contact`
|
||||||
|
LEFT JOIN `item-uri` ON `item-uri`.`id` = `contact`.`uri-id`
|
||||||
LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `contact`.`uri-id`
|
LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `contact`.`uri-id`
|
||||||
LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = contact.`uri-id`
|
LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = contact.`uri-id`
|
||||||
WHERE `contact`.`uid` = 0;
|
WHERE `contact`.`uid` = 0;
|
||||||
|
@ -2439,6 +2441,7 @@ CREATE VIEW `account-user-view` AS SELECT
|
||||||
`contact`.`url` AS `url`,
|
`contact`.`url` AS `url`,
|
||||||
`contact`.`nurl` AS `nurl`,
|
`contact`.`nurl` AS `nurl`,
|
||||||
`contact`.`uri-id` AS `uri-id`,
|
`contact`.`uri-id` AS `uri-id`,
|
||||||
|
`item-uri`.`guid` AS `guid`,
|
||||||
`contact`.`addr` AS `addr`,
|
`contact`.`addr` AS `addr`,
|
||||||
`contact`.`alias` AS `alias`,
|
`contact`.`alias` AS `alias`,
|
||||||
`contact`.`name` AS `name`,
|
`contact`.`name` AS `name`,
|
||||||
|
@ -2522,6 +2525,7 @@ CREATE VIEW `account-user-view` AS SELECT
|
||||||
`apcontact`.`statuses_count` AS `ap-statuses_count`
|
`apcontact`.`statuses_count` AS `ap-statuses_count`
|
||||||
FROM `contact` AS `ucontact`
|
FROM `contact` AS `ucontact`
|
||||||
INNER JOIN `contact` ON `contact`.`uri-id` = `ucontact`.`uri-id` AND `contact`.`uid` = 0
|
INNER JOIN `contact` ON `contact`.`uri-id` = `ucontact`.`uri-id` AND `contact`.`uid` = 0
|
||||||
|
LEFT JOIN `item-uri` ON `item-uri`.`id` = `ucontact`.`uri-id`
|
||||||
LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `ucontact`.`uri-id`
|
LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `ucontact`.`uri-id`
|
||||||
LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = `ucontact`.`uri-id` AND `fcontact`.`network` = 'dspr';
|
LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = `ucontact`.`uri-id` AND `fcontact`.`network` = 'dspr';
|
||||||
|
|
||||||
|
|
|
@ -1726,15 +1726,18 @@ class Contact
|
||||||
* @param string $updated Contact update date
|
* @param string $updated Contact update date
|
||||||
* @return string avatar link
|
* @return string avatar link
|
||||||
*/
|
*/
|
||||||
public static function getAvatarUrlForId(int $cid, string $size = '', string $updated = ''):string
|
public static function getAvatarUrlForId(int $cid, string $size = '', string $updated = '', string $guid = ''):string
|
||||||
{
|
{
|
||||||
// We have to fetch the "updated" variable when it wasn't provided
|
// We have to fetch the "updated" variable when it wasn't provided
|
||||||
// The parameter can be provided to improve performance
|
// The parameter can be provided to improve performance
|
||||||
if (empty($updated)) {
|
if (empty($updated) || empty($guid)) {
|
||||||
$contact = self::getById($cid, ['updated']);
|
$account = DBA::selectFirst('account-user-view', ['updated', 'guid'], ['id' => $cid]);
|
||||||
$updated = $contact['updated'] ?? '';
|
$updated = $account['updated'] ?? '';
|
||||||
|
$guid = $account['guid'] ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$guid = urlencode($guid);
|
||||||
|
|
||||||
$url = DI::baseUrl() . '/photo/contact/';
|
$url = DI::baseUrl() . '/photo/contact/';
|
||||||
switch ($size) {
|
switch ($size) {
|
||||||
case Proxy::SIZE_MICRO:
|
case Proxy::SIZE_MICRO:
|
||||||
|
@ -1753,7 +1756,7 @@ class Contact
|
||||||
$url .= Proxy::PIXEL_LARGE . '/';
|
$url .= Proxy::PIXEL_LARGE . '/';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $url . $cid . ($updated ? '?ts=' . strtotime($updated) : '');
|
return $url . ($guid ?: $cid) . ($updated ? '?ts=' . strtotime($updated) : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1780,15 +1783,18 @@ class Contact
|
||||||
* @param string $updated Contact update date
|
* @param string $updated Contact update date
|
||||||
* @return string header link
|
* @return string header link
|
||||||
*/
|
*/
|
||||||
public static function getHeaderUrlForId(int $cid, string $size = '', string $updated = ''):string
|
public static function getHeaderUrlForId(int $cid, string $size = '', string $updated = '', string $guid = ''):string
|
||||||
{
|
{
|
||||||
// We have to fetch the "updated" variable when it wasn't provided
|
// We have to fetch the "updated" variable when it wasn't provided
|
||||||
// The parameter can be provided to improve performance
|
// The parameter can be provided to improve performance
|
||||||
if (empty($updated)) {
|
if (empty($updated) || empty($guid)) {
|
||||||
$contact = self::getById($cid, ['updated']);
|
$account = DBA::selectFirst('account-user-view', ['updated', 'guid'], ['id' => $cid]);
|
||||||
$updated = $contact['updated'] ?? '';
|
$updated = $account['updated'] ?? '';
|
||||||
|
$guid = $account['guid'] ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$guid = urlencode($guid);
|
||||||
|
|
||||||
$url = DI::baseUrl() . '/photo/header/';
|
$url = DI::baseUrl() . '/photo/header/';
|
||||||
switch ($size) {
|
switch ($size) {
|
||||||
case Proxy::SIZE_MICRO:
|
case Proxy::SIZE_MICRO:
|
||||||
|
@ -1808,7 +1814,7 @@ class Contact
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $url . $cid . ($updated ? '?ts=' . strtotime($updated) : '');
|
return $url . ($guid ?: $cid) . ($updated ? '?ts=' . strtotime($updated) : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2184,7 +2190,7 @@ class Contact
|
||||||
}
|
}
|
||||||
|
|
||||||
$update = false;
|
$update = false;
|
||||||
$guid = $ret['guid'] ?? '';
|
$guid = ($ret['guid'] ?? '') ?: Item::guidFromUri($ret['url'], parse_url($ret['url'], PHP_URL_HOST));
|
||||||
|
|
||||||
// make sure to not overwrite existing values with blank entries except some technical fields
|
// make sure to not overwrite existing values with blank entries except some technical fields
|
||||||
$keep = ['batch', 'notify', 'poll', 'request', 'confirm', 'poco', 'baseurl'];
|
$keep = ['batch', 'notify', 'poll', 'request', 'confirm', 'poco', 'baseurl'];
|
||||||
|
@ -2212,6 +2218,8 @@ class Contact
|
||||||
self::updateAvatar($id, $ret['photo'], $update);
|
self::updateAvatar($id, $ret['photo'], $update);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$uriid = ItemURI::insert(['uri' => $ret['url'], 'guid' => $guid]);
|
||||||
|
|
||||||
if (!$update) {
|
if (!$update) {
|
||||||
self::updateContact($id, $uid, $contact['url'], $ret['url'], ['failed' => false, 'last-update' => $updated, 'success_update' => $updated]);
|
self::updateContact($id, $uid, $contact['url'], $ret['url'], ['failed' => false, 'last-update' => $updated, 'success_update' => $updated]);
|
||||||
|
|
||||||
|
@ -2230,12 +2238,7 @@ class Contact
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($guid)) {
|
$ret['uri-id'] = $uriid;
|
||||||
$ret['uri-id'] = ItemURI::getIdByURI($ret['url']);
|
|
||||||
} else {
|
|
||||||
$ret['uri-id'] = ItemURI::insert(['uri' => $ret['url'], 'guid' => $guid]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$ret['nurl'] = Strings::normaliseLink($ret['url']);
|
$ret['nurl'] = Strings::normaliseLink($ret['url']);
|
||||||
$ret['updated'] = $updated;
|
$ret['updated'] = $updated;
|
||||||
$ret['failed'] = false;
|
$ret['failed'] = false;
|
||||||
|
|
|
@ -82,6 +82,21 @@ class Photo extends BaseModule
|
||||||
$square_resize = !in_array($parameters['type'], ['media', 'preview']);
|
$square_resize = !in_array($parameters['type'], ['media', 'preview']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($parameters['guid'])) {
|
||||||
|
$guid = $parameters['guid'];
|
||||||
|
$account = DBA::selectFirst('account-user-view', ['id'], ['guid' => $guid], ['order' => ['uid' => true]]);
|
||||||
|
if (empty($account)) {
|
||||||
|
throw new HTTPException\NotFoundException();
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = $account['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Contact Id Fallback, to remove after version 2021.12
|
||||||
|
if (isset($parameters['contact_id'])) {
|
||||||
|
$id = intval($parameters['contact_id']);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($parameters['nickname_ext'])) {
|
if (!empty($parameters['nickname_ext'])) {
|
||||||
$nickname = pathinfo($parameters['nickname_ext'], PATHINFO_FILENAME);
|
$nickname = pathinfo($parameters['nickname_ext'], PATHINFO_FILENAME);
|
||||||
$user = User::getByNickname($nickname, ['uid']);
|
$user = User::getByNickname($nickname, ['uid']);
|
||||||
|
@ -89,20 +104,25 @@ class Photo extends BaseModule
|
||||||
throw new HTTPException\NotFoundException();
|
throw new HTTPException\NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$uid = $user['uid'];
|
$id = $user['uid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// User Id Fallback, to remove after version 2021.12
|
// User Id Fallback, to remove after version 2021.12
|
||||||
if (!empty($parameters['uid_ext'])) {
|
if (!empty($parameters['uid_ext'])) {
|
||||||
$uid = intval(pathinfo($parameters['uid_ext'], PATHINFO_FILENAME));
|
$id = intval(pathinfo($parameters['uid_ext'], PATHINFO_FILENAME));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Please refactor this for the love of everything that's good
|
// Please refactor this for the love of everything that's good
|
||||||
if (isset($parameters['id'])) {
|
if (isset($parameters['id'])) {
|
||||||
$uid = $parameters['id'];
|
$id = $parameters['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$photo = self::getAvatar($uid, $parameters['type'], $customsize ?: Proxy::PIXEL_SMALL);
|
if (empty($id)) {
|
||||||
|
Logger::notice('No picture id was detected', ['parameters' => $parameters, 'query' => DI::args()->getQueryString()]);
|
||||||
|
throw new HTTPException\NotFoundException(DI::l10n()->t('The Photo is not available.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$photo = self::getPhotoByid($id, $parameters['type'], $customsize ?: Proxy::PIXEL_SMALL);
|
||||||
} else {
|
} else {
|
||||||
$photoid = pathinfo($parameters['name'], PATHINFO_FILENAME);
|
$photoid = pathinfo($parameters['name'], PATHINFO_FILENAME);
|
||||||
$scale = 0;
|
$scale = 0;
|
||||||
|
@ -202,11 +222,11 @@ class Photo extends BaseModule
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getAvatar(int $uid, $type, $customsize)
|
private static function getPhotoByid(int $id, $type, $customsize)
|
||||||
{
|
{
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case "preview":
|
case "preview":
|
||||||
$media = DBA::selectFirst('post-media', ['preview', 'url', 'mimetype', 'type', 'uri-id'], ['id' => $uid]);
|
$media = DBA::selectFirst('post-media', ['preview', 'url', 'mimetype', 'type', 'uri-id'], ['id' => $id]);
|
||||||
if (empty($media)) {
|
if (empty($media)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -226,7 +246,7 @@ class Photo extends BaseModule
|
||||||
|
|
||||||
return MPhoto::createPhotoForExternalResource($url, (int)local_user(), $media['mimetype']);
|
return MPhoto::createPhotoForExternalResource($url, (int)local_user(), $media['mimetype']);
|
||||||
case "media":
|
case "media":
|
||||||
$media = DBA::selectFirst('post-media', ['url', 'mimetype', 'uri-id'], ['id' => $uid, 'type' => Post\Media::IMAGE]);
|
$media = DBA::selectFirst('post-media', ['url', 'mimetype', 'uri-id'], ['id' => $id, 'type' => Post\Media::IMAGE]);
|
||||||
if (empty($media)) {
|
if (empty($media)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -237,14 +257,14 @@ class Photo extends BaseModule
|
||||||
|
|
||||||
return MPhoto::createPhotoForExternalResource($media['url'], (int)local_user(), $media['mimetype']);
|
return MPhoto::createPhotoForExternalResource($media['url'], (int)local_user(), $media['mimetype']);
|
||||||
case "link":
|
case "link":
|
||||||
$link = DBA::selectFirst('post-link', ['url', 'mimetype'], ['id' => $uid]);
|
$link = DBA::selectFirst('post-link', ['url', 'mimetype'], ['id' => $id]);
|
||||||
if (empty($link)) {
|
if (empty($link)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return MPhoto::createPhotoForExternalResource($link['url'], (int)local_user(), $link['mimetype']);
|
return MPhoto::createPhotoForExternalResource($link['url'], (int)local_user(), $link['mimetype']);
|
||||||
case "contact":
|
case "contact":
|
||||||
$contact = Contact::getById($uid, ['uid', 'url', 'avatar', 'photo', 'xmpp', 'addr']);
|
$contact = Contact::getById($id, ['uid', 'url', 'avatar', 'photo', 'xmpp', 'addr']);
|
||||||
if (empty($contact)) {
|
if (empty($contact)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -273,7 +293,7 @@ class Photo extends BaseModule
|
||||||
}
|
}
|
||||||
return MPhoto::createPhotoForExternalResource($url);
|
return MPhoto::createPhotoForExternalResource($url);
|
||||||
case "header":
|
case "header":
|
||||||
$contact = Contact::getById($uid, ['uid', 'url', 'header']);
|
$contact = Contact::getById($id, ['uid', 'url', 'header']);
|
||||||
if (empty($contact)) {
|
if (empty($contact)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -298,9 +318,9 @@ class Photo extends BaseModule
|
||||||
$scale = 5;
|
$scale = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$photo = MPhoto::selectFirst([], ["scale" => $scale, "uid" => $uid, "profile" => 1]);
|
$photo = MPhoto::selectFirst([], ["scale" => $scale, "uid" => $id, "profile" => 1]);
|
||||||
if (empty($photo)) {
|
if (empty($photo)) {
|
||||||
$contact = DBA::selectFirst('contact', [], ['uid' => $uid, 'self' => true]) ?: [];
|
$contact = DBA::selectFirst('contact', [], ['uid' => $id, 'self' => true]) ?: [];
|
||||||
|
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case "profile":
|
case "profile":
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
if (!defined('DB_UPDATE_VERSION')) {
|
if (!defined('DB_UPDATE_VERSION')) {
|
||||||
define('DB_UPDATE_VERSION', 1436);
|
define('DB_UPDATE_VERSION', 1437);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -98,8 +98,7 @@ return [
|
||||||
"comment" => "The local users",
|
"comment" => "The local users",
|
||||||
"fields" => [
|
"fields" => [
|
||||||
"uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
|
"uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
|
||||||
"parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"],
|
"parent-uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "The parent user that has full control about this user"],
|
||||||
"comment" => "The parent user that has full control about this user"],
|
|
||||||
"guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
|
"guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
|
||||||
"username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
|
"username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
|
||||||
"password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
|
"password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
|
||||||
|
|
|
@ -825,6 +825,7 @@
|
||||||
"url" => ["contact", "url"],
|
"url" => ["contact", "url"],
|
||||||
"nurl" => ["contact", "nurl"],
|
"nurl" => ["contact", "nurl"],
|
||||||
"uri-id" => ["contact", "uri-id"],
|
"uri-id" => ["contact", "uri-id"],
|
||||||
|
"guid" => ["item-uri", "guid"],
|
||||||
"addr" => ["contact", "addr"],
|
"addr" => ["contact", "addr"],
|
||||||
"alias" => ["contact", "alias"],
|
"alias" => ["contact", "alias"],
|
||||||
"name" => ["contact", "name"],
|
"name" => ["contact", "name"],
|
||||||
|
@ -895,6 +896,7 @@
|
||||||
"ap-statuses_count" => ["apcontact", "statuses_count"],
|
"ap-statuses_count" => ["apcontact", "statuses_count"],
|
||||||
],
|
],
|
||||||
"query" => "FROM `contact`
|
"query" => "FROM `contact`
|
||||||
|
LEFT JOIN `item-uri` ON `item-uri`.`id` = `contact`.`uri-id`
|
||||||
LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `contact`.`uri-id`
|
LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `contact`.`uri-id`
|
||||||
LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = contact.`uri-id`
|
LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = contact.`uri-id`
|
||||||
WHERE `contact`.`uid` = 0"
|
WHERE `contact`.`uid` = 0"
|
||||||
|
@ -907,6 +909,7 @@
|
||||||
"url" => ["contact", "url"],
|
"url" => ["contact", "url"],
|
||||||
"nurl" => ["contact", "nurl"],
|
"nurl" => ["contact", "nurl"],
|
||||||
"uri-id" => ["contact", "uri-id"],
|
"uri-id" => ["contact", "uri-id"],
|
||||||
|
"guid" => ["item-uri", "guid"],
|
||||||
"addr" => ["contact", "addr"],
|
"addr" => ["contact", "addr"],
|
||||||
"alias" => ["contact", "alias"],
|
"alias" => ["contact", "alias"],
|
||||||
"name" => ["contact", "name"],
|
"name" => ["contact", "name"],
|
||||||
|
@ -991,6 +994,7 @@
|
||||||
],
|
],
|
||||||
"query" => "FROM `contact` AS `ucontact`
|
"query" => "FROM `contact` AS `ucontact`
|
||||||
INNER JOIN `contact` ON `contact`.`uri-id` = `ucontact`.`uri-id` AND `contact`.`uid` = 0
|
INNER JOIN `contact` ON `contact`.`uri-id` = `ucontact`.`uri-id` AND `contact`.`uid` = 0
|
||||||
|
LEFT JOIN `item-uri` ON `item-uri`.`id` = `ucontact`.`uri-id`
|
||||||
LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `ucontact`.`uri-id`
|
LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `ucontact`.`uri-id`
|
||||||
LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = `ucontact`.`uri-id` AND `fcontact`.`network` = 'dspr'"
|
LEFT JOIN `fcontact` ON `fcontact`.`uri-id` = `ucontact`.`uri-id` AND `fcontact`.`network` = 'dspr'"
|
||||||
],
|
],
|
||||||
|
|
|
@ -373,15 +373,18 @@ return [
|
||||||
'/permission/tooltip/{type}/{id:\d+}' => [Module\PermissionTooltip::class, [R::GET]],
|
'/permission/tooltip/{type}/{id:\d+}' => [Module\PermissionTooltip::class, [R::GET]],
|
||||||
|
|
||||||
'/photo' => [
|
'/photo' => [
|
||||||
'/{name}' => [Module\Photo::class, [R::GET]],
|
'/{name}' => [Module\Photo::class, [R::GET]],
|
||||||
'/{type}/{id:\d+}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{id:\d+}' => [Module\Photo::class, [R::GET]],
|
||||||
// User Id Fallback, to remove after version 2021.12
|
// User Id Fallback, to remove after version 2021.12
|
||||||
'/{type}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
|
||||||
'/{type}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
||||||
'/{type}/{customsize}/{id:\d+}' => [Module\Photo::class, [R::GET]],
|
// Contact Id Fallback, to remove after version 2021.12
|
||||||
|
'/{type:contact|header}/{customsize:\d+}/{contact_id:\d+}' => [Module\Photo::class, [R::GET]],
|
||||||
|
'/{type:contact|header}/{customsize:\d+}/{guid}' => [Module\Photo::class, [R::GET]],
|
||||||
|
'/{type}/{customsize:\d+}/{id:\d+}' => [Module\Photo::class, [R::GET]],
|
||||||
// User Id Fallback, to remove after version 2021.12
|
// User Id Fallback, to remove after version 2021.12
|
||||||
'/{type}/{customsize}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{customsize:\d+}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
|
||||||
'/{type}/{customsize}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{customsize:\d+}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
||||||
],
|
],
|
||||||
|
|
||||||
'/pretheme' => [Module\ThemeDetails::class, [R::GET]],
|
'/pretheme' => [Module\ThemeDetails::class, [R::GET]],
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 2021.12-dev\n"
|
"Project-Id-Version: 2021.12-dev\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-10-03 13:45-0400\n"
|
"POT-Creation-Date: 2021-10-04 06:26+0000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -39,7 +39,7 @@ msgstr ""
|
||||||
|
|
||||||
#: include/api.php:4422 mod/photos.php:89 mod/photos.php:198 mod/photos.php:617
|
#: include/api.php:4422 mod/photos.php:89 mod/photos.php:198 mod/photos.php:617
|
||||||
#: mod/photos.php:1028 mod/photos.php:1045 mod/photos.php:1594
|
#: mod/photos.php:1028 mod/photos.php:1045 mod/photos.php:1594
|
||||||
#: src/Model/User.php:1160 src/Model/User.php:1168 src/Model/User.php:1176
|
#: src/Model/User.php:1164 src/Model/User.php:1172 src/Model/User.php:1180
|
||||||
#: src/Module/Settings/Profile/Photo/Crop.php:101
|
#: src/Module/Settings/Profile/Photo/Crop.php:101
|
||||||
#: src/Module/Settings/Profile/Photo/Crop.php:117
|
#: src/Module/Settings/Profile/Photo/Crop.php:117
|
||||||
#: src/Module/Settings/Profile/Photo/Crop.php:133
|
#: src/Module/Settings/Profile/Photo/Crop.php:133
|
||||||
|
@ -1356,15 +1356,15 @@ msgstr ""
|
||||||
msgid "View Album"
|
msgid "View Album"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/ping.php:286
|
#: mod/ping.php:275
|
||||||
msgid "{0} wants to be your friend"
|
msgid "{0} wants to be your friend"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/ping.php:303
|
#: mod/ping.php:292
|
||||||
msgid "{0} requested registration"
|
msgid "{0} requested registration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: mod/ping.php:316
|
#: mod/ping.php:305
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "{0} and %d others requested registration"
|
msgid "{0} and %d others requested registration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -4324,63 +4324,63 @@ msgstr ""
|
||||||
msgid "Forum"
|
msgid "Forum"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2363
|
#: src/Model/Contact.php:2370
|
||||||
msgid "Disallowed profile URL."
|
msgid "Disallowed profile URL."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2368 src/Module/Friendica.php:81
|
#: src/Model/Contact.php:2375 src/Module/Friendica.php:81
|
||||||
msgid "Blocked domain"
|
msgid "Blocked domain"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2373
|
#: src/Model/Contact.php:2380
|
||||||
msgid "Connect URL missing."
|
msgid "Connect URL missing."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2382
|
#: src/Model/Contact.php:2389
|
||||||
msgid ""
|
msgid ""
|
||||||
"The contact could not be added. Please check the relevant network "
|
"The contact could not be added. Please check the relevant network "
|
||||||
"credentials in your Settings -> Social Networks page."
|
"credentials in your Settings -> Social Networks page."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2419
|
#: src/Model/Contact.php:2426
|
||||||
msgid "The profile address specified does not provide adequate information."
|
msgid "The profile address specified does not provide adequate information."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2421
|
#: src/Model/Contact.php:2428
|
||||||
msgid "No compatible communication protocols or feeds were discovered."
|
msgid "No compatible communication protocols or feeds were discovered."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2424
|
#: src/Model/Contact.php:2431
|
||||||
msgid "An author or name was not found."
|
msgid "An author or name was not found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2427
|
#: src/Model/Contact.php:2434
|
||||||
msgid "No browser URL could be matched to this address."
|
msgid "No browser URL could be matched to this address."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2430
|
#: src/Model/Contact.php:2437
|
||||||
msgid ""
|
msgid ""
|
||||||
"Unable to match @-style Identity Address with a known protocol or email "
|
"Unable to match @-style Identity Address with a known protocol or email "
|
||||||
"contact."
|
"contact."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2431
|
#: src/Model/Contact.php:2438
|
||||||
msgid "Use mailto: in front of address to force email check."
|
msgid "Use mailto: in front of address to force email check."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2437
|
#: src/Model/Contact.php:2444
|
||||||
msgid ""
|
msgid ""
|
||||||
"The profile address specified belongs to a network which has been disabled "
|
"The profile address specified belongs to a network which has been disabled "
|
||||||
"on this site."
|
"on this site."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2442
|
#: src/Model/Contact.php:2449
|
||||||
msgid ""
|
msgid ""
|
||||||
"Limited profile. This person will be unable to receive direct/personal "
|
"Limited profile. This person will be unable to receive direct/personal "
|
||||||
"notifications from you."
|
"notifications from you."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/Contact.php:2501
|
#: src/Model/Contact.php:2508
|
||||||
msgid "Unable to retrieve contact information."
|
msgid "Unable to retrieve contact information."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -4605,7 +4605,7 @@ msgstr ""
|
||||||
msgid "Enter a valid existing folder"
|
msgid "Enter a valid existing folder"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:208 src/Model/User.php:1046
|
#: src/Model/User.php:208 src/Model/User.php:1050
|
||||||
msgid "SERIOUS ERROR: Generation of security keys failed."
|
msgid "SERIOUS ERROR: Generation of security keys failed."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -4636,107 +4636,107 @@ msgid ""
|
||||||
"The password can't contain accentuated letters, white spaces or colons (:)"
|
"The password can't contain accentuated letters, white spaces or colons (:)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:926
|
#: src/Model/User.php:930
|
||||||
msgid "Passwords do not match. Password unchanged."
|
msgid "Passwords do not match. Password unchanged."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:933
|
#: src/Model/User.php:937
|
||||||
msgid "An invitation is required."
|
msgid "An invitation is required."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:937
|
#: src/Model/User.php:941
|
||||||
msgid "Invitation could not be verified."
|
msgid "Invitation could not be verified."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:945
|
#: src/Model/User.php:949
|
||||||
msgid "Invalid OpenID url"
|
msgid "Invalid OpenID url"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:958 src/Security/Authentication.php:223
|
#: src/Model/User.php:962 src/Security/Authentication.php:223
|
||||||
msgid ""
|
msgid ""
|
||||||
"We encountered a problem while logging in with the OpenID you provided. "
|
"We encountered a problem while logging in with the OpenID you provided. "
|
||||||
"Please check the correct spelling of the ID."
|
"Please check the correct spelling of the ID."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:958 src/Security/Authentication.php:223
|
#: src/Model/User.php:962 src/Security/Authentication.php:223
|
||||||
msgid "The error message was:"
|
msgid "The error message was:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:964
|
#: src/Model/User.php:968
|
||||||
msgid "Please enter the required information."
|
msgid "Please enter the required information."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:978
|
#: src/Model/User.php:982
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"system.username_min_length (%s) and system.username_max_length (%s) are "
|
"system.username_min_length (%s) and system.username_max_length (%s) are "
|
||||||
"excluding each other, swapping values."
|
"excluding each other, swapping values."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:985
|
#: src/Model/User.php:989
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Username should be at least %s character."
|
msgid "Username should be at least %s character."
|
||||||
msgid_plural "Username should be at least %s characters."
|
msgid_plural "Username should be at least %s characters."
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: src/Model/User.php:989
|
#: src/Model/User.php:993
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Username should be at most %s character."
|
msgid "Username should be at most %s character."
|
||||||
msgid_plural "Username should be at most %s characters."
|
msgid_plural "Username should be at most %s characters."
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: src/Model/User.php:997
|
#: src/Model/User.php:1001
|
||||||
msgid "That doesn't appear to be your full (First Last) name."
|
msgid "That doesn't appear to be your full (First Last) name."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1002
|
#: src/Model/User.php:1006
|
||||||
msgid "Your email domain is not among those allowed on this site."
|
msgid "Your email domain is not among those allowed on this site."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1006
|
#: src/Model/User.php:1010
|
||||||
msgid "Not a valid email address."
|
msgid "Not a valid email address."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1009
|
#: src/Model/User.php:1013
|
||||||
msgid "The nickname was blocked from registration by the nodes admin."
|
msgid "The nickname was blocked from registration by the nodes admin."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1013 src/Model/User.php:1021
|
#: src/Model/User.php:1017 src/Model/User.php:1025
|
||||||
msgid "Cannot use that email."
|
msgid "Cannot use that email."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1028
|
#: src/Model/User.php:1032
|
||||||
msgid "Your nickname can only contain a-z, 0-9 and _."
|
msgid "Your nickname can only contain a-z, 0-9 and _."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1036 src/Model/User.php:1093
|
#: src/Model/User.php:1040 src/Model/User.php:1097
|
||||||
msgid "Nickname is already registered. Please choose another."
|
msgid "Nickname is already registered. Please choose another."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1080 src/Model/User.php:1084
|
#: src/Model/User.php:1084 src/Model/User.php:1088
|
||||||
msgid "An error occurred during registration. Please try again."
|
msgid "An error occurred during registration. Please try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1107
|
#: src/Model/User.php:1111
|
||||||
msgid "An error occurred creating your default profile. Please try again."
|
msgid "An error occurred creating your default profile. Please try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1114
|
#: src/Model/User.php:1118
|
||||||
msgid "An error occurred creating your self contact. Please try again."
|
msgid "An error occurred creating your self contact. Please try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1119
|
#: src/Model/User.php:1123
|
||||||
msgid "Friends"
|
msgid "Friends"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1123
|
#: src/Model/User.php:1127
|
||||||
msgid ""
|
msgid ""
|
||||||
"An error occurred creating your default contact group. Please try again."
|
"An error occurred creating your default contact group. Please try again."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1352
|
#: src/Model/User.php:1356
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -4744,7 +4744,7 @@ msgid ""
|
||||||
"\t\t\tthe administrator of %2$s has set up an account for you."
|
"\t\t\tthe administrator of %2$s has set up an account for you."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1355
|
#: src/Model/User.php:1359
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -4781,12 +4781,12 @@ msgid ""
|
||||||
"\t\tThank you and welcome to %4$s."
|
"\t\tThank you and welcome to %4$s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1388 src/Model/User.php:1495
|
#: src/Model/User.php:1392 src/Model/User.php:1499
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Registration details for %s"
|
msgid "Registration details for %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1408
|
#: src/Model/User.php:1412
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -4802,12 +4802,12 @@ msgid ""
|
||||||
"\t\t"
|
"\t\t"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1427
|
#: src/Model/User.php:1431
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Registration at %s"
|
msgid "Registration at %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1451
|
#: src/Model/User.php:1455
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -4816,7 +4816,7 @@ msgid ""
|
||||||
"\t\t\t"
|
"\t\t\t"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Model/User.php:1459
|
#: src/Model/User.php:1463
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
|
@ -8666,17 +8666,21 @@ msgstr ""
|
||||||
msgid "Visible to:"
|
msgid "Visible to:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Photo.php:115
|
#: src/Module/Photo.php:117
|
||||||
|
msgid "The Photo is not available."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Module/Photo.php:130
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "The Photo with id %s is not available."
|
msgid "The Photo with id %s is not available."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Photo.php:148
|
#: src/Module/Photo.php:163
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Invalid external resource with url %s."
|
msgid "Invalid external resource with url %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Photo.php:150
|
#: src/Module/Photo.php:165
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Invalid photo with id %s."
|
msgid "Invalid photo with id %s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -8739,19 +8743,19 @@ msgstr ""
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:326 src/Module/Profile/Profile.php:329
|
#: src/Module/Profile/Profile.php:326 src/Module/Profile/Profile.php:329
|
||||||
#: src/Module/Profile/Status.php:65 src/Module/Profile/Status.php:68
|
#: src/Module/Profile/Status.php:65 src/Module/Profile/Status.php:68
|
||||||
#: src/Protocol/Feed.php:951 src/Protocol/OStatus.php:1259
|
#: src/Protocol/Feed.php:953 src/Protocol/OStatus.php:1259
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s's timeline"
|
msgid "%s's timeline"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:327 src/Module/Profile/Status.php:66
|
#: src/Module/Profile/Profile.php:327 src/Module/Profile/Status.php:66
|
||||||
#: src/Protocol/Feed.php:955 src/Protocol/OStatus.php:1263
|
#: src/Protocol/Feed.php:957 src/Protocol/OStatus.php:1263
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s's posts"
|
msgid "%s's posts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Module/Profile/Profile.php:328 src/Module/Profile/Status.php:67
|
#: src/Module/Profile/Profile.php:328 src/Module/Profile/Status.php:67
|
||||||
#: src/Protocol/Feed.php:958 src/Protocol/OStatus.php:1266
|
#: src/Protocol/Feed.php:960 src/Protocol/OStatus.php:1266
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s's comments"
|
msgid "%s's comments"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user