mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 02:35:12 +00:00
rename function
This commit is contained in:
parent
a3c88b2d6c
commit
d1a64aec08
7 changed files with 7 additions and 7 deletions
|
@ -3227,7 +3227,7 @@ class Libzot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function is_zot_request()
|
public static function is_nomad_request()
|
||||||
{
|
{
|
||||||
$x = getBestSupportedMimeType([ 'application/x-zot+json', 'application/x-nomad+json' ]);
|
$x = getBestSupportedMimeType([ 'application/x-zot+json', 'application/x-nomad+json' ]);
|
||||||
return (($x) ? true : false);
|
return (($x) ? true : false);
|
||||||
|
|
|
@ -110,7 +110,7 @@ class Activity extends Controller
|
||||||
as_return_and_die(ZlibActivity::encode_activity($items[0], true), $channel);
|
as_return_and_die(ZlibActivity::encode_activity($items[0], true), $channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Libzot::is_zot_request()) {
|
if (Libzot::is_nomad_request()) {
|
||||||
$item_id = argv(1);
|
$item_id = argv(1);
|
||||||
|
|
||||||
if (!$item_id) {
|
if (!$item_id) {
|
||||||
|
|
|
@ -135,7 +135,7 @@ class Channel extends Controller
|
||||||
|
|
||||||
// handle zot6 channel discovery
|
// handle zot6 channel discovery
|
||||||
|
|
||||||
if (Libzot::is_zot_request()) {
|
if (Libzot::is_nomad_request()) {
|
||||||
$sigdata = HTTPSig::verify(file_get_contents('php://input'), EMPTY_STR, 'zot6');
|
$sigdata = HTTPSig::verify(file_get_contents('php://input'), EMPTY_STR, 'zot6');
|
||||||
|
|
||||||
if ($sigdata && $sigdata['signer'] && $sigdata['header_valid']) {
|
if ($sigdata && $sigdata['signer'] && $sigdata['header_valid']) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Home extends Controller
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Libzot::is_zot_request()) {
|
if (Libzot::is_nomad_request()) {
|
||||||
$channel = Channel::get_system();
|
$channel = Channel::get_system();
|
||||||
$sigdata = HTTPSig::verify(file_get_contents('php://input'), EMPTY_STR, 'zot6');
|
$sigdata = HTTPSig::verify(file_get_contents('php://input'), EMPTY_STR, 'zot6');
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Id extends Controller
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Libzot::is_zot_request()) {
|
if (Libzot::is_nomad_request()) {
|
||||||
$conversation = false;
|
$conversation = false;
|
||||||
|
|
||||||
$request_portable_id = argv(1);
|
$request_portable_id = argv(1);
|
||||||
|
|
|
@ -186,7 +186,7 @@ class Item extends Controller
|
||||||
as_return_and_die($i, $chan);
|
as_return_and_die($i, $chan);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Libzot::is_zot_request()) {
|
if (Libzot::is_nomad_request()) {
|
||||||
$item_uuid = argv(1);
|
$item_uuid = argv(1);
|
||||||
|
|
||||||
if (!$item_uuid) {
|
if (!$item_uuid) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Search extends Controller
|
||||||
Navbar::set_selected('Search');
|
Navbar::set_selected('Search');
|
||||||
|
|
||||||
$format = (($_REQUEST['module_format']) ?: '');
|
$format = (($_REQUEST['module_format']) ?: '');
|
||||||
if (ActivityStreams::is_as_request() || Libzot::is_zot_request()) {
|
if (ActivityStreams::is_as_request() || Libzot::is_nomad_request()) {
|
||||||
$format = 'json';
|
$format = 'json';
|
||||||
}
|
}
|
||||||
if ($format !== '') {
|
if ($format !== '') {
|
||||||
|
|
Loading…
Reference in a new issue