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
6b1217c2
Verified
Commit
6b1217c2
authored
3 months ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
(CORE) - progression of un-seralization 3
Login success and ldap edit success
parent
66a39880
core-php8
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
html/index.php
+0
-2
html/index.php
include/class_config.inc
+27
-0
include/class_config.inc
include/class_session.inc
+1
-9
include/class_session.inc
with
28 additions
and
11 deletions
+28
-11
html/index.php
+
0
−
2
View file @
6b1217c2
...
...
@@ -100,8 +100,6 @@ if (!is_readable(CONFIG_DIR.'/'.CONFIG_FILE)) {
$config
=
new
config
(
CONFIG_DIR
.
'/'
.
CONFIG_FILE
,
$BASE_DIR
);
session
::
set
(
'config'
,
$config
);
print_r
(
$_SESSION
);
session
::
set
(
'DEBUGLEVEL'
,
$config
->
get_cfg_value
(
'DEBUGLEVEL'
));
logging
::
debug
(
DEBUG_CONFIG
,
__LINE__
,
__FUNCTION__
,
__FILE__
,
$config
->
data
,
'config'
);
/* Configuration was reloaded, so plist needs to be as well */
...
...
This diff is collapsed.
Click to expand it.
include/class_config.inc
+
27
−
0
View file @
6b1217c2
...
...
@@ -83,6 +83,33 @@ class config
}
}
public
function
__serialize
():
array
{
return
[
'config_found'
=>
$this
->
config_found
,
'tags'
=>
$this
->
tags
,
'level'
=>
$this
->
level
,
'currentLocation'
=>
$this
->
currentLocation
,
'current'
=>
$this
->
current
,
'referrals'
=>
$this
->
referrals
,
'data'
=>
$this
->
data
,
];
}
public
function
__unserialize
(
array
$data
):
void
{
$this
->
config_found
=
$data
[
'config_found'
];
$this
->
tags
=
$data
[
'tags'
];
$this
->
level
=
$data
[
'level'
];
$this
->
currentLocation
=
$data
[
'currentLocation'
];
$this
->
current
=
$data
[
'current'
];
$this
->
referrals
=
$data
[
'referrals'
];
$this
->
data
=
$data
[
'data'
];
// Recreate the XML parser
$this
->
parser
=
xml_parser_create
();
}
/*!
* \brief Check and reload the configuration
*
...
...
This diff is collapsed.
Click to expand it.
include/class_session.inc
+
1
−
9
View file @
6b1217c2
...
...
@@ -56,9 +56,6 @@ class session
*/
public
static
function
set
(
$name
,
$value
)
{
if
(
$name
===
'config'
)
{
$value
=
pack
(
'C'
,
$value
);
}
$_SESSION
[
$name
]
=
$value
;
}
...
...
@@ -77,12 +74,7 @@ class session
*/
public
static
function
get
(
$name
)
{
if
(
$name
===
'config'
)
{
if
(
isset
(
$_SESSION
[
'config'
]))
{
return
unpack
(
'C'
,
$_SESSION
[
$name
]);
}
}
else
if
(
isset
(
$_SESSION
[
$name
]))
{
if
(
isset
(
$_SESSION
[
$name
]))
{
return
$_SESSION
[
$name
];
}
else
{
return
NULL
;
...
...
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