Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
f3062dde
Verified
Commit
f3062dde
authored
1 month ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
Feat(Login) - login adapt php8.2
Adapt include/login to php82
parent
515bb9d3
core-php8
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/login/class_LoginMethod.inc
+3
-3
include/login/class_LoginMethod.inc
include/login/class_LoginPost.inc
+4
-4
include/login/class_LoginPost.inc
with
7 additions
and
7 deletions
+7
-7
include/login/class_LoginMethod.inc
+
3
−
3
View file @
f3062dde
...
...
@@ -85,11 +85,11 @@ class LoginMethod
static
function
validateUserInput
():
bool
{
global
$message
,
$smarty
;
static
::
$username
=
trim
(
static
::
$username
);
static
::
$username
=
trim
(
(
string
)
static
::
$username
);
if
(
!
preg_match
(
'/^[@A-Za-z0-9_.-]+$/'
,
static
::
$username
))
{
$message
=
_
(
'Please specify a valid username!'
);
return
FALSE
;
}
elseif
(
mb_strlen
(
static
::
$password
,
'UTF-8'
)
==
0
)
{
}
elseif
(
mb_strlen
(
(
string
)
static
::
$password
,
'UTF-8'
)
==
0
)
{
$message
=
_
(
'Please specify your password!'
);
$smarty
->
assign
(
'focusfield'
,
'password'
);
return
FALSE
;
...
...
@@ -170,7 +170,7 @@ class LoginMethod
}
/*! \brief Final step of successful login: redirect to main.php */
static
function
redirect
()
static
function
redirect
()
:
never
{
static
::
connect
();
header
(
'Location: main.php'
);
...
...
This diff is collapsed.
Click to expand it.
include/login/class_LoginPost.inc
+
4
−
4
View file @
f3062dde
...
...
@@ -107,7 +107,7 @@ class LoginPost extends LoginMethod
/* Fill template with required values */
$username
=
''
;
if
(
isset
(
$_POST
[
'username'
]))
{
$username
=
trim
(
$_POST
[
'username'
]);
$username
=
trim
(
(
string
)
$_POST
[
'username'
]);
}
$smarty
->
assign
(
'date'
,
gmdate
(
'D, d M Y H:i:s'
));
$smarty
->
assign
(
'username'
,
$username
);
...
...
@@ -150,7 +150,7 @@ class LoginPost extends LoginMethod
/* show login screen */
$smarty
->
assign
(
'PHPSESSID'
,
session_id
());
if
(
$error_collector
!=
''
)
{
$smarty
->
assign
(
'php_errors'
,
preg_replace
(
'/%BUGBODY%/'
,
$error_collector_mailto
,
$error_collector
)
.
'</div>'
);
$smarty
->
assign
(
'php_errors'
,
preg_replace
(
'/%BUGBODY%/'
,
(
string
)
$error_collector_mailto
,
(
string
)
$error_collector
)
.
'</div>'
);
}
else
{
$smarty
->
assign
(
'php_errors'
,
''
);
}
...
...
@@ -179,7 +179,7 @@ class LoginPost extends LoginMethod
/* Fill template with required values */
$username
=
''
;
if
(
isset
(
$_POST
[
'username'
]))
{
$username
=
trim
(
$_POST
[
'username'
]);
$username
=
trim
(
(
string
)
$_POST
[
'username'
]);
}
$smarty
->
assign
(
'date'
,
gmdate
(
'D, d M Y H:i:s'
));
$smarty
->
assign
(
'username'
,
$username
);
...
...
@@ -196,7 +196,7 @@ class LoginPost extends LoginMethod
/* show login screen */
$smarty
->
assign
(
'PHPSESSID'
,
session_id
());
if
(
$error_collector
!=
''
)
{
$smarty
->
assign
(
'php_errors'
,
preg_replace
(
'/%BUGBODY%/'
,
$error_collector_mailto
,
$error_collector
)
.
'</div>'
);
$smarty
->
assign
(
'php_errors'
,
preg_replace
(
'/%BUGBODY%/'
,
(
string
)
$error_collector_mailto
,
(
string
)
$error_collector
)
.
'</div>'
);
}
else
{
$smarty
->
assign
(
'php_errors'
,
''
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets