projects
/
GitHub
/
WoltLab
/
WCF.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unnecessary method `getSpiderIdentifier`
[GitHub/WoltLab/WCF.git]
/
wcfsetup
/
install
/
files
/
lib
/
system
/
session
/
SessionHandler.class.php
diff --git
a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php
b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php
index bf6a61dc31fac788259ac3344fc0be44bc615c82..2d3078981ad67aea0a35aa80c8f3dcf0c2e99eae 100644
(file)
--- a/
wcfsetup/install/files/lib/system/session/SessionHandler.class.php
+++ b/
wcfsetup/install/files/lib/system/session/SessionHandler.class.php
@@
-586,7
+586,7
@@
final class SessionHandler extends SingletonFactory
$condition->add('userID IS NULL');
$condition->add('(sessionID = ? OR spiderIdentifier = ?)', [
$row['sessionID'],
$condition->add('userID IS NULL');
$condition->add('(sessionID = ? OR spiderIdentifier = ?)', [
$row['sessionID'],
-
$this->getSpider
Identifier(UserUtil::getUserAgent()),
+
SpiderHandler::getInstance()->get
Identifier(UserUtil::getUserAgent()),
]);
}
]);
}
@@
-662,7
+662,7
@@
final class SessionHandler extends SingletonFactory
if (!$this->isACP) {
// Try to find an existing spider session. Order by lastActivityTime to maintain a
// stable selection in case duplicates exist for some reason.
if (!$this->isACP) {
// Try to find an existing spider session. Order by lastActivityTime to maintain a
// stable selection in case duplicates exist for some reason.
- $spiderIdentifier =
$this->getSpider
Identifier(UserUtil::getUserAgent());
+ $spiderIdentifier =
SpiderHandler::getInstance()->get
Identifier(UserUtil::getUserAgent());
if ($spiderIdentifier) {
$sql = "SELECT *
FROM wcf1_session
if ($spiderIdentifier) {
$sql = "SELECT *
FROM wcf1_session
@@
-684,7
+684,7
@@
final class SessionHandler extends SingletonFactory
{
$spiderIdentifier = null;
if (!$this->user->userID) {
{
$spiderIdentifier = null;
if (!$this->user->userID) {
- $spiderIdentifier =
$this->getSpider
Identifier(UserUtil::getUserAgent());
+ $spiderIdentifier =
SpiderHandler::getInstance()->get
Identifier(UserUtil::getUserAgent());
}
// save session
}
// save session
@@
-1290,14
+1290,6
@@
final class SessionHandler extends SingletonFactory
}
}
}
}
- /**
- * Returns the spider identifier for given user agent.
- */
- private function getSpiderIdentifier(string $userAgent): ?string
- {
- return SpiderHandler::getInstance()->getIdentifier($userAgent);
- }
-
/**
* Returns true if this is a new session.
*/
/**
* Returns true if this is a new session.
*/