Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
bb240209
Commit
bb240209
authored
Nov 26, 2014
by
Thomas Müller
Browse files
Merge pull request #12453 from owncloud/kill-session-global
remove deprecated \OC:$session
parents
a2457b5f
5097d4dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/base.php
View file @
bb240209
...
...
@@ -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'
);
...
...
lib/private/user/session.php
View file @
bb240209
...
...
@@ -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
;
}
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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