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
04e6c12f
Commit
04e6c12f
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #8557 from owncloud/custom_session_handling
Allow apps to create custom session handlers.
parents
6c4b6505
75bc25f9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/base.php
+11
-2
11 additions, 2 deletions
lib/base.php
with
11 additions
and
2 deletions
lib/base.php
+
11
−
2
View file @
04e6c12f
...
...
@@ -350,9 +350,17 @@ class OC {
//set the session object to a dummy session so code relying on the session existing still works
self
::
$session
=
new
\OC\Session\Memory
(
''
);
// Let the session name be changed in the initSession Hook
$sessionName
=
OC_Util
::
getInstanceId
();
try
{
// Allow session apps to create a custom session object
$useCustomSession
=
false
;
OC_Hook
::
emit
(
'OC'
,
'initSession'
,
array
(
'session'
=>
&
self
::
$session
,
'sessionName'
=>
&
$sessionName
,
'useCustomSession'
=>
&
$useCustomSession
));
if
(
!
$useCustomSession
)
{
// set the session name to the instance id - which is unique
self
::
$session
=
new
\OC\Session\Internal
(
OC_Util
::
getInstanceId
());
self
::
$session
=
new
\OC\Session\Internal
(
$sessionName
);
}
// if session cant be started break with http 500 error
}
catch
(
Exception
$e
)
{
//show the user a detailed error page
...
...
@@ -509,6 +517,7 @@ class OC {
self
::
$server
=
new
\OC\Server
();
self
::
initTemplateEngine
();
OC_App
::
loadApps
(
array
(
'session'
));
if
(
!
self
::
$CLI
)
{
self
::
initSession
();
}
else
{
...
...
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