Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
a36bf5c2
Commit
a36bf5c2
authored
11 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
preserve 3rd party values in in the Session destructor
parent
bc3650e4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/session/internal.php
+10
-1
10 additions, 1 deletion
lib/private/session/internal.php
lib/private/session/memory.php
+1
-1
1 addition, 1 deletion
lib/private/session/memory.php
with
11 additions
and
2 deletions
lib/private/session/internal.php
+
10
−
1
View file @
a36bf5c2
...
...
@@ -26,10 +26,19 @@ class Internal extends Memory {
}
public
function
__destruct
()
{
$_SESSION
=
$this
->
data
;
$_SESSION
=
array_merge
(
$_SESSION
,
$this
->
data
)
;
session_write_close
();
}
/**
* @param string $key
*/
public
function
remove
(
$key
)
{
// also remove it from $_SESSION to prevent re-setting the old value during the merge
unset
(
$_SESSION
[
$key
]);
parent
::
remove
(
$key
);
}
public
function
clear
()
{
session_unset
();
@
session_regenerate_id
(
true
);
...
...
This diff is collapsed.
Click to expand it.
lib/private/session/memory.php
+
1
−
1
View file @
a36bf5c2
...
...
@@ -11,7 +11,7 @@ namespace OC\Session;
/**
* Class Internal
*
* store session data in an in-memory array, not persist
ance
* store session data in an in-memory array, not persist
ent
*
* @package OC\Session
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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