Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96665410
20140115.auth.3.unlimit.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Dec 29, 15:36
Size
677 B
Mime Type
text/x-php
Expires
Tue, Dec 31, 15:36 (2 d)
Engine
blob
Format
Raw Data
Handle
23209106
Attached To
rPH Phabricator
20140115.auth.3.unlimit.php
View Options
<?php
// Prior to this patch, we issued sessions "web-1", "web-2", etc., up to some
// limit. This collapses all the "web-X" sessions into "web" sessions.
$session_table
=
new
PhabricatorAuthSession
();
$conn_w
=
$session_table
->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
$session_table
)
as
$session
)
{
$id
=
$session
->
getID
();
echo
"Migrating session {$id}...
\n
"
;
$old_type
=
$session
->
getType
();
$new_type
=
preg_replace
(
'/-.*$/'
,
''
,
$old_type
);
if
(
$old_type
!==
$new_type
)
{
queryfx
(
$conn_w
,
'UPDATE %T SET type = %s WHERE id = %d'
,
$session_table
->
getTableName
(),
$new_type
,
$id
);
}
}
echo
"Done.
\n
"
;
Event Timeline
Log In to Comment