aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Post.php15
-rw-r--r--Zotlabs/Web/Router.php18
-rw-r--r--Zotlabs/Web/WebServer.php28
3 files changed, 33 insertions, 28 deletions
diff --git a/Zotlabs/Module/Post.php b/Zotlabs/Module/Post.php
index dba26075f..76b74a338 100644
--- a/Zotlabs/Module/Post.php
+++ b/Zotlabs/Module/Post.php
@@ -24,18 +24,13 @@ class Post extends \Zotlabs\Web\Controller {
}
function post() {
+ if(array_key_exists('data',$_REQUEST)) {
+ $z = new \Zotlabs\Zot\Receiver($_REQUEST['data'], get_config('system', 'prvkey'), new \Zotlabs\Zot\ZotHandler());
-
-
-
-
-
-
-
- $z = new \Zotlabs\Zot\Receiver($_REQUEST['data'], get_config('system', 'prvkey'), new \Zotlabs\Zot\ZotHandler());
+ // notreached;
+ exit;
+ }
- // notreached;
- exit;
}
}
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php
index b0193652b..9486130cb 100644
--- a/Zotlabs/Web/Router.php
+++ b/Zotlabs/Web/Router.php
@@ -178,24 +178,6 @@ class Router {
*/
if(\App::$module_loaded) {
- if (( \App::$module === 'channel' ) && argc() > 1) {
- \App::$channel_links = [
- [
- 'rel' => 'lrdd',
- 'type' => 'application/xrd+xml',
- 'url' => z_root() . '/xrd?f=&uri=acct%3A' . argv(1) . '%40' . \App::get_hostname()
- ],
- [
- 'rel' => 'jrd',
- 'type' => 'application/jrd+json',
- 'url' => z_root() . '/.well-known/webfinger?f=&resource=acct%3A' . argv(1) . '%40' . \App::get_hostname()
- ],
- ];
- $x = [ 'channel_address' => argv(1), 'channel_links' => \App::$channel_links ];
- call_hooks('channel_links', $x );
- \App::$channel_links = $x['channel_links'];
- header('Link: ' . \App::get_channel_links());
- }
\App::$page['page_title'] = \App::$module;
$placeholder = '';
diff --git a/Zotlabs/Web/WebServer.php b/Zotlabs/Web/WebServer.php
index 8431a2e0e..65b772fee 100644
--- a/Zotlabs/Web/WebServer.php
+++ b/Zotlabs/Web/WebServer.php
@@ -107,6 +107,34 @@ class WebServer {
$Router = new Router($a);
+ /* Initialise the Link: response header if this is a channel page.
+ * This cannot be done inside the channel module because some protocol
+ * addons over-ride the module functions and these links are common
+ * to all protocol drivers; thus doing it here avoids duplication.
+ */
+
+ if (( \App::$module === 'channel' ) && argc() > 1) {
+ \App::$channel_links = [
+ [
+ 'rel' => 'lrdd',
+ 'type' => 'application/xrd+xml',
+ 'url' => z_root() . '/xrd?f=&uri=acct%3A' . argv(1) . '%40' . \App::get_hostname()
+ ],
+ [
+ 'rel' => 'jrd',
+ 'type' => 'application/jrd+json',
+ 'url' => z_root() . '/.well-known/webfinger?f=&resource=acct%3A' . argv(1) . '%40' . \App::get_hostname()
+ ],
+ ];
+ $x = [ 'channel_address' => argv(1), 'channel_links' => \App::$channel_links ];
+ call_hooks('channel_links', $x );
+ \App::$channel_links = $x['channel_links'];
+ header('Link: ' . \App::get_channel_links());
+ }
+
+
+
+
/* initialise content region */
if(! x(\App::$page, 'content'))