Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F111119856
20160202.ipv6.2.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
Tue, Apr 29, 17:21
Size
736 B
Mime Type
text/x-php
Expires
Thu, May 1, 17:21 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25882936
Attached To
rPH Phabricator
20160202.ipv6.2.php
View Options
<?php
$pull
=
new
PhabricatorRepositoryPullEvent
();
$push
=
new
PhabricatorRepositoryPushEvent
();
$conn_w
=
$pull
->
establishConnection
(
'w'
);
$log_types
=
array
(
$pull
,
$push
);
foreach
(
$log_types
as
$log
)
{
foreach
(
new
LiskMigrationIterator
(
$log
)
as
$row
)
{
$addr
=
$row
->
getRemoteAddress
();
$addr
=
(
string
)
$addr
;
if
(!
strlen
(
$addr
))
{
continue
;
}
if
(!
ctype_digit
(
$addr
))
{
continue
;
}
if
(!(
int
)
$addr
)
{
continue
;
}
$ip
=
long2ip
(
$addr
);
if
(!
is_string
(
$ip
)
||
!
strlen
(
$ip
))
{
continue
;
}
$id
=
$row
->
getID
();
queryfx
(
$conn_w
,
'UPDATE %T SET remoteAddress = %s WHERE id = %d'
,
$log
->
getTableName
(),
$ip
,
$id
);
}
}
Event Timeline
Log In to Comment