Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97577783
20170131.dashboard.personal.01.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, Jan 5, 10:06
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jan 7, 10:06 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23430027
Attached To
rPH Phabricator
20170131.dashboard.personal.01.php
View Options
<?php
$table
=
new
PhabricatorDashboard
();
$conn
=
$table
->
establishConnection
(
'r'
);
$table_name
=
'dashboard_install'
;
$search_table
=
new
PhabricatorProfileMenuItemConfiguration
();
$search_conn
=
$search_table
->
establishConnection
(
'w'
);
$search_table_name
=
'search_profilepanelconfiguration'
;
$viewer
=
PhabricatorUser
::
getOmnipotentUser
();
$profile_phid
=
id
(
new
PhabricatorHomeApplication
())->
getPHID
();
$menu_item_key
=
PhabricatorDashboardProfileMenuItem
::
MENUITEMKEY
;
foreach
(
new
LiskRawMigrationIterator
(
$conn
,
$table_name
)
as
$install
)
{
$dashboard_phid
=
$install
[
'dashboardPHID'
];
$new_phid
=
id
(
new
PhabricatorProfileMenuItemConfiguration
())->
generatePHID
();
$menu_item_properties
=
json_encode
(
array
(
'dashboardPHID'
=>
$dashboard_phid
,
'name'
=>
''
));
$custom_phid
=
$install
[
'objectPHID'
];
if
(
$custom_phid
==
'dashboard:default'
)
{
$custom_phid
=
null
;
}
$menu_item_order
=
0
;
queryfx
(
$search_conn
,
'INSERT INTO %T (phid, profilePHID, menuItemKey, menuItemProperties, '
.
'visibility, dateCreated, dateModified, menuItemOrder, customPHID) VALUES '
.
'(%s, %s, %s, %s, %s, %d, %d, %d, %ns)'
,
$search_table_name
,
$new_phid
,
$profile_phid
,
$menu_item_key
,
$menu_item_properties
,
'visible'
,
PhabricatorTime
::
getNow
(),
PhabricatorTime
::
getNow
(),
$menu_item_order
,
$custom_phid
);
}
Event Timeline
Log In to Comment