mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
Merge branch 'dev' of ../p3 into dev
This commit is contained in:
commit
df28342043
2 changed files with 26 additions and 11 deletions
|
@ -119,6 +119,11 @@ class Register extends Controller {
|
|||
set_aconfig($result['account']['account_id'],'register','permissions_role',$_REQUEST['permissions_role']);
|
||||
}
|
||||
|
||||
// At this point the account has been created without error. Purge any error messages from prior failed registration
|
||||
// attempts which haven't yet been delivered to the browser and start fresh. If you're willing to figure out why they
|
||||
// weren't delivered to the browser please adopt zap issue 34.
|
||||
|
||||
$_SESSION['sysmsg'] = [];
|
||||
|
||||
$using_invites = intval(get_config('system','invitation_only'));
|
||||
$num_invites = intval(get_config('system','number_invites'));
|
||||
|
|
28
boot.php
28
boot.php
|
@ -1846,19 +1846,24 @@ function can_view_public_stream() {
|
|||
* @param string $s Text to display
|
||||
*/
|
||||
function notice($s) {
|
||||
if(! session_id())
|
||||
return;
|
||||
|
||||
if(! x($_SESSION, 'sysmsg')) $_SESSION['sysmsg'] = [];
|
||||
if (! session_id()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (! x($_SESSION, 'sysmsg')) {
|
||||
$_SESSION['sysmsg'] = [];
|
||||
}
|
||||
|
||||
// ignore duplicated error messages which haven't yet been displayed
|
||||
// - typically seen as multiple 'permission denied' messages
|
||||
// as a result of auto-reloading a protected page with &JS=1
|
||||
|
||||
if(in_array($s, $_SESSION['sysmsg']))
|
||||
if (in_array($s, $_SESSION['sysmsg'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(App::$interactive) {
|
||||
if (App::$interactive) {
|
||||
$_SESSION['sysmsg'][] = $s;
|
||||
}
|
||||
}
|
||||
|
@ -1874,16 +1879,21 @@ function notice($s) {
|
|||
* @param string $s Text to display
|
||||
*/
|
||||
function info($s) {
|
||||
if(! session_id())
|
||||
if (! session_id()) {
|
||||
return;
|
||||
if(! x($_SESSION, 'sysmsg_info'))
|
||||
}
|
||||
|
||||
if (! x($_SESSION, 'sysmsg_info')) {
|
||||
$_SESSION['sysmsg_info'] = [];
|
||||
}
|
||||
|
||||
if(in_array($s, $_SESSION['sysmsg_info']))
|
||||
if (in_array($s, $_SESSION['sysmsg_info'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(App::$interactive)
|
||||
if (App::$interactive) {
|
||||
$_SESSION['sysmsg_info'][] = $s;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue