Remove photo user id fallback from 2021
- Remove deprecated /photos/{nickname} fallback routes - The contact id fallback is a lie, there's no replacement feature
This commit is contained in:
parent
e16b6ee6e1
commit
a25dbf839a
|
@ -100,7 +100,6 @@ class Photo extends BaseApi
|
||||||
$id = $account['id'];
|
$id = $account['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Contact Id Fallback, to remove after version 2021.12
|
|
||||||
if (isset($this->parameters['contact_id'])) {
|
if (isset($this->parameters['contact_id'])) {
|
||||||
$id = intval($this->parameters['contact_id']);
|
$id = intval($this->parameters['contact_id']);
|
||||||
}
|
}
|
||||||
|
@ -115,12 +114,6 @@ class Photo extends BaseApi
|
||||||
$id = $user['uid'];
|
$id = $user['uid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// User Id Fallback, to remove after version 2021.12
|
|
||||||
if (!empty($this->parameters['uid_ext'])) {
|
|
||||||
$id = intval(pathinfo($this->parameters['uid_ext'], PATHINFO_FILENAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Please refactor this for the love of everything that's good
|
|
||||||
if (isset($this->parameters['id'])) {
|
if (isset($this->parameters['id'])) {
|
||||||
$id = $this->parameters['id'];
|
$id = $this->parameters['id'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -575,22 +575,13 @@ return [
|
||||||
'/{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]],
|
||||||
'/{type:contact|header}/{guid}' => [Module\Photo::class, [R::GET]],
|
'/{type:contact|header}/{guid}' => [Module\Photo::class, [R::GET]],
|
||||||
// User Id Fallback, to remove after version 2021.12
|
|
||||||
'/{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]],
|
||||||
// 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+}/{contact_id:\d+}' => [Module\Photo::class, [R::GET]],
|
||||||
'/{type:contact|header}/{customsize:\d+}/{guid}' => [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]],
|
'/{type}/{customsize:\d+}/{id:\d+}' => [Module\Photo::class, [R::GET]],
|
||||||
// User Id Fallback, to remove after version 2021.12
|
|
||||||
'/{type}/{customsize:\d+}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
|
|
||||||
'/{type}/{customsize:\d+}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
'/{type}/{customsize:\d+}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
|
||||||
],
|
],
|
||||||
|
|
||||||
// Kept for backwards-compatibility
|
|
||||||
// @TODO remove by version 2023.12
|
|
||||||
'/photos/{nickname}' => [Module\Profile\Photos::class, [R::GET]],
|
|
||||||
|
|
||||||
'/ping' => [Module\Notifications\Ping::class, [R::GET]],
|
'/ping' => [Module\Notifications\Ping::class, [R::GET]],
|
||||||
|
|
||||||
'/post' => [
|
'/post' => [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user