Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
83a793ba
Commit
83a793ba
authored
Sep 25, 2010
by
tbrehm
Browse files
Improved the session handler so that it does not write unchanged sessions to database.
parent
efb7dc28
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/session.inc.php
View file @
83a793ba
...
...
@@ -56,7 +56,7 @@ class session {
if
(
is_array
(
$rec
))
{
$this
->
session_array
=
$rec
;
return
$
rec
[
'session_data'
];
return
$
this
->
session_array
[
'session_data'
];
}
else
{
return
''
;
}
...
...
@@ -68,6 +68,11 @@ class session {
$this
->
session_array
=
array
();
}
// Dont write session to DB if session data has not been changed after reading it.
if
(
isset
(
$this
->
session_array
[
'session_data'
])
&&
$this
->
session_array
[
'session_data'
]
!=
''
&&
$this
->
session_array
[
'session_data'
]
==
$session_data
)
{
return
true
;
}
if
(
$this
->
session_array
[
'session_id'
]
==
''
)
{
$session_id
=
$this
->
db
->
quote
(
$session_id
);
...
...
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!
Cancel
Please
register
or
sign in
to comment