From dc066d4c9b84267bd551ecb122cf3708b6f1472b Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 21 Mar 2018 15:44:56 -0700 Subject: Add Ochannel module for testing OStatus bad behaviour --- Zotlabs/Module/Ochannel.php | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Zotlabs/Module/Ochannel.php (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Ochannel.php b/Zotlabs/Module/Ochannel.php new file mode 100644 index 000000000..3b187d2a6 --- /dev/null +++ b/Zotlabs/Module/Ochannel.php @@ -0,0 +1,66 @@ + 1) + $which = argv(1); + if(! $which) { + if(local_channel()) { + $channel = \App::get_channel(); + if($channel && $channel['channel_address']) + $which = $channel['channel_address']; + } + } + if(! $which) { + notice( t('You must be logged in to see this page.') . EOL ); + return; + } + + $profile = 0; + $channel = \App::get_channel(); + + if((local_channel()) && (argc() > 2) && (argv(2) === 'view')) { + $which = $channel['channel_address']; + $profile = argv(1); + } + + head_add_link( [ + 'rel' => 'alternate', + 'type' => 'application/atom+xml', + 'href' => z_root() . '/ofeed/' . $which + ]); + + + // Run profile_load() here to make sure the theme is set before + // we start loading content + + profile_load($which,$profile); + } + + function get($update = 0, $load = false) { + + if($load) + $_SESSION['loadtime'] = datetime_convert(); + + return ''; + + } + +} -- cgit v1.2.3