aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-05-08 19:27:48 +0000
committerMario <mario@mariovavti.com>2024-05-08 19:27:48 +0000
commit960354b16cab06915a2f85fcc5e55d380765d858 (patch)
tree205fa295040cafbd0aa98ec29d1f5d37306de82a
parent481e08b904313b768305d82b67f5f8602713b329 (diff)
downloadvolse-hubzilla-960354b16cab06915a2f85fcc5e55d380765d858.tar.gz
volse-hubzilla-960354b16cab06915a2f85fcc5e55d380765d858.tar.bz2
volse-hubzilla-960354b16cab06915a2f85fcc5e55d380765d858.zip
make mod regate return to system.workflow_channel_next and show register message field only if registration is set to register_approve
-rw-r--r--Zotlabs/Module/Profiles.php11
-rw-r--r--Zotlabs/Module/Regate.php2
-rw-r--r--Zotlabs/Module/Register.php4
-rw-r--r--view/tpl/register.tpl2
4 files changed, 11 insertions, 8 deletions
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php
index 58e5857ed..a06193e12 100644
--- a/Zotlabs/Module/Profiles.php
+++ b/Zotlabs/Module/Profiles.php
@@ -620,14 +620,16 @@ class Profiles extends \Zotlabs\Web\Controller {
$profile_fields_advanced = get_profile_fields_advanced();
if(((argc() > 1) && (intval(argv(1)))) || !feature_enabled(local_channel(),'multi_profiles')) {
- if(feature_enabled(local_channel(),'multi_profiles'))
+ if (feature_enabled(local_channel(), 'multi_profiles')) {
$id = \App::$argv[1];
+ }
else {
$x = q("select id from profile where uid = %d and is_default = 1",
intval(local_channel())
);
- if($x)
+ if ($x) {
$id = $x[0]['id'];
+ }
}
$r = q("SELECT * FROM profile WHERE id = %d AND uid = %d LIMIT 1",
@@ -635,7 +637,7 @@ class Profiles extends \Zotlabs\Web\Controller {
intval(local_channel())
);
- if(! $r) {
+ if (!$r) {
notice( t('Profile not found.') . EOL);
return;
}
@@ -827,7 +829,8 @@ class Profiles extends \Zotlabs\Web\Controller {
else {
$r = q("SELECT * FROM profile WHERE uid = %d",
- local_channel());
+ intval(local_channel())
+ );
if($r) {
$tpl = get_markup_template('profile_entry.tpl');
diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php
index 8158416bd..c67f45a88 100644
--- a/Zotlabs/Module/Regate.php
+++ b/Zotlabs/Module/Regate.php
@@ -207,7 +207,7 @@ class Regate extends \Zotlabs\Web\Controller {
}
change_channel($channel_id);
- $nextpage = 'profiles/' . $channel_id;
+ $nextpage = Config::Get('system', 'workflow_channel_next', 'profiles');
$msg_code = 'ZAR1239I';
$msg = t('Channel successfull created') . ' ' . $did2;
}
diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php
index 428b68178..f0163768c 100644
--- a/Zotlabs/Module/Register.php
+++ b/Zotlabs/Module/Register.php
@@ -429,6 +429,7 @@ class Register extends Controller {
function get() {
$registration_is = '';
+ $register_msg = '';
$other_sites = '';
if(intval(Config::Get('system','register_policy')) === REGISTER_CLOSED) {
@@ -442,6 +443,7 @@ class Register extends Controller {
}
if(intval(Config::Get('system','register_policy')) == REGISTER_APPROVE) {
+ $register_msg = ['register_msg', t('Why do you want to join this hub?'), ((x($_REQUEST,'register_msg')) ? $_REQUEST['register_msg'] : ''), t('This will help to review your registration')];
$registration_is = t('Registration on this hub is by approval only.');
$other_sites = '<a href="pubsites">' . t('Register at another affiliated hub in case when prefered') . '</a>';
}
@@ -512,8 +514,6 @@ class Register extends Controller {
$tos = array('tos', $label_tos, ((x($_REQUEST,'tos')) ? $_REQUEST['tos'] : ''), '', [t('No'),t('Yes')], $duty['atform']);
- $register_msg = ['register_msg', t('Why do you want to join this hub?'), ((x($_REQUEST,'register_msg')) ? $_REQUEST['register_msg'] : ''), t('This will help to review your registration')];
-
require_once('include/bbcode.php');
$o = replace_macros(get_markup_template('register.tpl'), array(
diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl
index 8e1530eb4..cc2b8e47b 100644
--- a/view/tpl/register.tpl
+++ b/view/tpl/register.tpl
@@ -47,7 +47,7 @@
{{include file="field_input.tpl" field=$email}}
{{include file="field_password.tpl" field=$pass1}}
{{include file="field_password.tpl" field=$pass2}}
- {{if $reg_is}}
+ {{if $register_msg}}
{{include file="field_textarea.tpl" field=$register_msg}}
{{/if}}
{{if $enable_tos}}