aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Update.php
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2018-01-16 11:45:01 +0100
committerGitHub <noreply@github.com>2018-01-16 11:45:01 +0100
commite81949bb095448881ce83605a50454d0c3c40782 (patch)
treebd15059a020152b5dc59c265e22a27251efe0de4 /Zotlabs/Module/Update.php
parentb4f8f4df7bc5cc8a74240506cd536224cb31e114 (diff)
parent9aadcb0bd40a8f773dc164f7dadc8c238fff9954 (diff)
downloadvolse-hubzilla-e81949bb095448881ce83605a50454d0c3c40782.tar.gz
volse-hubzilla-e81949bb095448881ce83605a50454d0c3c40782.tar.bz2
volse-hubzilla-e81949bb095448881ce83605a50454d0c3c40782.zip
Merge pull request #7 from redmatrix/dev
Dev
Diffstat (limited to 'Zotlabs/Module/Update.php')
-rw-r--r--Zotlabs/Module/Update.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/Zotlabs/Module/Update.php b/Zotlabs/Module/Update.php
new file mode 100644
index 000000000..b3252f8b9
--- /dev/null
+++ b/Zotlabs/Module/Update.php
@@ -0,0 +1,43 @@
+<?php
+namespace Zotlabs\Module;
+
+
+class Update extends \Zotlabs\Web\Controller {
+
+ function get() {
+
+ $profile_uid = intval($_GET['p']);
+
+ // it's probably safe to do this for all modules and not just a limited subset,
+ // but it needs to be verified.
+
+ if((! $profile_uid) && in_array(argv(1),['display','search','pubstream','home']))
+ $profile_uid = (-1);
+
+ if(argc() < 2) {
+ killme();
+ }
+
+ // These modules don't have a completely working liveUpdate implementation currently
+
+ if(in_array(strtolower(argv(1)),['articles','cards']))
+ killme();
+
+ $module = "\\Zotlabs\\Module\\" . ucfirst(argv(1));
+ $load = (((argc() > 2) && (argv(2) == 'load')) ? 1 : 0);
+
+ $mod = new $module;
+
+ header("Content-type: text/html");
+
+ \App::$argv = [ argv(1) ];
+ \App::$argc = 1;
+
+ echo "<!DOCTYPE html><html><body><section>\r\n";
+ echo $mod->get($profile_uid, $load);
+ echo "</section></body></html>\r\n";
+
+ killme();
+
+ }
+}