rename function

This commit is contained in:
Mike Macgirvin 2023-01-21 09:35:14 +11:00
parent a3c88b2d6c
commit d1a64aec08
7 changed files with 7 additions and 7 deletions

View file

@ -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' ]);
return (($x) ? true : false);

View file

@ -110,7 +110,7 @@ class Activity extends Controller
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);
if (!$item_id) {

View file

@ -135,7 +135,7 @@ class Channel extends Controller
// 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');
if ($sigdata && $sigdata['signer'] && $sigdata['header_valid']) {

View file

@ -45,7 +45,7 @@ class Home extends Controller
killme();
}
if (Libzot::is_zot_request()) {
if (Libzot::is_nomad_request()) {
$channel = Channel::get_system();
$sigdata = HTTPSig::verify(file_get_contents('php://input'), EMPTY_STR, 'zot6');

View file

@ -31,7 +31,7 @@ class Id extends Controller
public function init()
{
if (Libzot::is_zot_request()) {
if (Libzot::is_nomad_request()) {
$conversation = false;
$request_portable_id = argv(1);

View file

@ -186,7 +186,7 @@ class Item extends Controller
as_return_and_die($i, $chan);
}
if (Libzot::is_zot_request()) {
if (Libzot::is_nomad_request()) {
$item_uuid = argv(1);
if (!$item_uuid) {

View file

@ -55,7 +55,7 @@ class Search extends Controller
Navbar::set_selected('Search');
$format = (($_REQUEST['module_format']) ?: '');
if (ActivityStreams::is_as_request() || Libzot::is_zot_request()) {
if (ActivityStreams::is_as_request() || Libzot::is_nomad_request()) {
$format = 'json';
}
if ($format !== '') {