aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-11-06 11:47:57 +0000
committerMario <mario@mariovavti.com>2024-11-06 11:47:57 +0000
commitd4d1a7523d1d6c410afc2f83fb0eb7f0bb4c0740 (patch)
tree7b21db9c34de7e595fed78cfbf6db3c82555babe
parent7a3f2c1ba9ba59499b2f4280f21bbe16d5157c0f (diff)
parent472484dde041f0ce7e21dd04492821a7d0d385ea (diff)
downloadvolse-hubzilla-d4d1a7523d1d6c410afc2f83fb0eb7f0bb4c0740.tar.gz
volse-hubzilla-d4d1a7523d1d6c410afc2f83fb0eb7f0bb4c0740.tar.bz2
volse-hubzilla-d4d1a7523d1d6c410afc2f83fb0eb7f0bb4c0740.zip
Merge branch 'fix-module-thing' into 'dev'
Fix error adding Things when multiple profiles not enabled See merge request hubzilla/core!2157
-rw-r--r--Zotlabs/Module/Thing.php35
1 files changed, 21 insertions, 14 deletions
diff --git a/Zotlabs/Module/Thing.php b/Zotlabs/Module/Thing.php
index 2038db8c0..a77081741 100644
--- a/Zotlabs/Module/Thing.php
+++ b/Zotlabs/Module/Thing.php
@@ -50,24 +50,31 @@ class Thing extends \Zotlabs\Web\Controller {
$channel = \App::get_channel();
- $term_hash = (($_REQUEST['term_hash']) ? $_REQUEST['term_hash'] : '');
+ $term_hash = (($_POST['term_hash']) ? $_POST['term_hash'] : '');
- $name = escape_tags($_REQUEST['term']);
- $verb = escape_tags($_REQUEST['verb']);
- $activity = intval($_REQUEST['activity']);
- $profile_guid = escape_tags($_REQUEST['profile_assign']);
- $url = $_REQUEST['url'];
- $photo = $_REQUEST['img'];
+ $name = escape_tags($_POST['term']);
+ $verb = escape_tags($_POST['verb']);
+ $activity = intval($_POST['activity']);
+ $url = $_POST['url'];
+ $photo = $_POST['img'];
+
+ $profile_guid = isset($_POST['profile_assign'])
+ ? escape_tags($_POST['profile_assign'])
+ : null;
$hash = new_uuid();
$verbs = obj_verbs();
- /**
- * verbs: [0] = first person singular, e.g. "I want", [1] = 3rd person singular, e.g. "Bill wants"
- * We use the first person form when creating an activity, but the third person for use in activities
- * @FIXME There is no accounting for verb gender for languages where this is significant. We may eventually
- * require obj_verbs() to provide full conjugations and specify which form to use in the $_REQUEST params to this module.
+ /*
+ * verbs: [0] = first person singular, e.g. "I want", [1] = 3rd person
+ * singular, e.g. "Bill wants" We use the first person form when
+ * creating an activity, but the third person for use in activities
+ *
+ * @FIXME There is no accounting for verb gender for languages where
+ * this is significant. We may eventually require obj_verbs() to
+ * provide full conjugations and specify which form to use in the
+ * $_POST params to this module.
*/
$translated_verb = $verbs[$verb][1];
@@ -100,7 +107,7 @@ class Thing extends \Zotlabs\Web\Controller {
return;
$acl = new \Zotlabs\Access\AccessList($channel);
- $acl->set_from_array($_REQUEST);
+ $acl->set_from_array($_POST);
$x = $acl->get();
@@ -394,7 +401,7 @@ class Thing extends \Zotlabs\Web\Controller {
'$profile_lbl' => t('Select a profile'),
'$profile_select' => contact_profile_assign(''),
'$verb_lbl' => $channel['channel_name'],
- '$activity' => array('activity',t('Post an activity'),((array_key_exists('activity',$_REQUEST)) ? $_REQUEST['activity'] : true),t('Only sends to viewers of the applicable profile')),
+ '$activity' => array('activity',t('Post an activity'),((array_key_exists('activity',$_GET)) ? $_GET['activity'] : true),t('Only sends to viewers of the applicable profile')),
'$verb_select' => obj_verb_selector(),
'$thing_lbl' => t('Name of thing e.g. something'),
'$url_lbl' => t('URL of thing (optional)'),