From 8d479aa1c74169e5b39d6409582c87e59a82d692 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 29 Jan 2018 16:58:55 -0800 Subject: redirect to the email_validation page if login was attempted after account creation but prior to successful verification. This presents the link to resend the verification email and/or allows you to enter it. --- Zotlabs/Module/Item.php | 1 + include/auth.php | 1 + include/items.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index ad829137a..db2d64d70 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -753,6 +753,7 @@ class Item extends \Zotlabs\Web\Controller { if ((! $plink) && ($item_thread_top)) { $plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid; + $plink = substr($plink,0,190); } $datarray['aid'] = $channel['channel_account_id']; diff --git a/include/auth.php b/include/auth.php index 78be32bf4..6f5e58361 100644 --- a/include/auth.php +++ b/include/auth.php @@ -261,6 +261,7 @@ else { $verify = account_verify_password($_POST['username'], $_POST['password']); if($verify && array_key_exists('reason',$verify) && $verify['reason'] === 'unvalidated') { notice( t('Email validation is incomplete. Please check your email.')); + goaway(z_root() . '/email_validation/' . bin2hex(trim(escape_tags($_POST['username'])))); } elseif($verify) { $atoken = $verify['xchan']; diff --git a/include/items.php b/include/items.php index b12ad1d85..c7206458e 100755 --- a/include/items.php +++ b/include/items.php @@ -390,7 +390,7 @@ function post_activity_item($arr, $allow_code = false, $deliver = true) { $arr['comment_policy'] = map_scope(\Zotlabs\Access\PermissionLimits::Get($channel['channel_id'],'post_comments')); if ((! $arr['plink']) && (intval($arr['item_thread_top']))) { - $arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . urlencode($arr['mid']); + $arr['plink'] = substr(z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . urlencode($arr['mid']),0,190); } -- cgit v1.2.3 From 668f56807ad8bde45a2ed679eb3c97c632b6fb2f Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 29 Jan 2018 17:43:11 -0800 Subject: unable to delete accounts using tickboxes on admin/accounts - make all the action names consistent --- Zotlabs/Module/Admin/Accounts.php | 9 ++++++--- view/tpl/admin_accounts.tpl | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Zotlabs/Module/Admin/Accounts.php b/Zotlabs/Module/Admin/Accounts.php index 2043550fc..8925ffff1 100644 --- a/Zotlabs/Module/Admin/Accounts.php +++ b/Zotlabs/Module/Admin/Accounts.php @@ -16,6 +16,9 @@ class Accounts { */ function post() { + +logger('post: ' . print_r($_POST,true)); + $pending = ( x($_POST, 'pending') ? $_POST['pending'] : array() ); $users = ( x($_POST, 'user') ? $_POST['user'] : array() ); $blocked = ( x($_POST, 'blocked') ? $_POST['blocked'] : array() ); @@ -24,7 +27,7 @@ class Accounts { // change to switch structure? // account block/unblock button was submitted - if (x($_POST, 'page_users_block')) { + if (x($_POST, 'page_accounts_block')) { for ($i = 0; $i < count($users); $i++) { // if account is blocked remove blocked bit-flag, otherwise add blocked bit-flag $op = ($blocked[$i]) ? '& ~' : '| '; @@ -43,13 +46,13 @@ class Accounts { notice( sprintf( tt("%s account deleted", "%s accounts deleted", count($users)), count($users)) ); } // registration approved button was submitted - if (x($_POST, 'page_users_approve')) { + if (x($_POST, 'page_accounts_approve')) { foreach ($pending as $hash) { account_allow($hash); } } // registration deny button was submitted - if (x($_POST, 'page_users_deny')) { + if (x($_POST, 'page_accounts_deny')) { foreach ($pending as $hash) { account_deny($hash); } diff --git a/view/tpl/admin_accounts.tpl b/view/tpl/admin_accounts.tpl index 3535363a0..d6c9591fd 100755 --- a/view/tpl/admin_accounts.tpl +++ b/view/tpl/admin_accounts.tpl @@ -41,7 +41,7 @@ -
+
{{else}}

{{$no_pending}}

{{/if}} @@ -80,7 +80,7 @@ -
+
{{else}} NO USERS?!? {{/if}} -- cgit v1.2.3 From 9bf83a57bdbf4bc4d2ce53852c625506690f11f7 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 29 Jan 2018 18:43:20 -0800 Subject: don't show jot bb-edit buttons if a mimetype other than text/bbcode is selected (:todo: also disable bbcode autocomplete) --- view/tpl/jot-header.tpl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index ffaa4e208..0ffc8b349 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -110,10 +110,21 @@ var activeCommentID = 0; var activeCommentText = ''; $(document).ready(function() { + /* enable tinymce on focus and click */ $("#profile-jot-text").focus(enableOnUser); $("#profile-jot-text").click(enableOnUser); + $('#id_mimetype').on('load', jotSetMime); + $('#id_mimetype').on('change', jotSetMime); + + function jotSetMime() { + var mtype = $('#id_mimetype').val(); + if(mtype == 'text/bbcode') + $('#profile-jot-submit-left').show(); + else + $('#profile-jot-submit-left').hide(); + } $('#invisible-wall-file-upload').fileupload({ url: 'wall_attach/{{$nickname}}', -- cgit v1.2.3 From 0e2c539d93e36db0b095e1dcd5080ce2b5fec1d7 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 29 Jan 2018 19:57:43 -0800 Subject: remove logging --- Zotlabs/Module/Admin/Accounts.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/Zotlabs/Module/Admin/Accounts.php b/Zotlabs/Module/Admin/Accounts.php index 8925ffff1..2e417edd1 100644 --- a/Zotlabs/Module/Admin/Accounts.php +++ b/Zotlabs/Module/Admin/Accounts.php @@ -17,8 +17,6 @@ class Accounts { function post() { -logger('post: ' . print_r($_POST,true)); - $pending = ( x($_POST, 'pending') ? $_POST['pending'] : array() ); $users = ( x($_POST, 'user') ? $_POST['user'] : array() ); $blocked = ( x($_POST, 'blocked') ? $_POST['blocked'] : array() ); -- cgit v1.2.3