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
5097d4dc
Commit
5097d4dc
authored
10 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
remove deprecated \OC:$session
parent
a2457b5f
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/base.php
+2
-10
2 additions, 10 deletions
lib/base.php
lib/private/user/session.php
+0
-17
0 additions, 17 deletions
lib/private/user/session.php
with
2 additions
and
27 deletions
lib/base.php
+
2
−
10
View file @
5097d4dc
...
...
@@ -66,16 +66,10 @@ class OC {
public
static
$REQUESTEDAPP
=
''
;
/**
* check if own
c
loud runs in cli mode
* check if own
C
loud runs in cli mode
*/
public
static
$CLI
=
false
;
/**
* @deprecated use \OC::$server->getSession() instead
* @var \OC\Session\Session
*/
public
static
$session
=
null
;
/**
* @var \OC\Autoloader $loader
*/
...
...
@@ -531,9 +525,7 @@ class OC {
\OC
::
$server
->
getEventLogger
()
->
start
(
'init_session'
,
'Initialize session'
);
OC_App
::
loadApps
(
array
(
'session'
));
if
(
self
::
$CLI
)
{
self
::
$session
=
new
\OC\Session\Memory
(
''
);
}
else
{
if
(
!
self
::
$CLI
)
{
self
::
initSession
();
}
\OC
::
$server
->
getEventLogger
()
->
end
(
'init_session'
);
...
...
This diff is collapsed.
Click to expand it.
lib/private/user/session.php
+
0
−
17
View file @
5097d4dc
...
...
@@ -88,15 +88,6 @@ class Session implements IUserSession, Emitter {
* @return \OCP\ISession
*/
public
function
getSession
()
{
// fetch the deprecated \OC::$session if it changed for backwards compatibility
if
(
isset
(
\OC
::
$session
)
&&
\OC
::
$session
!==
$this
->
session
)
{
\OC
::
$server
->
getLogger
()
->
warning
(
'One of your installed apps still seems to use the deprecated '
.
'\OC::$session and has replaced it with a new instance. Please file a bug against it.'
.
'Closing and replacing session in UserSession instance.'
);
$this
->
setSession
(
\OC
::
$session
);
}
return
$this
->
session
;
}
...
...
@@ -111,14 +102,6 @@ class Session implements IUserSession, Emitter {
}
$this
->
session
=
$session
;
$this
->
activeUser
=
null
;
// maintain deprecated \OC::$session
if
(
\OC
::
$session
!==
$this
->
session
)
{
if
(
\OC
::
$session
instanceof
\OCP\ISession
)
{
\OC
::
$session
->
close
();
}
\OC
::
$session
=
$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