From cb39d9435da54239e8e36d2d53877a19c10bab83 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 4 Dec 2017 15:14:58 -0800 Subject: We only require one Update module. The rest are superfluous. --- Zotlabs/Module/Update.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Zotlabs/Module/Update.php (limited to 'Zotlabs/Module/Update.php') diff --git a/Zotlabs/Module/Update.php b/Zotlabs/Module/Update.php new file mode 100644 index 000000000..e7470363b --- /dev/null +++ b/Zotlabs/Module/Update.php @@ -0,0 +1,34 @@ + 2) && (argv(2) == 'load')) ? 1 : 0); + + $mod = new $module; + + header("Content-type: text/html"); + + echo "
\r\n"; + echo $mod->get($profile_uid, $load); + echo "
\r\n"; + + killme(); + + } +} -- cgit v1.2.3 From 24d256e253a2a16391e9a5771d2b5bc9578b951d Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 4 Dec 2017 21:18:10 -0800 Subject: fix mod display and others that require a non-zero profile_uid for updates --- Zotlabs/Module/Update.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Zotlabs/Module/Update.php') diff --git a/Zotlabs/Module/Update.php b/Zotlabs/Module/Update.php index e7470363b..98137c4c2 100644 --- a/Zotlabs/Module/Update.php +++ b/Zotlabs/Module/Update.php @@ -8,6 +8,9 @@ class Update extends \Zotlabs\Web\Controller { $profile_uid = intval($_GET['p']); + if((! $profile_uid) && in_array(argv(1),['display','search','pubstream','home'])) + $profile_uid = (-1); + if(argc() < 2) { killme(); } @@ -24,6 +27,9 @@ class Update extends \Zotlabs\Web\Controller { header("Content-type: text/html"); + \App::$argv = [ argv(1) ]; + \App::$argc = 1; + echo "
\r\n"; echo $mod->get($profile_uid, $load); echo "
\r\n"; -- cgit v1.2.3 From d4acf4119226394b203d8bb52b75eec6d56d6631 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 4 Dec 2017 21:39:53 -0800 Subject: explain what happened here --- Zotlabs/Module/Update.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Zotlabs/Module/Update.php') diff --git a/Zotlabs/Module/Update.php b/Zotlabs/Module/Update.php index 98137c4c2..b3252f8b9 100644 --- a/Zotlabs/Module/Update.php +++ b/Zotlabs/Module/Update.php @@ -8,6 +8,9 @@ class Update extends \Zotlabs\Web\Controller { $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); -- cgit v1.2.3